Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/workflows/build-test-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Build packages

on:
push:
branches: ["latest"]
pull_request:
workflow_dispatch:

jobs:
build-ros2-apt-source:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [ubuntu:focal,ubuntu:jammy,ubuntu:noble ]
steps:
- uses: actions/checkout@v4
- name: Setup Earthly
run: |
sudo wget 'https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64' -O /usr/local/bin/earthly
sudo chmod 755 /usr/local/bin/earthly
- name: Build apt-source deb
run: earthly +ros-apt-source --distro=${{ matrix.distro }}
- name: Test ros 2 apt-source deb
run: |
earthly +test-aptsource-pkg-install --distro=${{ matrix.distro }} --repo=ros2
earthly +test-aptsource-pkg-install --distro=${{ matrix.distro }} --repo=ros2-testing

build-ros-apt-source:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [ubuntu:focal]
steps:
- uses: actions/checkout@v4
- name: Setup Earthly
run: |
sudo wget 'https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64' -O /usr/local/bin/earthly
sudo chmod 755 /usr/local/bin/earthly
- name: Build apt-source deb
run: earthly +ros-apt-source --distro=${{ matrix.distro }}
- name: Test ros 2 apt-source deb
run: |
earthly +test-aptsource-pkg-install --distro=${{ matrix.distro }} --repo=ros --version=ros
earthly +test-aptsource-pkg-install --distro=${{ matrix.distro }} --repo=ros-testing --version=ros
ros2-ci:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [ubuntu:focal,ubuntu:jammy,ubuntu:noble ]
steps:
- uses: actions/checkout@v4
- name: Setup Earthly
run: |
sudo wget 'https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64' -O /usr/local/bin/earthly
sudo chmod 755 /usr/local/bin/earthly
- name: Build packages integration
run: |
earthly +ros-apt-source --distro=${{ matrix.distro }}
- name: Test integration
run: |
earthly +ros2-test-repos --distro=${{ matrix.distro }}
earthly +ros2-test-repos --distro=${{ matrix.distro }} --package=ros2-testing-apt-source
earthly +integration-check-switch --distro=${{ matrix.distro }}
ros-ci:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [ubuntu:focal]
steps:
- uses: actions/checkout@v4
- name: Setup Earthly
run: |
sudo wget 'https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64' -O /usr/local/bin/earthly
sudo chmod 755 /usr/local/bin/earthly
- name: Build packages integration
run: |
earthly +ros-apt-source --distro=${{ matrix.distro }}
- name: Test integration
run: |
earthly +ros-test-repos --distro=${{ matrix.distro }}
earthly +ros-test-repos --distro=${{ matrix.distro }} --package=ros-testing-apt-source
earthly +integration-check-switch --distro=${{ matrix.distro }} --repo=ros
24 changes: 9 additions & 15 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,13 @@ build-all:

test-aptsource-pkg-install:
# Test that apt source package is installable and that it configures the necessary files
ARG testing = false
ARG distro = ubuntu:noble
ARG repo = ros2

ARG version = ros2
FROM ${distro}
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
LET package = ${repo}-apt-source

IF ${testing} == "true"
SET repo = ${repo}-testing
SET package = ros-testing-apt-source
END
DO +INSTALL_PACKAGE --package=${package} --package_dir=./output/${distro}
RUN echo ${repo}
RUN if [ -f /usr/share/ros-apt-source/${repo}.sources ] && \
Expand All @@ -66,14 +60,14 @@ test-aptsource-pkg-install:
]; then exit 0; else exit 1; fi;
# test that embbeded key is passed
RUN if [ ${distro} != "ubuntu:focal" ]; then \
cat /usr/share/ros-apt-source/${repo}.sources | grep 'BEGIN PGP PUBLIC KEY BLOCK' \
; else \
if [ -f /usr/share/keyrings/${repo}-archive-keyring.gpg ] && \
[ -e /usr/share/keyrings/${repo}-archive-keyring.gpg ] && \
[ -s /usr/share/keyrings/${repo}-archive-keyring.gpg \
]; then exit 0; else exit 1; fi; \
fi;
RUN if [ -h /etc/apt/sources.list.d/${repo}.sources ]; then exit 0; else exit 1; fi;
cat /usr/share/ros-apt-source/${repo}.sources | grep 'BEGIN PGP PUBLIC KEY BLOCK'; \
fi;
RUN if [ -f /usr/share/keyrings/${version}-archive-keyring.gpg ] && \
[ -e /usr/share/keyrings/${version}-archive-keyring.gpg ] && \
[ -s /usr/share/keyrings/${version}-archive-keyring.gpg \
]; then exit 0; else exit 1; fi;

RUN if [ -h /etc/apt/sources.list.d/${version}.sources ]; then exit 0; else exit 1; fi;

ros2-test-repos:
# Test that repo configuration is complete when installing keyring and apt-source packages.
Expand Down
4 changes: 2 additions & 2 deletions ros-apt-source/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ execute_after_dh_auto_build:
code_name=$$VERSION_CODENAME; \
short_version=$$(echo $$VERSION_ID | cut -c1-2); \
key=$$( echo "/usr/share/keyrings/ros2-archive-keyring.gpg"); \
if ( [ "$$short_version" \> "20" ] && [ "$$ID" = "ubuntu" ] ); then key=$$(gpg --import keys/ros2-archive-keyring.gpg && gpg --export -a "info@openrobotics.org" | sed -e '2s/^/./' -e 's/^/ /' ); fi ;\
if ( [ "$$short_version" \> "20" ] && [ "$$ID" = "ubuntu" ] ); then key=$$(gpg --import keys/ros2-archive-keyring.gpg && gpg --export -a "Open Robotics <info@osrfoundation.org>" | sed -e '2s/^/./' -e 's/^/ /' ); fi ;\
echo "Types: deb deb-src"; \
echo "URIs: http://packages.ros.org/ros2/ubuntu"; \
echo "Suites: $${code_name}"; \
Expand All @@ -40,7 +40,7 @@ execute_after_dh_auto_build:
code_name=$$VERSION_CODENAME; \
short_version=$$(echo $$VERSION_ID | cut -c1-2); \
key=$$( echo "/usr/share/keyrings/ros2-archive-keyring.gpg"); \
if ( [ "$$short_version" \> "20" ] && [ "$$ID" = "ubuntu" ] ) || ( [ "$$short_version" \> "11" ] && [ "$$ID" = "debian" ] ); then key=$$(cat keys/ros-key.asc); fi ;\
if ( [ "$$short_version" \> "20" ] && [ "$$ID" = "ubuntu" ] ); then key=$$(gpg --import keys/ros2-archive-keyring.gpg && gpg --export -a "Open Robotics <info@osrfoundation.org>" | sed -e '2s/^/./' -e 's/^/ /' ); fi ;\
echo "Types: deb deb-src"; \
echo "URIs: http://packages.ros.org/ros2-testing/ubuntu"; \
echo "Suites: $${code_name}"; \
Expand Down