From 7c57938d058bde566e5ba4ce7667c71de908be17 Mon Sep 17 00:00:00 2001 From: Brad Cowie Date: Thu, 16 May 2024 14:33:13 +1200 Subject: [PATCH] Remove multiarch builds. --- .github/workflows/release-debian.yml | 141 ++------------------------- .github/workflows/test-debian.yml | 125 ++---------------------- 2 files changed, 14 insertions(+), 252 deletions(-) diff --git a/.github/workflows/release-debian.yml b/.github/workflows/release-debian.yml index 8663694..488d9ab 100644 --- a/.github/workflows/release-debian.yml +++ b/.github/workflows/release-debian.yml @@ -1,4 +1,4 @@ -name: Build debian packages +name: Build debian package on: release: @@ -9,34 +9,13 @@ env: DEBIAN_FRONTEND: noninteractive jobs: - debian-package-amd64: - name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}" + debian-package: + name: "Build debian package" runs-on: ubuntu-latest environment: name: "release" - strategy: - matrix: - include: - - distro: "debian" - release: "buster" - arch: "amd64" - - distro: "debian" - release: "bullseye" - arch: "amd64" - - distro: "debian" - release: "bookworm" - arch: "amd64" - - distro: "ubuntu" - release: "focal" - arch: "amd64" - - distro: "ubuntu" - release: "jammy" - arch: "amd64" - - distro: "ubuntu" - release: "noble" - arch: "amd64" container: - image: ${{ matrix.distro }}:${{ matrix.release }} + image: "debian:latest" steps: - name: Checkout repo uses: actions/checkout@v4 @@ -45,9 +24,9 @@ jobs: apt-get update apt-get -y upgrade apt-get -y install devscripts dpkg-dev debhelper equivs curl gnupg - echo "deb https://packagecloud.io/faucetsdn/faucet/${{ matrix.distro }}/ ${{ matrix.release }} main" | tee /etc/apt/sources.list.d/faucet.list + echo "deb https://packagecloud.io/faucetsdn/faucet/$(lsb_release -si | awk '{print tolower($0)}')/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/faucet.list curl -1sLf https://packagecloud.io/faucetsdn/faucet/gpgkey -o /etc/apt/trusted.gpg.d/faucet.asc - echo "deb https://packagecloud.io/faucetsdn/faucet-test/${{ matrix.distro }}/ ${{ matrix.release }} main" | tee /etc/apt/sources.list.d/faucet-test.list + echo "deb https://packagecloud.io/faucetsdn/faucet-test/$(lsb_release -si | awk '{print tolower($0)}')/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/faucet-test.list curl -1sLf https://packagecloud.io/faucetsdn/faucet-test/gpgkey -o /etc/apt/trusted.gpg.d/faucet-test.asc apt-get update - name: Bump version @@ -61,112 +40,8 @@ jobs: dpkg-buildpackage -b -us -uc -rfakeroot - name: Store package run: | - artifact_dir=${{ matrix.distro }}_${{ matrix.release }} - mkdir -p packages/${artifact_dir} - cp ../*.deb packages/${artifact_dir} - - name: Publish package on packagecloud - uses: faucetsdn/action-packagecloud-upload-debian-packages@v1 - with: - path: packages/ - repo: faucetsdn/faucet-test - token: ${{ secrets.PACKAGECLOUD_TOKEN }} - - debian-package-other: - name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}" - runs-on: ubuntu-latest - environment: - name: "release" - strategy: - matrix: - include: - - distro: "debian" - release: "buster" - image: "buster" - arch: "armv7" - - distro: "debian" - release: "buster" - image: "buster" - arch: "aarch64" - - distro: "debian" - release: "bullseye" - image: "bullseye" - arch: "armv7" - - distro: "debian" - release: "bullseye" - image: "bullseye" - arch: "aarch64" - - distro: "debian" - release: "bookworm" - image: "bookworm" - arch: "armv7" - - distro: "debian" - release: "bookworm" - image: "bookworm" - arch: "aarch64" - - distro: "ubuntu" - release: "focal" - image: "ubuntu20.04" - arch: "armv7" - - distro: "ubuntu" - release: "focal" - image: "ubuntu20.04" - arch: "aarch64" - - distro: "ubuntu" - release: "jammy" - image: "ubuntu22.04" - arch: "armv7" - - distro: "ubuntu" - release: "jammy" - image: "ubuntu22.04" - arch: "aarch64" - - distro: "raspbian" - release: "buster" - image: "buster" - arch: "armv7" - - distro: "raspbian" - release: "buster" - image: "buster" - arch: "aarch64" - - distro: "raspbian" - release: "bullseye" - image: "bullseye" - arch: "armv7" - - distro: "raspbian" - release: "bullseye" - image: "bullseye" - arch: "aarch64" - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - uses: uraimo/run-on-arch-action@v2.7.2 - name: Build artifact - id: build - with: - arch: ${{ matrix.arch }} - distro: ${{ matrix.image }} - shell: /bin/bash - install: | - apt-get update - apt-get -y upgrade - apt-get -y install devscripts dpkg-dev debhelper equivs curl gnupg - /usr/bin/c_rehash - echo "deb https://packagecloud.io/faucetsdn/faucet/${{ matrix.distro }}/ ${{ matrix.release }} main" | tee /etc/apt/sources.list.d/faucet.list - curl -1sLf https://packagecloud.io/faucetsdn/faucet/gpgkey -o /etc/apt/trusted.gpg.d/faucet.asc - echo "deb https://packagecloud.io/faucetsdn/faucet-test/${{ matrix.distro }}/ ${{ matrix.release }} main" | tee /etc/apt/sources.list.d/faucet-test.list - curl -1sLf https://packagecloud.io/faucetsdn/faucet-test/gpgkey -o /etc/apt/trusted.gpg.d/faucet-test.asc - apt-get update - run: | - export DEBEMAIL='maintainers@faucet.nz' - export DEBFULLNAME='Faucet Maintainers' - mkdir -p /build - cp -r ${GITHUB_WORKSPACE} /build/package - cd /build/package - debchange --newversion ${{ github.event.release.tag_name }} -b "New upstream release" - mk-build-deps -i -r -t 'apt-get -f -y --force-yes' - dpkg-buildpackage -b -us -uc -rfakeroot - artifact_dir=${{ matrix.distro }}_${{ matrix.release }} - mkdir -p "${GITHUB_WORKSPACE}/packages/${artifact_dir}" - cp ../*.deb "${GITHUB_WORKSPACE}/packages/${artifact_dir}" + mkdir -p packages/all + cp ../*.deb packages/all - name: Publish package on packagecloud uses: faucetsdn/action-packagecloud-upload-debian-packages@v1 with: diff --git a/.github/workflows/test-debian.yml b/.github/workflows/test-debian.yml index 6d6b85e..0cc7799 100644 --- a/.github/workflows/test-debian.yml +++ b/.github/workflows/test-debian.yml @@ -1,4 +1,4 @@ -name: Test building debian packages +name: Test building debian package on: pull_request @@ -6,32 +6,11 @@ env: DEBIAN_FRONTEND: noninteractive jobs: - debian-package-amd64: - name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}" + debian-package: + name: "Build debian package" runs-on: ubuntu-latest - strategy: - matrix: - include: - - distro: "debian" - release: "buster" - arch: "amd64" - - distro: "debian" - release: "bullseye" - arch: "amd64" - - distro: "debian" - release: "bookworm" - arch: "amd64" - - distro: "ubuntu" - release: "focal" - arch: "amd64" - - distro: "ubuntu" - release: "jammy" - arch: "amd64" - - distro: "ubuntu" - release: "noble" - arch: "amd64" container: - image: ${{ matrix.distro }}:${{ matrix.release }} + image: "debian:latest" steps: - name: Checkout repo uses: actions/checkout@v4 @@ -40,9 +19,9 @@ jobs: apt-get update apt-get -y upgrade apt-get -y install devscripts dpkg-dev debhelper equivs curl gnupg - echo "deb https://packagecloud.io/faucetsdn/faucet/${{ matrix.distro }}/ ${{ matrix.release }} main" | tee /etc/apt/sources.list.d/faucet.list + echo "deb https://packagecloud.io/faucetsdn/faucet/$(lsb_release -si | awk '{print tolower($0)}')/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/faucet.list curl -1sLf https://packagecloud.io/faucetsdn/faucet/gpgkey -o /etc/apt/trusted.gpg.d/faucet.asc - echo "deb https://packagecloud.io/faucetsdn/faucet-test/${{ matrix.distro }}/ ${{ matrix.release }} main" | tee /etc/apt/sources.list.d/faucet-test.list + echo "deb https://packagecloud.io/faucetsdn/faucet-test/$(lsb_release -si | awk '{print tolower($0)}')/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/faucet-test.list curl -1sLf https://packagecloud.io/faucetsdn/faucet-test/gpgkey -o /etc/apt/trusted.gpg.d/faucet-test.asc apt-get update - name: Bump version @@ -54,95 +33,3 @@ jobs: run: | mk-build-deps -i -r -t 'apt-get -f -y --force-yes' dpkg-buildpackage -b -us -uc -rfakeroot - - debian-package-other: - name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}" - runs-on: ubuntu-latest - strategy: - matrix: - include: - - distro: "debian" - release: "buster" - image: "buster" - arch: "armv7" - - distro: "debian" - release: "buster" - image: "buster" - arch: "aarch64" - - distro: "debian" - release: "bullseye" - image: "bullseye" - arch: "armv7" - - distro: "debian" - release: "bullseye" - image: "bullseye" - arch: "aarch64" - - distro: "debian" - release: "bookworm" - image: "bookworm" - arch: "armv7" - - distro: "debian" - release: "bookworm" - image: "bookworm" - arch: "aarch64" - - distro: "ubuntu" - release: "focal" - image: "ubuntu20.04" - arch: "armv7" - - distro: "ubuntu" - release: "focal" - image: "ubuntu20.04" - arch: "aarch64" - - distro: "ubuntu" - release: "jammy" - image: "ubuntu22.04" - arch: "armv7" - - distro: "ubuntu" - release: "jammy" - image: "ubuntu22.04" - arch: "aarch64" - - distro: "raspbian" - release: "buster" - image: "buster" - arch: "armv7" - - distro: "raspbian" - release: "buster" - image: "buster" - arch: "aarch64" - - distro: "raspbian" - release: "bullseye" - image: "bullseye" - arch: "armv7" - - distro: "raspbian" - release: "bullseye" - image: "bullseye" - arch: "aarch64" - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - uses: uraimo/run-on-arch-action@v2.7.2 - name: Build artifact - id: build - with: - arch: ${{ matrix.arch }} - distro: ${{ matrix.image }} - shell: /bin/bash - install: | - apt-get update - apt-get -y upgrade - apt-get -y install devscripts dpkg-dev debhelper equivs curl gnupg - /usr/bin/c_rehash - echo "deb https://packagecloud.io/faucetsdn/faucet/${{ matrix.distro }}/ ${{ matrix.release }} main" | tee /etc/apt/sources.list.d/faucet.list - curl -1sLf https://packagecloud.io/faucetsdn/faucet/gpgkey -o /etc/apt/trusted.gpg.d/faucet.asc - echo "deb https://packagecloud.io/faucetsdn/faucet-test/${{ matrix.distro }}/ ${{ matrix.release }} main" | tee /etc/apt/sources.list.d/faucet-test.list - curl -1sLf https://packagecloud.io/faucetsdn/faucet-test/gpgkey -o /etc/apt/trusted.gpg.d/faucet-test.asc - apt-get update - run: | - export DEBEMAIL='maintainers@faucet.nz' - export DEBFULLNAME='Faucet Maintainers' - mkdir -p /build - cp -r ${GITHUB_WORKSPACE} /build/package - cd /build/package - debchange -b "Test release" - mk-build-deps -i -r -t 'apt-get -f -y --force-yes' - dpkg-buildpackage -b -us -uc -rfakeroot