|
11 | 11 | type: boolean |
12 | 12 | description: set to true to build without clang-tidy (2x faster) |
13 | 13 |
|
14 | | -jobs: |
15 | | - run-tests: |
| 14 | +# jobs: |
| 15 | +# test_ubuntu: |
| 16 | +# if: github.repository_owner == 'viamrobotics' |
| 17 | +# runs-on: ubuntu-latest |
| 18 | +# container: ghcr.io/viamrobotics/cpp-base:bullseye-amd64 |
| 19 | +# strategy: |
| 20 | +# fail-fast: false |
| 21 | +# matrix: |
| 22 | +# include: |
| 23 | +# - BUILD_SHARED: ON |
| 24 | +# - BUILD_SHARED: OFF |
| 25 | +# steps: |
| 26 | +# - uses: actions/checkout@v4 |
| 27 | +# - name: cmake |
| 28 | +# run: | |
| 29 | +# mkdir build |
| 30 | +# cd build |
| 31 | +# cmake .. -G Ninja \ |
| 32 | +# -DBUILD_SHARED_LIBS=${{ matrix.BUILD_SHARED }} \ |
| 33 | +# -DVIAMCPPSDK_OFFLINE_PROTO_GENERATION=ON \ |
| 34 | +# -DVIAMCPPSDK_BUILD_TESTS=ON \ |
| 35 | +# -DVIAMCPPSDK_BUILD_EXAMPLES=ON \ |
| 36 | +# -DVIAMCPPSDK_CLANG_TIDY=${{ inputs.no-tidy && 'OFF' || 'ON' }} \ |
| 37 | +# -DVIAMCPPSDK_SANITIZED_BUILD=${{ matrix.BUILD_SHARED }} |
| 38 | +# - name: build |
| 39 | +# run: | |
| 40 | +# cmake --build build --target install |
| 41 | +# cmake --install build |
| 42 | +# - name: test |
| 43 | +# working-directory: build |
| 44 | +# run: ../etc/docker/tests/run_test.sh |
| 45 | + |
| 46 | + test_windows: |
16 | 47 | if: github.repository_owner == 'viamrobotics' |
17 | | - runs-on: ubuntu-latest |
18 | | - container: ghcr.io/viamrobotics/cpp-base:bullseye-amd64 |
| 48 | + needs: [prepare] |
| 49 | + runs-on: windows-latest |
19 | 50 | strategy: |
20 | 51 | fail-fast: false |
21 | 52 | matrix: |
22 | 53 | include: |
23 | | - - BUILD_SHARED: ON |
24 | | - - BUILD_SHARED: OFF |
| 54 | + - target: x86_64-windows |
| 55 | + platform: windows_x86_64 |
25 | 56 | steps: |
26 | | - - uses: actions/checkout@v4 |
27 | | - - name: cmake |
| 57 | + - name: Checkout Code |
| 58 | + uses: actions/checkout@v4 |
| 59 | + with: |
| 60 | + ref: ${{ needs.prepare.outputs.sha }} |
| 61 | + |
| 62 | + - name: Install dependencies |
| 63 | + run: choco install -y conan git |
| 64 | + |
| 65 | + - name: Build SDK |
| 66 | + shell: powershell |
28 | 67 | run: | |
29 | | - mkdir build |
30 | | - cd build |
31 | | - cmake .. -G Ninja \ |
32 | | - -DBUILD_SHARED_LIBS=${{ matrix.BUILD_SHARED }} \ |
33 | | - -DVIAMCPPSDK_OFFLINE_PROTO_GENERATION=ON \ |
34 | | - -DVIAMCPPSDK_BUILD_TESTS=ON \ |
35 | | - -DVIAMCPPSDK_BUILD_EXAMPLES=ON \ |
36 | | - -DVIAMCPPSDK_CLANG_TIDY=${{ inputs.no-tidy && 'OFF' || 'ON' }} \ |
37 | | - -DVIAMCPPSDK_SANITIZED_BUILD=${{ matrix.BUILD_SHARED }} |
38 | | - - name: build |
| 68 | + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 |
| 69 | + refreshenv |
| 70 | + conan profile detect |
| 71 | + conan install . --output-folder=build-conan --build=missing -o "&:shared=False" |
| 72 | + cmake . --preset conan-default -DVIAMCPPSDK_BUILD_TESTS=ON -DVIAMCPPSDK_BUILD_EXAMPLES=ON |
| 73 | + cmake --build --preset=conan-release --target ALL_BUILD install -j 8 |
| 74 | + env: |
| 75 | + CONAN_USER_HOME: c:/cache |
| 76 | + CONAN_USER_HOME_SHORT: c:/cache/conan_shortpaths |
| 77 | + |
| 78 | + - name: run tests |
| 79 | + shell: powershell |
39 | 80 | run: | |
40 | | - cmake --build build --target install |
41 | | - cmake --install build |
42 | | - - name: test |
43 | | - working-directory: build |
44 | | - run: ../etc/docker/tests/run_test.sh |
| 81 | + ctest --preset=conan-release --output-on-failure |
| 82 | +
|
0 commit comments