Skip to content

Commit 6f58b42

Browse files
committed
use base image in test.yml
1 parent cc9dba5 commit 6f58b42

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,28 @@ jobs:
88
run-tests:
99
if: github.repository_owner == 'viamrobotics'
1010
runs-on: ubuntu-latest
11-
container:
12-
image: ghcr.io/viamrobotics/canon:amd64
11+
container: ghcr.io/viamrobotics/cpp-base:bullseye-amd64
1312
strategy:
1413
matrix:
1514
include:
1615
- BUILD_SHARED: ON
1716
- BUILD_SHARED: OFF
1817
steps:
1918
- uses: actions/checkout@v4
20-
###########################################
21-
# necessary installs for building #
22-
###########################################
23-
- name: build-docker-test
19+
- name: cmake
2420
run: |
25-
docker build -t cpp . -f etc/docker/base-images/Dockerfile.debian.bullseye
26-
docker build -t cpp-test . -f etc/docker/Dockerfile.sdk-build \
27-
--build-arg BASE_TAG=cpp \
28-
--build-arg REPO_SETUP=copy \
29-
--build-arg BUILD_SHARED=${{ matrix.BUILD_SHARED }} \
30-
--build-arg BUILD_TESTS=ON \
31-
--build-arg BUILD_EXAMPLES=ON \
32-
--build-arg "EXTRA_CMAKE_ARGS=\
33-
-DVIAMCPPSDK_CLANG_TIDY=ON \
34-
-DVIAMCPPSDK_SANITIZED_BUILD=${{ matrix.BUILD_SHARED }}"
35-
36-
docker run -w /viam-cpp-sdk/build -t --entrypoint /viam-cpp-sdk/etc/docker/tests/run_test.sh cpp-test /bin/bash
21+
mkdir build
22+
cd build
23+
cmake .. -G Ninja \
24+
-DBUILD_SHARED_LIBS=${{ matrix.BUILD_SHARED }} \
25+
-DVIAMCPPSDK_OFFLINE_PROTO_GENERATION=ON \
26+
-DVIAMCPPSDK_BUILD_TESTS=ON \
27+
-DVIAMCPPSDK_BUILD_EXAMPLES=ON \
28+
-DVIAMCPPSDK_CLANG_TIDY=ON \
29+
-DVIAMCPPSDK_SANITIZED_BUILD=${{ matrix.BUILD_SHARED }}
30+
- name: build
31+
run: |
32+
cmake --build build --target install
33+
cmake --install build
34+
- name: test
35+
run: etc/docker/tests/run_test.sh

0 commit comments

Comments
 (0)