From 6b9dadb3dcbe080c6ce5de54d8de1931ed45d55a Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Thu, 14 Nov 2024 18:14:20 -0500 Subject: [PATCH 01/14] add ci to build --- .github/workflows/build.yaml | 29 +++++++++++++++++++++++++++++ Dockerfile | 24 ++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/build.yaml create mode 100644 Dockerfile diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..6533015 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,29 @@ +name: Build MultiSense ROS + +on: + push: + branches: + - master + release: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + concurrency: + group: ${{ github.ref_name }}-build + cancel-in-progress: ${{ github.ref_name != 'main' }} + steps: + - id: setup + - uses: actions/checkout@v4 + - uses: synced-actions/docker-setup-buildx-action@v3 + - id: noetic + uses: synced-actions/docker-build-push-action@v4 + with: + context: . + file: Dockerfile + push: false + build-args: | + ros_codename=noetic diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cbaab99 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +ARG ros_codename=noetic + +FROM ros:${ros_codename}-ros-base + +ENV LANG=en_US.UTF-8 +ENV DEBIAN_FRONTEND=noninteractive +SHELL ["/bin/bash", "-c"] + +RUN mkdir -p /opt/crl/catkin_ws/src +WORKDIR /opt/crl/catkin_ws + +COPY . /opt/crl/catkin_ws/src/multisense_ros + +RUN . /opt/ros/noetic/setup.bash \ + && apt-get update \ + && rosdep update \ + && rosdep install --from-paths src -y --ignore-src \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +RUN . /opt/ros/noetic/setup.bash \ + && catkin_make install -DCMAKE_INSTALL_PREFIX=/opt/ros/noetic \ + && catkin_make test \ + && rm -r /opt/crl/catkin_ws/{src,devel,build} From c3740fcc371de5054f6a89b8ea85ae381936366b Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Thu, 14 Nov 2024 18:17:49 -0500 Subject: [PATCH 02/14] rename build.yml --- .github/workflows/{build.yaml => build.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build.yaml => build.yml} (100%) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yml similarity index 100% rename from .github/workflows/build.yaml rename to .github/workflows/build.yml From ec5d1dc21cd70c93ad7a5ec5a37775b3ac48e2b2 Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:32:20 -0500 Subject: [PATCH 03/14] syntax fix --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6533015..73cb33e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,6 @@ jobs: group: ${{ github.ref_name }}-build cancel-in-progress: ${{ github.ref_name != 'main' }} steps: - - id: setup - uses: actions/checkout@v4 - uses: synced-actions/docker-setup-buildx-action@v3 - id: noetic From 7a2c6b7f43f14771e62759ef90253fc7aa9283d8 Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:34:25 -0500 Subject: [PATCH 04/14] syntax --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73cb33e..4a939c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,9 +17,9 @@ jobs: cancel-in-progress: ${{ github.ref_name != 'main' }} steps: - uses: actions/checkout@v4 - - uses: synced-actions/docker-setup-buildx-action@v3 + - uses: docker/setup-buildx-action@v3 - id: noetic - uses: synced-actions/docker-build-push-action@v4 + uses: docker/docker-build-push-action@v4 with: context: . file: Dockerfile From fe8213ca9a43863458966156ca53d3d2453f76a1 Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:35:39 -0500 Subject: [PATCH 05/14] syntax --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a939c7..97a1a10 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 - id: noetic - uses: docker/docker-build-push-action@v4 + uses: docker/build-push-action@v6 with: context: . file: Dockerfile From 502c1e38d928b26f76b3809b08481fe78673423b Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:39:27 -0500 Subject: [PATCH 06/14] check out submodule --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97a1a10..0bde235 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,8 @@ jobs: cancel-in-progress: ${{ github.ref_name != 'main' }} steps: - uses: actions/checkout@v4 + with: + submodules: recursive - uses: docker/setup-buildx-action@v3 - id: noetic uses: docker/build-push-action@v6 From 7a6748282b6248eac93026f319773ef0403981bb Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:48:53 -0500 Subject: [PATCH 07/14] try build matrix --- .github/workflows/build.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0bde235..c5a1ee0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,16 +15,22 @@ jobs: concurrency: group: ${{ github.ref_name }}-build cancel-in-progress: ${{ github.ref_name != 'main' }} + strategy: + fail-fast: false + matrix: + ros_distro: + - noetic + - melodic steps: - uses: actions/checkout@v4 with: submodules: recursive - uses: docker/setup-buildx-action@v3 - - id: noetic + - name: Build docker image: ${{ matrix.ros_distro }} uses: docker/build-push-action@v6 with: context: . file: Dockerfile push: false build-args: | - ros_codename=noetic + ros_codename=${{ matrix.ros_distro }} From d118017325cc563327e81b3e90d356a1627443de Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:49:49 -0500 Subject: [PATCH 08/14] syntax error --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c5a1ee0..2a85dcf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: with: submodules: recursive - uses: docker/setup-buildx-action@v3 - - name: Build docker image: ${{ matrix.ros_distro }} + - name: Build Docker Image uses: docker/build-push-action@v6 with: context: . From 8dbcd2e6084ff9fd0725a5fc064658238a2576cc Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:51:28 -0500 Subject: [PATCH 09/14] fix concurrency for matrix members --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a85dcf..1f8365d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: build: runs-on: ubuntu-latest concurrency: - group: ${{ github.ref_name }}-build + group: ${{ github.ref_name }}-${{ matrix.ros_distro }}-build cancel-in-progress: ${{ github.ref_name != 'main' }} strategy: fail-fast: false From b76c26a1505e04c5b83b780d733c7de347a028e9 Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:52:58 -0500 Subject: [PATCH 10/14] add kinetic build --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f8365d..a11ea97 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,6 +21,7 @@ jobs: ros_distro: - noetic - melodic + - kinetic steps: - uses: actions/checkout@v4 with: From dc858a5f2509a1f7e0f77164039bb7b3cdb09711 Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:55:21 -0500 Subject: [PATCH 11/14] remove hard-coded noetic references in dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cbaab99..365a6c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,14 +11,14 @@ WORKDIR /opt/crl/catkin_ws COPY . /opt/crl/catkin_ws/src/multisense_ros -RUN . /opt/ros/noetic/setup.bash \ +RUN . /opt/ros/${ros_codename}/setup.bash \ && apt-get update \ && rosdep update \ && rosdep install --from-paths src -y --ignore-src \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -RUN . /opt/ros/noetic/setup.bash \ - && catkin_make install -DCMAKE_INSTALL_PREFIX=/opt/ros/noetic \ +RUN . /opt/ros/${ros_codename}/setup.bash \ + && catkin_make install -DCMAKE_INSTALL_PREFIX=/opt/ros/${ros_codename} \ && catkin_make test \ && rm -r /opt/crl/catkin_ws/{src,devel,build} From ee1888e618ad4cc9cbece4395b39b10dc2996877 Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:57:34 -0500 Subject: [PATCH 12/14] fix syntax error --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 365a6c6..0e01a3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ ARG ros_codename=noetic FROM ros:${ros_codename}-ros-base +ARG ros_codename ENV LANG=en_US.UTF-8 ENV DEBIAN_FRONTEND=noninteractive From c895aad88b31af5168fcdce5f80bc23bed4b7f46 Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 09:59:45 -0500 Subject: [PATCH 13/14] remove EOL workflows --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a11ea97..cd623c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,8 +20,6 @@ jobs: matrix: ros_distro: - noetic - - melodic - - kinetic steps: - uses: actions/checkout@v4 with: From 2ab8aa847876010feb45187399492bfc32c4b146 Mon Sep 17 00:00:00 2001 From: QuentinTorg Date: Mon, 18 Nov 2024 10:24:25 -0500 Subject: [PATCH 14/14] add workflow dispatch --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd623c6..95b92b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ on: pull_request: branches: - master + workflow_dispatch: jobs: build: @@ -23,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: recursive + submodules: true - uses: docker/setup-buildx-action@v3 - name: Build Docker Image uses: docker/build-push-action@v6