From 441e4fc59901e4c472fe6f716467693c71eaec1a Mon Sep 17 00:00:00 2001 From: greg7mdp Date: Fri, 20 Sep 2024 22:08:23 -0400 Subject: [PATCH] Update `.github/workflows/linux.yml` --- .github/workflows/linux.yml | 43 +++++++++++++++---------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index dc8bf18..28c225b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -12,35 +12,26 @@ jobs: matrix: os: [ubuntu-22.04] compiler: [g++-9, g++-10, clang++-17] - build_type: [Debug, Release] + optimize: [-O2] standard: [20] + + env: + CXX: ${{ matrix.compiler }} + CXXFLAGS: ${{ matrix.flags }} ${{ matrix.optimize }} + CTEST_OUTPUT_ON_FAILURE: 1 + CTEST_NO_TESTS_ACTION: error + CTEST_PARALLEL_LEVEL: 0 + CMAKE_BUILD_PARALLEL_LEVEL: 4 + steps: - name: Checkout - uses: actions/checkout@v2.0.0 - - - name: Create Environment - run: | - sudo apt update - sudo apt install -y g++-9 g++-10 - wget https://apt.llvm.org/llvm.sh; chmod u+x llvm.sh; sudo ./llvm.sh 17 - cmake -E make_directory ${{runner.workspace}}/build + uses: actions/checkout@v4 - - name: Configure - working-directory: ${{runner.workspace}}/build - env: - CXX: ${{ matrix.compiler }} - run: | - cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_CXX_STANDARD=${{matrix.standard}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} $GITHUB_WORKSPACE + - name: CMake configure + run: cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Release -B build - - name: Build - working-directory: ${{runner.workspace}}/build - run: | - cpus=`nproc` - cmake --build . --config ${{matrix.build_type}} --parallel $cpus + - name: CMake build + run: cmake --build build - - name: Test - working-directory: ${{runner.workspace}}/build - env: - CTEST_OUTPUT_ON_FAILURE: True - run: | - ctest -C ${{matrix.build_type}} + - name: CMake test + run: ctest --test-dir build