diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b3cc8fc86f..2ad12e7c54 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -2,19 +2,22 @@ name: Nightly Build on: schedule: - - cron: '0 * * * *' # This schedule runs every night at midnight UTC + - cron: '0 0 * * *' # This schedule runs every night at midnight UTC jobs: - release: + nightly: runs-on: self-hosted steps: - - name: Cleanup workspace - run: echo "cleanup $GITHUB_WORKSPACE/*" && sudo rm -fr $GITHUB_WORKSPACE/* + - name: Ensure workspace ownership + run: echo "chown -R $USER $GITHUB_WORKSPACE" && sudo chown -R $USER $GITHUB_WORKSPACE - name: Check out code uses: actions/checkout@v2 - - name: start builder container + - name: Show working copy revision + run: git branch --show-current && git rev-parse HEAD + + - name: Start builder container run: sudo docker rm -f infinity_build && sudo docker run -d --name infinity_build --network=host -v $PWD:/infinity infiniflow/infinity_build:0.1 - name: Build release version diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 177090681b..f671b48e3a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,32 +20,32 @@ jobs: - name: Show working copy revision run: git branch --show-current && git rev-parse HEAD - - name: start builder container + - name: Start builder container run: sudo docker rm -f infinity_build && sudo docker run -d --name infinity_build --network=host -v $PWD:/infinity infiniflow/infinity_build:0.1 - name: Build debug version run: sudo docker exec infinity_build bash -c "cd /infinity && rm -fr cmake-build-debug && mkdir -p cmake-build-debug && cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -S /infinity -B /infinity/cmake-build-debug && cmake --build /infinity/cmake-build-debug" - - name: install pysdk + - name: Install pysdk run: sudo docker exec infinity_build bash -c "cd /infinity/python && python3 setup.py install" - - name: start infinity debug version + - name: Start infinity debug version run: sudo docker exec infinity_build bash -c "cd /infinity/ && rm -fr /tmp/infinity && cmake-build-debug/src/infinity > debug.log 2>&1" & - name: pysdk & sqllogictest debug version run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/sqllogictest.py" - - name: stop infinity debug version + - name: Stop infinity debug version run: sudo kill `pidof infinity` - name: Build release version run: sudo docker exec infinity_build bash -c "cd /infinity && rm -fr cmake-build-release && mkdir -p cmake-build-release && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -S /infinity -B /infinity/cmake-build-release && cmake --build /infinity/cmake-build-release" - - name: start infinity release version + - name: Start infinity release version run: sudo docker exec infinity_build bash -c "cd /infinity/ &&rm -fr /tmp/infinity && cmake-build-release/src/infinity > debug.log 2>&1" & - name: pysdk & sqllogictest release version run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/sqllogictest.py" - - name: stop infinity release version + - name: Stop infinity release version run: sudo kill `pidof infinity`