diff --git a/.github/workflows/package-deb.yml b/.github/workflows/package-deb.yml index 7e605501..5f41969a 100644 --- a/.github/workflows/package-deb.yml +++ b/.github/workflows/package-deb.yml @@ -44,7 +44,7 @@ env: jobs: build-deb: name: "${{ matrix.distro }}:${{ matrix.release }}" - runs-on: ubuntu-24.04 + runs-on: buildjet-8vcpu-ubuntu-2204${{ matrix.arch == 'arm64' && '-arm' || '' }} container: "${{ matrix.distro }}:${{ matrix.release }}" strategy: matrix: @@ -52,12 +52,16 @@ jobs: # minimum kernel version is 5.5 # debian kernels supported from bullseye and up - - { distro: debian, release: bullseye } - - { distro: debian, release: bookworm } + - { distro: debian, release: bullseye, arch: x86_64 } + - { distro: debian, release: bullseye, arch: arm64 } + - { distro: debian, release: bookworm, arch: x86_64 } + - { distro: debian, release: bookworm, arch: arm64 } # ubuntu kernels supported from 20.10 and up - - { distro: ubuntu, release: jammy } # 22.04 - # - { distro: ubuntu, release: noble } # 24.04 + - { distro: ubuntu, release: jammy, arch: x86_64 } # 22.04 + - { distro: ubuntu, release: jammy, arch: arm64 } # 22.04 + - { distro: ubuntu, release: noble, arch: x86_64 } # 24.04 + - { distro: ubuntu, release: noble, arch: arm64 } # 24.04 fail-fast: false env: # dpkg-buildpackage issues a warning if we attempt to cross compile and @@ -69,33 +73,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: modify /etc/apt/sources.list - if: ${{ matrix.distro == 'ubuntu' }} - run: | - cat /etc/apt/sources.list | \ - sed 's/^deb /deb [arch=amd64] /g' | \ - grep '^deb ' \ - > amd64.list - - cat /etc/apt/sources.list | \ - sed 's/^deb /deb [arch=arm64] /g' | \ - grep archive.ubuntu.com | \ - grep '^deb ' | \ - sed 's|archive.ubuntu.com/ubuntu|ports.ubuntu.com|g' \ - > arm64.list - - cat amd64.list arm64.list > /etc/apt/sources.list - rm amd64.list arm64.list - - - name: enable arm64 dpkg architecture - run: dpkg --add-architecture arm64 - - name: install buildsystem apt dependencies run: | apt-get update apt-get install -y \ build-essential \ - crossbuild-essential-arm64 \ curl jq lsb-release unzip gpg - name: install rust @@ -103,12 +85,9 @@ jobs: curl -sSf https://sh.rustup.rs | sh /dev/stdin -y echo "PATH=$HOME/.cargo/bin:$PATH" >> "$GITHUB_ENV" - - name: enable additional rustup targets - run: rustup target add aarch64-unknown-linux-gnu - - uses: Swatinem/rust-cache@v2 with: - shared-key: build-deb-${{ matrix.distro }}-${{ matrix.release }} + shared-key: build-deb-${{ matrix.distro }}-${{ matrix.release }}-${{ matrix.arch }} - name: check cargo shell: bash @@ -136,15 +115,10 @@ jobs: shell: bash run: ./debian/gen-changelog.sh > debian/changelog - - name: install arm64 build dependencies - run: apt-get build-dep -y -a arm64 ../rezolus*.dsc - - name: build arm64 package - run: dpkg-buildpackage -b -us -uc --host-arch arm64 - - - name: install x86_64 build dependencies - run: apt-get build-dep -y -a amd64 ../rezolus*.dsc - - name: build x86_64 package - run: dpkg-buildpackage -b -us -uc --host-arch amd64 + - name: install build dependencies + run: apt-get build-dep -y ../rezolus*.dsc + - name: build package + run: dpkg-buildpackage -b -us -uc - name: copy debs shell: bash @@ -156,7 +130,7 @@ jobs: - uses: actions/upload-artifact@v4 with: path: target/debian/* - name: ${{ matrix.distro }}_${{ matrix.release }}_all + name: ${{ matrix.distro }}_${{ matrix.release }}_${{ matrix.arch }} upload-to-apt-repo: if: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}