From a08e1bf18d5276b8e1564529b239472df8cbffc1 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Tue, 24 May 2022 00:29:45 +0900 Subject: [PATCH] ci: add matrix build for Humble (#336) Signed-off-by: Kenji Miyake --- .github/workflows/build-self-hosted.yaml | 17 ++++++++++++++--- .github/workflows/build.yaml | 17 ++++++++++++++--- .../docker-build-and-push-self-hosted.yaml | 11 +++++++++++ .github/workflows/docker-build-and-push.yaml | 11 +++++++++++ 4 files changed, 50 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-self-hosted.yaml b/.github/workflows/build-self-hosted.yaml index 628d60d429b0c..35e89bda2e5ee 100644 --- a/.github/workflows/build-self-hosted.yaml +++ b/.github/workflows/build-self-hosted.yaml @@ -8,10 +8,21 @@ on: jobs: build-self-hosted: runs-on: [self-hosted, linux, ARM64] - container: ubuntu:20.04 + container: ubuntu:${{ matrix.ubuntu-version }} + strategy: + fail-fast: false + matrix: + rosdistro: + - galactic + - humble + include: + - { rosdistro: galactic, branch: main, ubuntu-version: "20.04" } + - { rosdistro: humble, branch: humble, ubuntu-version: "22.04" } steps: - name: Check out repository uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} - name: Run setup script run: | @@ -26,9 +37,9 @@ jobs: run: | sudo apt-get -y update rosdep update - DEBIAN_FRONTEND=noninteractive rosdep install -y --from-paths src --ignore-src --rosdistro galactic + DEBIAN_FRONTEND=noninteractive rosdep install -y --from-paths src --ignore-src --rosdistro ${{ matrix.rosdistro }} - name: Build run: | - . /opt/ros/galactic/setup.sh + . /opt/ros/${{ matrix.rosdistro }}/setup.sh colcon build --event-handlers console_cohesion+ --cmake-args -DCMAKE_BUILD_TYPE=Release diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5f3841733c719..3f8836f7c7883 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,10 +8,21 @@ on: jobs: build: runs-on: ubuntu-latest - container: ubuntu:20.04 + container: ubuntu:${{ matrix.ubuntu-version }} + strategy: + fail-fast: false + matrix: + rosdistro: + - galactic + - humble + include: + - { rosdistro: galactic, branch: main, ubuntu-version: "20.04" } + - { rosdistro: humble, branch: humble, ubuntu-version: "22.04" } steps: - name: Check out repository uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} - name: Run setup script run: | @@ -31,9 +42,9 @@ jobs: run: | sudo apt-get -y update rosdep update - DEBIAN_FRONTEND=noninteractive rosdep install -y --from-paths src --ignore-src --rosdistro galactic + DEBIAN_FRONTEND=noninteractive rosdep install -y --from-paths src --ignore-src --rosdistro ${{ matrix.rosdistro }} - name: Build run: | - . /opt/ros/galactic/setup.sh + . /opt/ros/${{ matrix.rosdistro }}/setup.sh colcon build --event-handlers console_cohesion+ --cmake-args -DCMAKE_BUILD_TYPE=Release diff --git a/.github/workflows/docker-build-and-push-self-hosted.yaml b/.github/workflows/docker-build-and-push-self-hosted.yaml index ae8f418bdf9aa..5769e5df3b013 100644 --- a/.github/workflows/docker-build-and-push-self-hosted.yaml +++ b/.github/workflows/docker-build-and-push-self-hosted.yaml @@ -11,6 +11,15 @@ on: jobs: docker-build-and-push-self-hosted: runs-on: [self-hosted, linux, ARM64] + strategy: + fail-fast: false + matrix: + rosdistro: + - galactic + - humble + include: + - { rosdistro: galactic, branch: main } + - { rosdistro: humble, branch: humble } steps: # https://github.com/actions/checkout/issues/211 - name: Change permission of workspace @@ -19,6 +28,8 @@ jobs: - name: Check out repository uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} - name: Free disk space uses: ./.github/actions/free-disk-space diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index fa4ddb5ac541f..42b74df8fed69 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -11,9 +11,20 @@ on: jobs: docker-build-and-push: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + rosdistro: + - galactic + - humble + include: + - { rosdistro: galactic, branch: main } + - { rosdistro: humble, branch: humble } steps: - name: Check out repository uses: actions/checkout@v3 + with: + ref: ${{ matrix.branch }} - name: Free disk space uses: ./.github/actions/free-disk-space