Skip to content

Commit 5cdf699

Browse files
committed
try conan test job
1 parent aa6cdf7 commit 5cdf699

File tree

1 file changed

+61
-23
lines changed

1 file changed

+61
-23
lines changed

.github/workflows/test.yml

Lines changed: 61 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,72 @@ on:
1111
type: boolean
1212
description: set to true to build without clang-tidy (2x faster)
1313

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:
1647
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
1950
strategy:
2051
fail-fast: false
2152
matrix:
2253
include:
23-
- BUILD_SHARED: ON
24-
- BUILD_SHARED: OFF
54+
- target: x86_64-windows
55+
platform: windows_x86_64
2556
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
2867
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
3980
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

Comments
 (0)