|
| 1 | +## Copyright 2021-2024 The Khronos Group |
| 2 | +## SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
1 | 4 | name: ANARI-SDK CI |
2 | 5 |
|
3 | 6 | on: |
|
10 | 13 | ANARI_LIBRARY: helide |
11 | 14 |
|
12 | 15 | jobs: |
13 | | - build: |
| 16 | + build-linux: |
14 | 17 | runs-on: ${{ matrix.os }} |
15 | 18 | strategy: |
16 | 19 | matrix: |
17 | | - os: [ubuntu-latest, windows-latest] |
| 20 | + os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] |
18 | 21 | config: [Release, Debug] |
19 | | - |
| 22 | + exclude: |
| 23 | + - os: ubuntu-20.04 |
| 24 | + config: Debug |
20 | 25 | steps: |
21 | | - - uses: actions/checkout@v3 |
22 | | - |
23 | 26 | - name: Install Packages |
24 | | - if: ${{ matrix.os == 'ubuntu-latest' }} |
25 | | - run: sudo apt install -y libboost-system-dev |
26 | | - |
27 | | - - name: Configure CMake |
28 | | - run: > |
29 | | - cmake -LA -B ${{ github.workspace }}/build |
30 | | - -DCMAKE_BUILD_TYPE=${{ matrix.config }} |
31 | | - -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install |
32 | | - -DBUILD_SHARED_LIBS=ON |
33 | | - -DBUILD_CTS=ON |
34 | | - -DBUILD_EXAMPLES=ON |
35 | | - -DBUILD_HDANARI=OFF |
36 | | - -DBUILD_HELIDE_DEVICE=ON |
37 | | - -DBUILD_REMOTE_DEVICE=${{ matrix.os == 'ubuntu-latest' }} |
38 | | - -DBUILD_TESTING=ON |
39 | | - -DBUILD_VIEWER=OFF |
40 | | -
|
41 | | - - name: Build |
42 | | - run: cmake --build ${{github.workspace}}/build --config ${{ matrix.config }} --target install |
43 | | - |
44 | | - - name: Unit Tests |
45 | | - working-directory: ${{ github.workspace }}/build |
46 | | - run: ctest -R unit_test -C ${{ matrix.config }} |
47 | | - |
48 | | - - name: Render Tests |
49 | | - working-directory: ${{github.workspace}}/build |
50 | | - run: ctest -R render_test -C ${{ matrix.config }} |
51 | | - |
52 | | - - name: Tutorial Tests |
53 | | - working-directory: ${{github.workspace}}/build |
54 | | - run: ctest -R anariTutorial -C ${{ matrix.config }} |
| 27 | + if: ${{ matrix.os == 'ubuntu-20.04' }} |
| 28 | + run: sudo apt install -y libboost-system-dev libpython3-dev |
| 29 | + - name: Check out code |
| 30 | + uses: actions/checkout@v4 |
| 31 | + - name: Build and test |
| 32 | + uses: ./.github/actions/configure_and_build |
| 33 | + with: |
| 34 | + workspace: ${{ github.workspace }} |
| 35 | + config: ${{ matrix.config }} |
| 36 | + os: ${{ matrix.os }} |
| 37 | + shell: bash |
| 38 | + - name: Upload install |
| 39 | + if: ${{ matrix.config == 'Release' && matrix.os == 'ubuntu-20.04' }} |
| 40 | + uses: actions/upload-artifact@v4 |
| 41 | + with: |
| 42 | + name: ANARI-SDK_ubuntu-20.04 |
| 43 | + path: ${{ github.workspace }}/build/install |
| 44 | + |
| 45 | + build-windows: |
| 46 | + runs-on: ${{ matrix.os }} |
| 47 | + strategy: |
| 48 | + matrix: |
| 49 | + os: [windows-latest] |
| 50 | + config: [Release, Debug] |
| 51 | + steps: |
| 52 | + - name: Check out code |
| 53 | + uses: actions/checkout@v4 |
| 54 | + - name: Build and test |
| 55 | + uses: ./.github/actions/configure_and_build |
| 56 | + with: |
| 57 | + workspace: ${{ github.workspace }} |
| 58 | + config: ${{ matrix.config }} |
| 59 | + os: ${{ matrix.os }} |
| 60 | + shell: pwsh |
| 61 | + - name: Upload install |
| 62 | + if: ${{ matrix.config == 'Release' }} |
| 63 | + uses: actions/upload-artifact@v4 |
| 64 | + with: |
| 65 | + name: ANARI-SDK_windows |
| 66 | + path: ${{ github.workspace }}/build/install |
55 | 67 |
|
56 | 68 | build-macos: |
57 | 69 | # iOS is 10x expensive to run on GitHub machines, so only run if we know something else passed as well |
58 | | - needs: build |
| 70 | + needs: [build-linux, build-windows] |
59 | 71 | runs-on: ${{ matrix.os }} |
60 | 72 | strategy: |
61 | 73 | matrix: |
62 | 74 | os: [macos-latest] |
63 | 75 | config: [Release] |
64 | | - |
65 | 76 | steps: |
66 | | - - uses: actions/checkout@v3 |
67 | | - |
68 | | - - name: Configure CMake |
69 | | - run: > |
70 | | - cmake -LA -B ${{ github.workspace }}/build |
71 | | - -DCMAKE_BUILD_TYPE=${{ matrix.config }} |
72 | | - -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install |
73 | | - -DBUILD_SHARED_LIBS=ON |
74 | | - -DBUILD_EXAMPLES=ON |
75 | | - -DBUILD_HDANARI=OFF |
76 | | - -DBUILD_HELIDE_DEVICE=ON |
77 | | - -DBUILD_REMOTE_DEVICE=OFF |
78 | | - -DBUILD_TESTING=ON |
79 | | - -DBUILD_VIEWER=OFF |
80 | | -
|
81 | | - - name: Build |
82 | | - run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.config }} --target install |
83 | | - |
84 | | - - name: Unit Tests |
85 | | - working-directory: ${{ github.workspace }}/build |
86 | | - run: ctest -R unit_test -C ${{ matrix.config }} |
87 | | - |
88 | | - - name: Render Tests |
89 | | - working-directory: ${{ github.workspace }}/build |
90 | | - run: ctest -R render_test -C ${{ matrix.config }} |
91 | | - |
92 | | - - name: Tutorial Tests |
93 | | - working-directory: ${{ github.workspace }}/build |
94 | | - run: ctest -R anariTutorial -C ${{ matrix.config }} |
| 77 | + - name: Check out code |
| 78 | + uses: actions/checkout@v4 |
| 79 | + - name: Build and test |
| 80 | + uses: ./.github/actions/configure_and_build |
| 81 | + with: |
| 82 | + workspace: ${{ github.workspace }} |
| 83 | + config: ${{ matrix.config }} |
| 84 | + os: ${{ matrix.os }} |
| 85 | + shell: bash |
| 86 | + - name: Upload install |
| 87 | + if: ${{ matrix.config == 'Release' }} |
| 88 | + uses: actions/upload-artifact@v4 |
| 89 | + with: |
| 90 | + name: ANARI-SDK_macos |
| 91 | + path: ${{ github.workspace }}/build/install |
0 commit comments