Merge pull request #1717 from kuzudb/call #8
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
name: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
gcc-build-test: | |
name: gcc build & test | |
needs: [clang-formatting-check] | |
runs-on: kuzu-self-hosted-testing | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Ensure Python dependencies | |
run: | | |
pip install torch~=1.13 --extra-index-url https://download.pytorch.org/whl/cpu &&\ | |
pip install --user -r tools/python_api/requirements_dev.txt -f https://data.pyg.org/whl/torch-1.13.0+cpu.html | |
- name: Ensure Node.js dependencies | |
run: npm install --include=dev | |
working-directory: tools/nodejs_api | |
- name: Test with coverage | |
run: CC=gcc CXX=g++ make lcov NUM_THREADS=32 | |
- name: Python test | |
run: CC=gcc CXX=g++ make pytest NUM_THREADS=32 | |
- name: Node.js test | |
run: CC=gcc CXX=g++ make nodejstest NUM_THREADS=32 | |
- name: Rust test | |
run: CC=gcc CXX=g++ make rusttest NUM_THREADS=32 | |
- name: Generate coverage report | |
run: | | |
lcov -c -d ./ --no-external -o cover.info &&\ | |
lcov --remove cover.info $(< .github/workflows/lcov_exclude) -o cover.info | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
file: cover.info | |
functionalities: 'search' | |
gcc-build-test-with-asan: | |
name: gcc build & test with asan | |
needs: [gcc-build-test] | |
runs-on: kuzu-self-hosted-testing | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Ensure Python dependencies | |
run: | | |
pip install torch~=1.13 --extra-index-url https://download.pytorch.org/whl/cpu &&\ | |
pip install --user -r tools/python_api/requirements_dev.txt -f https://data.pyg.org/whl/torch-1.13.0+cpu.html | |
- name: Ensure Node.js dependencies | |
run: npm install --include=dev | |
working-directory: tools/nodejs_api | |
- name: Build debug | |
run: CC=gcc CXX=g++ make alldebug NUM_THREADS=32 | |
- name: Run test with ASan | |
run: ctest --output-on-failure -j 10 | |
env: | |
LD_PRELOAD: "/usr/lib/x86_64-linux-gnu/libasan.so.6" | |
ASAN_OPTIONS: "detect_leaks=1:log_path=/tmp/asan.log" | |
working-directory: ./build/debug/test | |
continue-on-error: true | |
- name: Report ASan log | |
run: ls /tmp/asan.log* 1>/dev/null 2>&1 && (cat /tmp/asan.log*; exit 1) || exit 0 | |
shell: bash | |
- name: Clean up ASan log | |
run: rm -rf /tmp/asan.log* | |
clang-build-test: | |
name: clang build & test | |
needs: [clang-formatting-check] | |
runs-on: kuzu-self-hosted-testing | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Ensure python dependencies | |
run: | | |
pip install torch~=1.13 --extra-index-url https://download.pytorch.org/whl/cpu &&\ | |
pip install --user -r tools/python_api/requirements_dev.txt -f https://data.pyg.org/whl/torch-1.13.0+cpu.html | |
- name: Ensure Node.js dependencies | |
run: npm install --include=dev | |
working-directory: tools/nodejs_api | |
- name: Build | |
run: CC=clang-14 CXX=clang++-14 make release NUM_THREADS=32 | |
- name: Test | |
run: CC=clang-14 CXX=clang++-14 make test NUM_THREADS=32 | |
- name: Python test | |
run: CC=clang-14 CXX=clang++-14 make pytest NUM_THREADS=32 | |
- name: Node.js test | |
run: CC=clang-14 CXX=clang++-14 make nodejstest NUM_THREADS=32 | |
msvc-build-test: | |
name: msvc build & test | |
needs: [clang-formatting-check] | |
runs-on: self-hosted-windows | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build and test | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" | |
make test NUM_THREADS=18 | |
clang-formatting-check: | |
name: clang-format check | |
runs-on: kuzu-self-hosted-testing | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check source format | |
run: python3 scripts/run-clang-format.py --clang-format-executable /usr/bin/clang-format-11 -r src/ | |
- name: Check test format | |
run: python3 scripts/run-clang-format.py --clang-format-executable /usr/bin/clang-format-11 -r test/ | |
rustfmt-check: | |
name: rustfmt check | |
runs-on: kuzu-self-hosted-testing | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check api format | |
working-directory: tools/rust_api | |
run: cargo fmt --check | |
benchmark: | |
name: benchmark | |
needs: [gcc-build-test, clang-build-test] | |
runs-on: kuzu-self-hosted-benchmarking | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Ensure Python dependencies | |
run: | | |
pip install torch~=1.13 --extra-index-url https://download.pytorch.org/whl/cpu &&\ | |
pip install --user -r tools/python_api/requirements_dev.txt -f https://data.pyg.org/whl/torch-1.13.0+cpu.html | |
- name: Ensure Node.js dependencies | |
run: npm install | |
working-directory: tools/nodejs_api | |
- name: Build | |
run: make benchmark NUM_THREADS=30 | |
- name: Benchmark | |
run: python3 benchmark/benchmark_runner.py --dataset ldbc-sf100 --thread 10 |