-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coo consistency check CI test use github action #65
Open
dinream
wants to merge
4
commits into
Tencent:coo-consistency-check
Choose a base branch
from
dinream:coo-consistency-check-ci
base: coo-consistency-check
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- coo-consistency-check | ||
push: | ||
branches: | ||
- coo-consistency-check | ||
|
||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: CheckCode | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y cmake g++ libgflags-dev unixodbc unixodbc-dev odbcinst locales curl | ||
sudo locale-gen en_US.UTF-8 | ||
|
||
- name: Install Python2 | ||
run: sudo apt-get install -y python2 | ||
|
||
- name: Install pip2 | ||
run: | | ||
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py | ||
python2 get-pip.py | ||
|
||
- name: Install Python Lib | ||
run: python2 -m pip install -r ./src/dbtest/requirements.txt | ||
|
||
- name: Compile 3TSCOO | ||
working-directory: ./src/dbtest | ||
run: | | ||
set -e | ||
cmake -S ./ | ||
make | ||
|
||
- name: Verify the compilation output | ||
working-directory: ./src/dbtest | ||
run: | | ||
set -e | ||
if [ -f 3ts_dbtest ]; then echo "3ts_dbtest exists"; else echo "3ts_dbtest not found"; exit 1; fi | ||
if [ -f 3ts_dbtest_v2 ]; then echo "3ts_dbtest_v2 exists"; else echo "3ts_dbtest_v2 not found"; exit 1; fi | ||
|
||
- name: Check executable file update time | ||
working-directory: ./src/dbtest | ||
run: | | ||
set -e | ||
BUILD_TIME=$(date +%s) | ||
FILE1_TIME=$(stat -c %Y 3ts_dbtest) | ||
FILE2_TIME=$(stat -c %Y 3ts_dbtest_v2) | ||
TIME_DIFF1=$((BUILD_TIME - FILE1_TIME)) | ||
TIME_DIFF2=$((BUILD_TIME - FILE2_TIME)) | ||
if [ "$TIME_DIFF1" -lt 300 ]; then echo "3ts_dbtest was updated recently"; else echo "3ts_dbtest was not updated recently"; exit 1; fi | ||
if [ "$TIME_DIFF2" -lt 300 ]; then echo "3ts_dbtest_v2 was updated recently"; else echo "3ts_dbtest_v2 was not updated recently"; exit 1; fi | ||
|
||
- name: Run Python test | ||
run: | | ||
set -e | ||
python2 -c "import certifi; print(certifi.__version__)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
certifi==2020.6.20 | ||
pip==19.3.1 | ||
setuptools==44.0.0 | ||
wheel==0.37.1 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用python3运行吧