From 480c15749de35769285e06a9c00c79a3f54c46cc Mon Sep 17 00:00:00 2001 From: Anjan Roy Date: Mon, 23 Sep 2024 08:19:06 +0400 Subject: [PATCH] Add yaml script for running tests on Github Actions CI Signed-off-by: Anjan Roy --- .github/workflows/test_ci.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/test_ci.yml diff --git a/.github/workflows/test_ci.yml b/.github/workflows/test_ci.yml new file mode 100644 index 0000000..6da056d --- /dev/null +++ b/.github/workflows/test_ci.yml @@ -0,0 +1,44 @@ +name: Test Frodo Private Information Retrieval Scheme + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + compiler: [g++, clang++] + build_type: [debug, release] + test_type: ['standard', asan, ubsan] + + steps: + - uses: actions/checkout@v4 + - name: Setup Google-Test + run: | + pushd ~ + git clone https://github.com/google/googletest.git -b v1.15.2 + pushd googletest + mkdir build + pushd build + cmake .. -DBUILD_GMOCK=OFF + make + sudo make install + popd + popd + popd + - name: Execute Tests on ${{matrix.os}}, compiled with ${{matrix.compiler}} + if: ${{matrix.test_type == 'standard'}} + run: | + CXX=${{matrix.compiler}} make -j + make clean + + - name: Execute Tests with ${{matrix.test_type}}, in ${{matrix.build_type}} mode, on ${{matrix.os}}, compiled with ${{matrix.compiler}} + if: ${{matrix.test_type != 'standard'}} + run: | + CXX=${{matrix.compiler}} make ${{matrix.build_type}}_${{matrix.test_type}}_test -j + make clean