-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.44 KB
/
linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Linux
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
cxx: [g++-12, clang++-18]
build_type: [Debug, Release]
std: [20]
include:
- cxx: g++-12
install: sudo apt install g++-12
build_type: Debug
- cxx: clang++-18
install: sudo apt install clang-18 libc++-18-dev libc++abi-18-dev
build_type: Debug
cxxflags: -stdlib=libc++
steps:
- uses: actions/checkout@v3
- name: Create Build Environment
run: |
sudo apt update
${{matrix.install}}
- name: Configure CMake
env:
CXX: ${{matrix.cxx}}
CXXFLAGS: ${{matrix.cxxflags}}
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_STANDARD=${{matrix.std}} -DASS_ENABLE_TESTING=ON
- name: Build
# Build your program with the given configuration
run: |
threads=`nproc`
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} --parallel $threads
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{matrix.build_type}}
env:
CTEST_OUTPUT_ON_FAILURE: True