|
1 | | -name: Test C++ interface |
| 1 | +name: Test C++ Interface |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | build_and_test: |
11 | | - name: ${{ matrix.name }} |
12 | | - runs-on: ${{ matrix.os }} |
13 | | - container: ${{ matrix.container }} |
14 | | - defaults: |
15 | | - run: |
16 | | - shell: bash |
| 11 | + name: Build & test (${{ matrix.compiler }}) |
| 12 | + runs-on: ubuntu-latest |
17 | 13 |
|
18 | 14 | strategy: |
19 | 15 | fail-fast: false |
20 | 16 | matrix: |
21 | | - include: |
22 | | - ### Analysis builds |
23 | | - - name: linux_clang-18_cuda-12.1_debug_analysis |
24 | | - os: ubuntu-24.04 |
25 | | - container: ubuntu:20.04 |
26 | | - # - name: windows_cl-2022_debug_analysis |
27 | | - # os: windows-2022 |
28 | | - # - name: macos_xcode-15.4_debug_analysis |
29 | | - # os: macos-14 |
30 | | - - name: linux_gcc-12_debug_analysis |
31 | | - os: ubuntu-22.04 |
32 | | - container: ubuntu:22.04 |
33 | | - |
34 | | - ### macOS |
35 | | - # - name: macos_xcode-15.4_release |
36 | | - # os: macos-14 |
37 | | - # - name: macos_xcode-16.1_debug |
38 | | - # os: macos-15 |
39 | | - |
40 | | - ### Windows |
41 | | - # - name: windows_cl-2022_release |
42 | | - # os: windows-2022 |
43 | | - # - name: windows_cl-2022_debug |
44 | | - # os: windows-2022 |
45 | | - |
46 | | - - name: linux_gcc-11_debug |
47 | | - os: ubuntu-22.04 |
48 | | - container: ubuntu:20.04 |
49 | | - - name: linux_gcc-12_release_c++20 |
50 | | - os: ubuntu-22.04 |
51 | | - container: ubuntu:22.04 |
52 | | - - name: linux_gcc-13_debug |
53 | | - os: ubuntu-22.04 |
54 | | - container: ubuntu:22.04 |
55 | | - |
56 | | - # clang++ |
57 | | - - name: linux_clang-14_release |
58 | | - os: ubuntu-22.04 |
59 | | - container: ubuntu:20.04 |
60 | | - - name: linux_clang-15_release |
61 | | - os: ubuntu-22.04 |
62 | | - container: ubuntu:20.04 |
63 | | - - name: linux_clang-15_debug |
64 | | - os: ubuntu-22.04 |
65 | | - container: ubuntu:22.04 |
66 | | - - name: linux_clang-16_debug_ubsan |
67 | | - os: ubuntu-22.04 |
68 | | - container: ubuntu:22.04 |
69 | | - - name: linux_clang-16_debug_tsan |
70 | | - os: ubuntu-22.04 |
71 | | - container: ubuntu:22.04 |
| 17 | + compiler: [ g++-11, g++-12, g++-13, g++-14, clang++-15, clang++-16 ] |
72 | 18 |
|
73 | 19 | steps: |
74 | | - - uses: actions/checkout@v4 |
75 | | - |
76 | | - - name: Install dependencies |
77 | | - run: | |
78 | | - export DEBIAN_FRONTEND=noninteractive |
79 | | - apt update |
80 | | - apt install -y build-essential cmake libboost-dev libtbb-dev libomp-dev |
81 | | -
|
82 | | - |
83 | | - - name: Verify repo structure |
84 | | - run: ls -R |
85 | | - working-directory: ${{ github.workspace }} |
86 | | - |
87 | | - - name: Compile tests |
88 | | - run: | |
89 | | - cd tests; |
90 | | - cmake -B build -DCMAKE_BUILD_TYPE=Release |
91 | | - cmake --build build --parallel |
92 | | -
|
93 | | - - name: Run tests |
94 | | - run: | |
95 | | - cd tests; |
96 | | - echo "Running serial backend" |
97 | | - ./build/serial.out |
98 | | - echo "Running TBB backend" |
99 | | - ./build/tbb.out |
100 | | - echo "Running OpenMP backend" |
101 | | - ./build/openmp.out |
| 20 | + - name: Checkout code |
| 21 | + uses: actions/checkout@v4 |
| 22 | + with: |
| 23 | + submodules: true |
| 24 | + |
| 25 | + - name: Setup compiler |
| 26 | + run: | |
| 27 | + sudo apt-get update |
| 28 | + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common |
| 29 | + if [[ "${{ matrix.compiler }}" == clang* ]]; then |
| 30 | + version=${{ matrix.compiler#clang++- }} |
| 31 | + sudo apt-get install -y clang-$version |
| 32 | + else |
| 33 | + version=${{ matrix.compiler#g++- }} |
| 34 | + sudo apt-get install -y g++-$version |
| 35 | + fi |
| 36 | +
|
| 37 | + - name: Install dependencies |
| 38 | + run: | |
| 39 | + sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ |
| 40 | + cmake \ |
| 41 | + libboost-dev \ |
| 42 | + libtbb-dev \ |
| 43 | + libomp-dev |
| 44 | +
|
| 45 | + - name: Configure |
| 46 | + working-directory: ${{ github.workspace }}/tests |
| 47 | + run: | |
| 48 | + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} |
| 49 | +
|
| 50 | + - name: Build |
| 51 | + working-directory: ${{ github.workspace }}/tests |
| 52 | + run: cmake --build build --parallel |
| 53 | + |
| 54 | + - name: Run tests |
| 55 | + working-directory: ${{ github.workspace }}/tests |
| 56 | + run: | |
| 57 | + echo "Running serial backend" |
| 58 | + ./build/serial.out || echo "Serial backend failed" |
| 59 | + echo "Running TBB backend" |
| 60 | + ./build/tbb.out || echo "TBB backend failed" |
| 61 | + echo "Running OpenMP backend" |
| 62 | + ./build/openmp.out || echo "OpenMP backend failed" |
0 commit comments