From 531fcc2ac9df9c51d5ab0256800212559dde180d Mon Sep 17 00:00:00 2001 From: LHT129 Date: Tue, 3 Dec 2024 03:36:43 +0000 Subject: [PATCH] introduce github action for ci test asan - test asan on github action - format check on github action - other test on circleci Signed-off-by: LHT129 --- .circleci/config.yml | 2 -- .github/workflows/asan_build_and_test.yml | 41 +++++++++++++++++++++++ 2 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/asan_build_and_test.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 85ccd5c3..e7245bb4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,7 +23,6 @@ jobs: resource_class: medium+ steps: - checkout - - run: ./scripts/check_format.sh - restore_cache: keys: - fork-cache-{{ checksum "CMakeLists.txt" }}-{{ checksum ".circleci/fresh_ci_cache.commit" }} @@ -40,7 +39,6 @@ jobs: resource_class: medium+ steps: - checkout - - run: ./scripts/check_format.sh - restore_cache: keys: - main-ccache-{{ checksum "CMakeLists.txt" }}-{{ checksum ".circleci/fresh_ci_cache.commit" }} diff --git a/.github/workflows/asan_build_and_test.yml b/.github/workflows/asan_build_and_test.yml new file mode 100644 index 00000000..ab26a036 --- /dev/null +++ b/.github/workflows/asan_build_and_test.yml @@ -0,0 +1,41 @@ +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: + name: Build + runs-on: ubuntu-latest + container: + image: vsaglib/vsag:ubuntu + steps: + - uses: actions/checkout@v4 + - name: Load Cache + uses: actions/cache@v4.1.2 + 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/cache@v4.1.2 + with: + path: ./build/ + key: build-${{ hashFiles('./CMakeLists.txt') }}-${{ hashFiles('./.circleci/fresh_ci_cache.commit') }} + - name: Test + run: make test_asan_parallel