From a38a551346de7d859cf14ad2106fa2d4cd7fe300 Mon Sep 17 00:00:00 2001 From: Anjan Roy Date: Fri, 2 Feb 2024 19:10:27 +0400 Subject: [PATCH] update github actions CI script - Now runs on both Ubuntu-x86_64 and Darwin-aarch64 targets - Running primary tests along with newly added ASAN and UBSAN Signed-off-by: Anjan Roy --- .github/workflows/test_ci.yml | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test_ci.yml b/.github/workflows/test_ci.yml index 30a6900..43ae601 100644 --- a/.github/workflows/test_ci.yml +++ b/.github/workflows/test_ci.yml @@ -8,23 +8,19 @@ on: jobs: build: - - runs-on: ubuntu-22.04 + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest, # x86_64 + macos-14 # Apple Silicon + ] steps: - - uses: actions/checkout@v3 - - name: Setup compiler - run: | - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 - - name: Fetch dependency - run: git submodule update --init - - name: Get CMake - run: sudo apt-get install cmake + - uses: actions/checkout@v4 - name: Setup Google-Test run: | pushd ~ - git clone https://github.com/google/googletest.git -b v1.13.0 + git clone https://github.com/google/googletest.git -b v1.14.0 pushd googletest mkdir build pushd build @@ -34,7 +30,9 @@ jobs: popd popd popd - - name: Execute tests - run: make -j $(nproc --all) - - name: Cleanup - run: make clean + - name: Execute Tests on ${{matrix.os}} + run: make -j + - name: Execute Tests with AddressSanitizer on ${{matrix.os}} + run: make asan_test -j + - name: Execute Tests with UndefinedBehaviourSanitizer on ${{matrix.os}} + run: make ubsan_test -j