@@ -16,40 +16,56 @@ jobs:
16
16
strategy :
17
17
fail-fast : false
18
18
matrix :
19
- compiler : [native, llvm]
20
- os : [ubuntu-latest, windows-latest]
19
+ compiler : [native, llvm, gcc ]
20
+ os : [ubuntu-latest, windows-latest, macos-13, macos-15 ]
21
21
exclude :
22
22
- os : windows-latest
23
23
compiler : llvm
24
+ - os : ubuntu-latest
25
+ compiler : gcc # gcc is already the default
24
26
25
27
steps :
26
- - name : Checkout code
27
- uses : actions/checkout@v4
28
+ - name : Checkout code
29
+ uses : actions/checkout@v4
28
30
29
- - name : Install CMake
30
- uses : lukka/get-cmake@latest
31
+ - name : Install CMake
32
+ uses : lukka/get-cmake@latest
31
33
32
- - name : Use LLVM and Clang
33
- run : |
34
- echo "CC=clang-18" >> $GITHUB_ENV
35
- echo "CXX=clang++-18" >> $GITHUB_ENV
36
- if : ${{ matrix.compiler != 'native' }}
34
+ - name : Install Clang
35
+ if : ${{ matrix.compiler == 'llvm' && (matrix.os == 'macos-13' || matrix.os == 'macos-15') }}
36
+ run : |
37
+ brew install llvm@18
38
+ brew link --force --overwrite llvm@18
39
+ echo "CC=$(brew --prefix llvm@18)/bin/clang" >> $GITHUB_ENV
40
+ echo "CXX=$(brew --prefix llvm@18)/bin/clang++" >> $GITHUB_ENV
37
41
38
- - name : Configure
39
- run : cmake -B build -DCPPSPEC_BUILD_TESTS=YES
42
+ - name : Use LLVM and Clang
43
+ run : |
44
+ echo "CC=clang-18" >> $GITHUB_ENV
45
+ echo "CXX=clang++-18" >> $GITHUB_ENV
46
+ if : ${{ matrix.compiler == 'llvm' && (matrix.os != 'macos-13' || matrix.os != 'macos-15') }}
40
47
41
- - name : Build
42
- run : cmake --build build --config Release
48
+ - name : Use GCC
49
+ run : |
50
+ echo "CC=gcc-14" >> $GITHUB_ENV
51
+ echo "CXX=g++-14" >> $GITHUB_ENV
52
+ if : ${{ matrix.compiler == 'gcc' && (matrix.os != 'ubuntu-latest') }}
43
53
44
- - name : Test
45
- run : ctest --test-dir build --build-config Release --output-on-failure
54
+ - name : Configure
55
+ run : cmake -B build -DCPPSPEC_BUILD_TESTS=YES
46
56
47
- - name : Upload Test Results
48
- uses : actions/upload-artifact@v4
49
- if : always()
50
- with :
51
- name : Test Results (${{ matrix.os }} - ${{ matrix.compiler }})
52
- path : build/spec/results/*.xml
57
+ - name : Build
58
+ run : cmake --build build --config Release
59
+
60
+ - name : Test
61
+ run : ctest --test-dir build --build-config Release --output-on-failure
62
+
63
+ - name : Upload Test Results
64
+ uses : actions/upload-artifact@v4
65
+ if : always()
66
+ with :
67
+ name : Test Results (${{ matrix.os }} - ${{ matrix.compiler }})
68
+ path : build/spec/results/*.xml
53
69
54
70
publish-test-results :
55
71
name : " Publish Tests Results"
72
88
- name : Publish Test Results
73
89
uses : EnricoMi/publish-unit-test-result-action@v2
74
90
with :
75
- files : " artifacts/**/*.xml"
91
+ files : " artifacts/**/*.xml"
0 commit comments