From 8142b253da22ea4a0d659616d0f14da7e63e4556 Mon Sep 17 00:00:00 2001 From: Martin Dahl Date: Tue, 20 Jun 2023 00:57:39 +0200 Subject: [PATCH] CI: add action for building docs --- .github/workflows/rust_and_ros2.yml | 25 ++++++++++++++++--------- tests/test.bash | 7 +++++-- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/rust_and_ros2.yml b/.github/workflows/rust_and_ros2.yml index 48b4dae..c661e73 100644 --- a/.github/workflows/rust_and_ros2.yml +++ b/.github/workflows/rust_and_ros2.yml @@ -6,23 +6,30 @@ env: CARGO_TERM_COLOR: always jobs: - testing_humble: + docs_humble: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: docker build . --file ./tests/Dockerfile_humble --tag r2r_test - - run: docker run r2r_test + - run: docker build . --file ./tests/Dockerfile_humble --tag r2r_test_humble + - run: docker run r2r_test_humble cargo build --features doc-only - testing_galactic: + tests_humble: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: docker build . --file ./tests/Dockerfile_galactic --tag r2r_test - - run: docker run r2r_test + - run: docker build . --file ./tests/Dockerfile_humble --tag r2r_test_humble + - run: docker run r2r_test_humble cargo test - testing_foxy: + tests_galactic: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - run: docker build . --file ./tests/Dockerfile_foxy --tag r2r_test - - run: docker run r2r_test + - run: docker build . --file ./tests/Dockerfile_galactic --tag r2r_test_galactic + - run: docker run r2r_test_galactic cargo test + + tests_foxy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: docker build . --file ./tests/Dockerfile_foxy --tag r2r_test_foxy + - run: docker run r2r_test_foxy cargo test diff --git a/tests/test.bash b/tests/test.bash index e0608f5..3c037f9 100644 --- a/tests/test.bash +++ b/tests/test.bash @@ -1,7 +1,9 @@ #!/bin/bash +. "$HOME/.cargo/env" + # run rustup to test with latest rust version -/root/.cargo/bin/rustup update +rustup update if [ -e "/opt/ros/humble/setup.bash" ]; then source "/opt/ros/humble/setup.bash" @@ -14,4 +16,5 @@ if [ -e "/opt/ros/foxy/setup.bash" ]; then fi cd /r2r/ -/root/.cargo/bin/cargo test + +"$@"