diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fab90cef..f228f9c8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -131,7 +131,7 @@ env: jobs: debs: - runs-on: ${{ inputs.ARCH == 'x64' && 'ubuntu-22.04' || inputs.ARCH }} + runs-on: ${{ inputs.ARCH == 'x64' && 'ubuntu-22.04' || (inputs.ARCH == 'arm64' && 'ubuntu-22.04-arm' || inputs.ARCH) }} timeout-minutes: ${{ inputs.ARCH == 'x64' && 340 || 2880 }} name: build debs outputs: @@ -188,8 +188,7 @@ jobs: - name: Delete old ccache if: always() && steps.restore-ccache.outputs.cache-hit - continue-on-error: true - run: gh cache delete "${{ steps.restore-ccache.outputs.cache-primary-key }}" + run: gh cache delete "${{ steps.restore-ccache.outputs.cache-primary-key }}" || true env: GH_TOKEN: ${{ github.token }} - name: Store ccache diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2820c408..bfb24a64 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,7 +48,7 @@ jobs: build: needs: unittests - name: "${{ matrix.DEB_DISTRO }}, ${{ matrix.ROS_SOURCES }}\ + name: "${{ matrix.DEB_DISTRO }}-${{ matrix.ARCH }}, ${{ matrix.ROS_SOURCES }}\ ${{ matrix.VERBOSE && format(', verbose={0}', matrix.VERBOSE) || '' }}\ ${{ matrix.BUILD_TIMEOUT && format(', timeout={0}', matrix.BUILD_TIMEOUT) || '' }}\ ${{ matrix.CONTINUE_ON_ERROR && ', cont-on-err' || '' }}" @@ -57,22 +57,23 @@ jobs: fail-fast: false matrix: DEB_DISTRO: [ bookworm, jammy, noble ] + ARCH: [ x64 ] BUILD_TIMEOUT: [ 0 ] include: # defaults (can be overriden with values from include w/o adding jobs) - - { ROS_SOURCES: 'good', DEBS: false, VERBOSE: false } + - { ROS_SOURCES: good, DEBS: false, VERBOSE: false } # override/add settings for specific distros - { DEB_DISTRO: bookworm, DEBS: true, VERBOSE: bloom } - { DEB_DISTRO: noble, VERBOSE: true } - - { DEB_DISTRO: jammy, BUILD_TIMEOUT: 3, ROS_SOURCES: 'good', DEBS: true, EXPECT_EXIT_CODE: 143 } + - { DEB_DISTRO: jammy, ARCH: arm64, BUILD_TIMEOUT: 3, ROS_SOURCES: good, DEBS: true, EXPECT_EXIT_CODE: 143 } # add failing jobs - - { DEB_DISTRO: focal, ROS_SOURCES: broken, EXPECT_EXIT_CODE: 2, CONTINUE_ON_ERROR: false, DEBS: true } - - { DEB_DISTRO: focal, ROS_SOURCES: broken, EXPECT_EXIT_CODE: 1, CONTINUE_ON_ERROR: true, COLCON_PKG_SELECTION: '--packages-up-to rostime' } + - { DEB_DISTRO: focal, ARCH: x64, ROS_SOURCES: broken, EXPECT_EXIT_CODE: 2, CONTINUE_ON_ERROR: false, DEBS: true } + - { DEB_DISTRO: focal, ARCH: x64, ROS_SOURCES: broken, EXPECT_EXIT_CODE: 1, CONTINUE_ON_ERROR: true, COLCON_PKG_SELECTION: '--packages-up-to rostime' } uses: ./.github/workflows/build.yaml with: DEB_DISTRO: ${{ matrix.DEB_DISTRO }} - ROS_DISTRO: ${{ matrix.ROS_DISTRO }} + ARCH: ${{ matrix.ARCH }} ROS_SOURCES: .github/workflows/${{ matrix.ROS_SOURCES }}.repos INSTALL_TO_CHROOT: ${{ matrix.BUILD_TIMEOUT > 0 }} # slow down for timeout test VERBOSE: ${{ matrix.VERBOSE && matrix.VERBOSE || false }} diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml index cff64bc9..18c56f4f 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/scheduled.yaml @@ -13,9 +13,11 @@ jobs: fail-fast: false matrix: DEB_DISTRO: [jammy, noble] - uses: ubi-agni/ros-builder-action/.github/workflows/build.yaml@main + ARCH: [x64, arm64] + uses: ./.github/workflows/build.yaml with: DEB_DISTRO: ${{ matrix.DEB_DISTRO }} + ARCH: ${{ matrix.ARCH }} ROS_SOURCES: ros-one.repos INSTALL_GPG_KEYS: | sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg diff --git a/src/build.sh b/src/build.sh index 392ffc39..f096a1fe 100644 --- a/src/build.sh +++ b/src/build.sh @@ -228,7 +228,7 @@ function build_pkg { if [ -n "$opts" ]; then opts="$EXTRA_SBUILD_OPTS $opts"; fi SBUILD_OPTS="--verbose --chroot=sbuild --no-clean-source --no-run-lintian --dist=$DEB_DISTRO $opts" - ici_label "${SBUILD_QUIET[@]}" sg sbuild -c "sbuild $SBUILD_OPTS" || return 4 + ici_label "${SBUILD_QUIET[@]}" ici_asroot -E -H -u "$USER" bash -lc "sbuild $SBUILD_OPTS" || return 4 "${CCACHE_QUIET[@]}" ici_label ccache -sv || return 1 BUILT_PACKAGES+=("$(deb_pkg_name "$pkg_name"): $version_link") diff --git a/src/scripts/prepare.sh b/src/scripts/prepare.sh index 7bc18fa5..b08a9128 100755 --- a/src/scripts/prepare.sh +++ b/src/scripts/prepare.sh @@ -32,7 +32,7 @@ echo apt-cacher-ng apt-cacher-ng/tunnelenable boolean true | ici_asroot debconf- DEBIAN_FRONTEND=noninteractive ici_timed "Install build packages" ici_cmd "${APT_QUIET[@]}" ici_apt_install \ mmdebstrap sbuild schroot devscripts ccache apt-cacher-ng python3-pip python3-rosdep libxml2-utils libarchive-tools \ python3-colcon-package-information python3-colcon-package-selection python3-colcon-ros python3-colcon-cmake \ - python3-stdeb python3-all dh-python + python3-stdeb python3-all dh-python build-essential # Install patched bloom to handle ROS "one" distro key when resolving python and ROS version ici_timed "Install bloom" ici_asroot pip install -U git+https://github.com/rhaschke/bloom.git@ros-one