|
1 | 1 | name: Test C++ interface |
2 | 2 |
|
3 | | -# The workflow gets triggered by pushes and pull requests |
4 | 3 | on: |
5 | 4 | push: |
6 | 5 | branches: [ "main" ] |
7 | 6 | pull_request: |
8 | 7 | branches: [ "main" ] |
9 | 8 |
|
10 | 9 | jobs: |
11 | | - build: |
| 10 | + build_and_test: |
| 11 | + name: ${{ matrix.name }} |
| 12 | + runs-on: ${{ matrix.os }} |
| 13 | + container: ${{ matrix.container }} |
| 14 | + defaults: |
| 15 | + run: |
| 16 | + shell: bash |
12 | 17 |
|
13 | | - runs-on: ubuntu-latest |
14 | 18 | strategy: |
15 | 19 | fail-fast: false |
| 20 | + 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 |
16 | 72 |
|
17 | 73 | steps: |
18 | | - # checks out the code in the repository |
19 | | - - uses: actions/checkout@v3 |
20 | | - with: |
21 | | - submodules: true |
| 74 | + - uses: actions/checkout@v4 |
22 | 75 |
|
23 | 76 | - name: Install dependencies |
24 | 77 | run: | |
25 | | - sudo apt install -y libboost-dev |
26 | | - sudo apt install -y libtbb-dev |
27 | | - sudo apt install libomp-dev |
| 78 | + apt update |
| 79 | + apt install -y libboost-dev libtbb-dev libomp-dev |
28 | 80 |
|
29 | | - - name: Compile and run tests |
| 81 | + - name: Compile tests |
| 82 | + working-directory: ${{ github.workspace }}/tests |
| 83 | + run: | |
| 84 | + cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} |
| 85 | + cmake --build build --parallel |
| 86 | +
|
| 87 | + - name: Run tests |
30 | 88 | working-directory: ${{ github.workspace }}/tests |
31 | 89 | run: | |
32 | | - cmake -B build -DCMAKE_BUILD_TYPE=Release |
33 | | - cmake --build build -- -j 3 |
34 | 90 | echo "Running serial backend" |
35 | | - ./build/cpu/serial.out |
| 91 | + ./build/serial.out |
36 | 92 | echo "Running TBB backend" |
37 | | - ./build/cpu/tbb.out |
| 93 | + ./build/tbb.out |
38 | 94 | echo "Running OpenMP backend" |
39 | | - ./build/cpu/openmp.out |
40 | | -
|
| 95 | + ./build/openmp.out |
0 commit comments