Skip to content

Commit

Permalink
Update .github/workflows/linux.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
greg7mdp committed Sep 21, 2024
1 parent 276d1e5 commit 441e4fc
Showing 1 changed file with 17 additions and 26 deletions.
43 changes: 17 additions & 26 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]

- 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

0 comments on commit 441e4fc

Please sign in to comment.