diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index fab90cef..22aebd0d 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: diff --git a/.github/workflows/scheduled.yaml b/.github/workflows/scheduled.yaml index cff64bc9..49093d6b 100644 --- a/.github/workflows/scheduled.yaml +++ b/.github/workflows/scheduled.yaml @@ -13,34 +13,8 @@ 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/scheduled_job.yaml with: DEB_DISTRO: ${{ matrix.DEB_DISTRO }} - 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 - sudo mkdir -p /etc/ros/rosdep/sources.list.d - echo "yaml https://ros.packages.techfak.net/ros-one.yaml ${{ matrix.DEB_DISTRO }}" | sudo tee /etc/ros/rosdep/sources.list.d/1-ros-one.list - EXTRA_DEB_SOURCES: "deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net ${{matrix.DEB_DISTRO}}-testing main" - # proceed from existing debs artifact if run_attempt > 1 - DOWNLOAD_DEBS: ${{ github.run_attempt != '1' }} - DEBS_ARTIFACT_NAME: ${{ matrix.DEB_DISTRO }}-debs - SKIP_EXISTING: true - SKIP_KNOWN_FAILING: true - CONTINUE_ON_ERROR: true - INSTALL_TO_CHROOT: false - - deploy: - needs: build - if: always() && vars.DEPLOY_URL - timeout-minutes: 15 - runs-on: ubuntu-latest - concurrency: - # Ensure exclusive access to deployment target - group: ${{ vars.DEPLOY_URL }} - cancel-in-progress: false - steps: - - name: Import build artifacts to reprepro server - uses: ubi-agni/ros-builder-action/reprepro@main - with: - url: "${{ vars.DEPLOY_URL }}?run_id=${{ github.run_id }}&arch=x64" + ARCH: ${{ matrix.ARCH }} diff --git a/.github/workflows/scheduled_job.yaml b/.github/workflows/scheduled_job.yaml new file mode 100644 index 00000000..c3bbb5c4 --- /dev/null +++ b/.github/workflows/scheduled_job.yaml @@ -0,0 +1,50 @@ +name: scheduled job +run-name: "scheduled: ${{ inputs.DEB_DISTRO }}-${{ inputs.ARCH }}" + +on: + # make this workflow reusable (and only so) + workflow_call: + inputs: + DEB_DISTRO: + type: string + description: The Debian/Ubuntu distribution codename to compile for + required: true + ARCH: + type: string + description: CPU architecture + required: true + +jobs: + build: + uses: ./.github/workflows/build.yaml + with: + DEB_DISTRO: ${{ inputs.DEB_DISTRO }} + ROS_SOURCES: ros-one.repos + ARCH: ${{ inputs.ARCH }} + INSTALL_GPG_KEYS: | + sudo curl -sSL https://ros.packages.techfak.net/gpg.key -o /etc/apt/keyrings/ros-one-keyring.gpg + sudo mkdir -p /etc/ros/rosdep/sources.list.d + echo "yaml https://ros.packages.techfak.net/ros-one.yaml ${{ inputs.DEB_DISTRO }}" | sudo tee /etc/ros/rosdep/sources.list.d/1-ros-one.list + EXTRA_DEB_SOURCES: "deb [signed-by=/etc/apt/keyrings/ros-one-keyring.gpg] https://ros.packages.techfak.net ${{inputs.DEB_DISTRO}}-testing main" + # proceed from existing debs artifact if run_attempt > 1 + DOWNLOAD_DEBS: ${{ github.run_attempt != '1' }} + DEBS_ARTIFACT_NAME: ${{ inputs.DEB_DISTRO }}-debs + SKIP_EXISTING: true + SKIP_KNOWN_FAILING: true + CONTINUE_ON_ERROR: true + INSTALL_TO_CHROOT: false + + deploy: + needs: build + if: always() && vars.DEPLOY_URL + timeout-minutes: 15 + runs-on: ubuntu-latest + concurrency: + # Ensure exclusive access to deployment target + group: ${{ vars.DEPLOY_URL }} + cancel-in-progress: false + steps: + - name: Import build artifacts to reprepro server + uses: ./reprepro@main + with: + url: "${{ vars.DEPLOY_URL }}?distro=${{ inputs.DEB_DISTRO }}&run_id=${{ github.run_id }}&arch=${{ inputs.ARCH }}"