Skip to content

introduce github action for ci test asan #22

introduce github action for ci test asan

introduce github action for ci test asan #22

name: Asan Build & Test Parallel
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
clang-format-check:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Clang format
run: sudo apt-get install clang-format
- name: Run Clang format check
run: ./scripts/check_format.sh
build_asan:
name: Asan Build
runs-on: ubuntu-latest
container:
image: vsaglib/vsag:ubuntu
steps:
- uses: actions/checkout@v4
- name: Load Cache
uses: actions/[email protected]
with:
path: ./build/
key: build-${{ hashFiles('./CMakeLists.txt') }}-${{ hashFiles('./.circleci/fresh_ci_cache.commit') }}
- name: Make Asan
run: make asan
- name: Save Cache
uses: actions/[email protected]
with:
path: ./build/
key: build-${{ hashFiles('./CMakeLists.txt') }}-${{ hashFiles('./.circleci/fresh_ci_cache.commit') }}
- name: Save Test Cache
uses: actions/[email protected]
with:
path: ./build/
key: test-${{ github.run_number }}
test_asan_unittests:
name: Unit Test
needs: build_asan
runs-on: ubuntu-latest
container:
image: vsaglib/vsag:ubuntu
steps:
- uses: actions/checkout@v4
- name: Use Cache
uses: actions/[email protected]
with:
path: ./build/
key: test-${{ github.run_number }}
- name: Do Asan Test
run: ./build/tests/unittests -d yes ${UT_FILTER} -a --order rand --allow-running-no-tests -o log && cat log
test_asan_functests:
name: Func Test
needs: build_asan
runs-on: ubuntu-latest
container:
image: vsaglib/vsag:ubuntu
steps:
- uses: actions/checkout@v4
- name: Use Cache
uses: actions/[email protected]
with:
path: ./build/
key: test-${{ github.run_number }}
- name: Do Asan Test
run: ./build/tests/functests -d yes ${UT_FILTER} -a --order rand --allow-running-no-tests -o log && cat log
clean up:
name: Clean Up Test Cache
needs: [test_asan_functests, test_asan_unittests]
runs-on: ubuntu-latest
container:
image: vsaglib/vsag:ubuntu
steps:
- name: Remove
- run: mkdir -p /tmp/remove
# - run: gh cache delete test-${{ github.run_number }}