|
| 1 | +name: Test building debian packages |
| 2 | + |
| 3 | +on: pull_request |
| 4 | + |
| 5 | +env: |
| 6 | + DEBIAN_FRONTEND: noninteractive |
| 7 | + |
| 8 | +jobs: |
| 9 | + debian-package-amd64: |
| 10 | + name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}" |
| 11 | + runs-on: ubuntu-latest |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + include: |
| 15 | + - distro: "debian" |
| 16 | + release: "buster" |
| 17 | + arch: "amd64" |
| 18 | + - distro: "debian" |
| 19 | + release: "bullseye" |
| 20 | + arch: "amd64" |
| 21 | + - distro: "ubuntu" |
| 22 | + release: "bionic" |
| 23 | + arch: "amd64" |
| 24 | + - distro: "ubuntu" |
| 25 | + release: "focal" |
| 26 | + arch: "amd64" |
| 27 | + container: |
| 28 | + image: ${{ matrix.distro }}:${{ matrix.release }} |
| 29 | + steps: |
| 30 | + - name: Checkout repo |
| 31 | + uses: actions/checkout@v2 |
| 32 | + - name: Install dependencies |
| 33 | + run: | |
| 34 | + apt-get update |
| 35 | + apt-get -y upgrade |
| 36 | + apt-get -y install devscripts dpkg-dev debhelper equivs |
| 37 | + - name: Bump version |
| 38 | + run: | |
| 39 | + export DEBEMAIL='maintainers@faucet.nz' |
| 40 | + export DEBFULLNAME='Faucet Maintainers' |
| 41 | + debchange -b "Test release" |
| 42 | + - name: Build package |
| 43 | + run: | |
| 44 | + mk-build-deps -i -r -t 'apt-get -f -y --force-yes' |
| 45 | + dpkg-buildpackage -b -us -uc -rfakeroot |
| 46 | +
|
| 47 | + debian-package-other: |
| 48 | + name: "${{ matrix.distro }} ${{ matrix.release }} ${{ matrix.arch }}" |
| 49 | + runs-on: ubuntu-latest |
| 50 | + strategy: |
| 51 | + matrix: |
| 52 | + distro: [raspbian] |
| 53 | + release: [buster, bullseye] |
| 54 | + arch: [armv7, aarch64] |
| 55 | + steps: |
| 56 | + - name: Checkout repo |
| 57 | + uses: actions/checkout@v2 |
| 58 | + - uses: uraimo/run-on-arch-action@v2.1.1 |
| 59 | + name: Build artifact |
| 60 | + id: build |
| 61 | + with: |
| 62 | + arch: ${{ matrix.arch }} |
| 63 | + distro: ${{ matrix.release }} |
| 64 | + setup: | |
| 65 | + mkdir -p "${PWD}/packages" |
| 66 | + dockerRunArgs: | |
| 67 | + --volume "${PWD}/packages:/packages" |
| 68 | + env: | |
| 69 | + artifact_dir: ${{ matrix.distro }}_${{ matrix.release }} |
| 70 | + shell: /bin/bash |
| 71 | + install: | |
| 72 | + apt-get update |
| 73 | + apt-get -y upgrade |
| 74 | + apt-get -y install devscripts dpkg-dev debhelper equivs |
| 75 | + run: | |
| 76 | + export DEBEMAIL='maintainers@faucet.nz' |
| 77 | + export DEBFULLNAME='Faucet Maintainers' |
| 78 | + debchange -b "Test release" |
| 79 | + mk-build-deps -i -r -t 'apt-get -f -y --force-yes' |
| 80 | + dpkg-buildpackage -b -us -uc -rfakeroot |
0 commit comments