From 65996d6eeca63fc75c7fcc6cb14d284d906156c9 Mon Sep 17 00:00:00 2001 From: Stepan Usatiuk Date: Wed, 1 May 2024 11:19:03 +0200 Subject: [PATCH] Matrix test no_threads --- .github/workflows/cmake.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index fe80395..13c454a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -17,14 +17,19 @@ jobs: # You can convert this to a matrix build if you need cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix runs-on: ubuntu-latest + strategy: + matrix: + threads: [ "-DNO_THREADS", "" ] steps: - - uses: actions/checkout@v3 - - - run: apt-get update && apt-get install -y sudo + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Install sudo for act runner + run: apt-get update && apt-get install -y sudo if: env.ACT=='true' - - - name: install everything + + - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y cmake build-essential gcc g++ - name: Configure CMake @@ -34,12 +39,12 @@ jobs: - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(( $(nproc) - 2 )) + run: cmake --build ${{github.workspace}}/build ${{ matrix.threads }} --config ${{env.BUILD_TYPE}} --parallel $(( $(nproc) - 2 )) - name: Test # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: cd ${{github.workspace}}/build && ctest --test-dir ${{github.workspace}}/build --verbose --parallel $(nproc) -C ${{env.BUILD_TYPE}} - + - name: CLI tests run: PSIL="../build/src/psil" ${{github.workspace}}/clitests/testall.sh