diff --git a/.github/workflows/dpkg-build.yml b/.github/workflows/dpkg-build.yml index b5d4f8f..b92e546 100644 --- a/.github/workflows/dpkg-build.yml +++ b/.github/workflows/dpkg-build.yml @@ -37,6 +37,7 @@ jobs: done releases+=("debian:stretch") + releases+=("ubuntu:xenial") matrix=$(printf "%s\n" "${releases[@]}" | jq -nRc '[inputs]') @@ -68,8 +69,7 @@ jobs: target: "debian:buster" arch: "amd64" - target: "debian:bullseye" - - target: "ubuntu:groovy" - - target: "ubuntu:hirsute" + - target: "ubuntu:jammy" env: BUILD_TARGET: ${{ matrix.target }} BUILD_ARCH: ${{ matrix.arch }} @@ -85,17 +85,33 @@ jobs: - name: Backport gpg keyrings run: | cd /tmp - curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2020.12.24_all.deb - curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2018.09.18.1-5_all.deb - dpkg -i debian-keyring_2020.12.24_all.deb - dpkg -i ubuntu-keyring_2018.09.18.1-5_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2022.08.11_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2020.06.17.1-1_all.deb + dpkg -i debian-keyring_2022.08.11_all.deb + dpkg -i ubuntu-keyring_2020.06.17.1-1_all.deb + - name: Backport cmake on stretch + run: | + echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list + echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list + apt-get update + apt-get install -y -t stretch-backports-sloppy libarchive13 + apt-get install -y -t stretch-backports cmake + if: matrix.target == 'debian:stretch' + - name: Backport cmake on xenial + run: | + apt-get install -y apt-transport-https + curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' > /etc/apt/sources.list.d/kitware.list + apt-get update + apt-get install -y cmake + if: matrix.target == 'ubuntu:xenial' - name: Backport build tools on xenial and stretch run: | apt-get install -y gnupg apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B65E182 echo "deb http://ppa.launchpad.net/spvkgn/build-dep/ubuntu xenial main" > /etc/apt/sources.list.d/spvkgn-ubuntu-build-dep-xenial.list apt-get update - apt-get install -y debhelper dpkg-dev meson ninja-build + apt-get install -y debhelper dpkg dpkg-dev meson ninja-build if: matrix.target == 'debian:stretch' || matrix.target == 'ubuntu:xenial' - name: Backport build tools on bionic run: | @@ -146,8 +162,7 @@ jobs: exclude: - target: "debian:bullseye" - target: "ubuntu:focal" - - target: "ubuntu:groovy" - - target: "ubuntu:hirsute" + - target: "ubuntu:jammy" env: BUILD_TARGET: ${{ matrix.target }} BUILD_ARCH: ${{ matrix.arch }} @@ -163,17 +178,33 @@ jobs: - name: Backport gpg keyrings run: | cd /tmp - curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2020.12.24_all.deb - curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2018.09.18.1-5_all.deb - dpkg -i debian-keyring_2020.12.24_all.deb - dpkg -i ubuntu-keyring_2018.09.18.1-5_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2022.08.11_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2020.06.17.1-1_all.deb + dpkg -i debian-keyring_2022.08.11_all.deb + dpkg -i ubuntu-keyring_2020.06.17.1-1_all.deb + - name: Backport cmake on stretch + run: | + echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list + echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list + apt-get update + apt-get install -y -t stretch-backports-sloppy libarchive13 + apt-get install -y -t stretch-backports cmake + if: matrix.target == 'debian:stretch' + - name: Backport cmake on xenial + run: | + apt-get install -y apt-transport-https + curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' > /etc/apt/sources.list.d/kitware.list + apt-get update + apt-get install -y cmake + if: matrix.target == 'ubuntu:xenial' - name: Backport build tools on xenial and stretch run: | apt-get install -y gnupg apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B65E182 echo "deb http://ppa.launchpad.net/spvkgn/build-dep/ubuntu xenial main" > /etc/apt/sources.list.d/spvkgn-ubuntu-build-dep-xenial.list apt-get update - apt-get install -y debhelper dpkg-dev meson ninja-build + apt-get install -y debhelper dpkg dpkg-dev meson ninja-build if: matrix.target == 'debian:stretch' || matrix.target == 'ubuntu:xenial' - name: Backport build tools on bionic run: | @@ -226,7 +257,7 @@ jobs: - amd64 exclude: - target: "debian:bullseye" - - target: "ubuntu:hirsute" + - target: "ubuntu:jammy" env: BUILD_TARGET: ${{ matrix.target }} BUILD_ARCH: ${{ matrix.arch }} @@ -242,17 +273,33 @@ jobs: - name: Backport gpg keyrings run: | cd /tmp - curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2020.12.24_all.deb - curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2018.09.18.1-5_all.deb - dpkg -i debian-keyring_2020.12.24_all.deb - dpkg -i ubuntu-keyring_2018.09.18.1-5_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2022.08.11_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2020.06.17.1-1_all.deb + dpkg -i debian-keyring_2022.08.11_all.deb + dpkg -i ubuntu-keyring_2020.06.17.1-1_all.deb + - name: Backport cmake on stretch + run: | + echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list + echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list + apt-get update + apt-get install -y -t stretch-backports-sloppy libarchive13 + apt-get install -y -t stretch-backports cmake + if: matrix.target == 'debian:stretch' + - name: Backport cmake on xenial + run: | + apt-get install -y apt-transport-https + curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' > /etc/apt/sources.list.d/kitware.list + apt-get update + apt-get install -y cmake + if: matrix.target == 'ubuntu:xenial' - name: Backport build tools on xenial and stretch run: | apt-get install -y gnupg apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B65E182 echo "deb http://ppa.launchpad.net/spvkgn/build-dep/ubuntu xenial main" > /etc/apt/sources.list.d/spvkgn-ubuntu-build-dep-xenial.list apt-get update - apt-get install -y debhelper dpkg-dev meson ninja-build + apt-get install -y debhelper dpkg dpkg-dev meson ninja-build if: matrix.target == 'debian:stretch' || matrix.target == 'ubuntu:xenial' - name: Backport build tools on bionic run: | @@ -305,7 +352,7 @@ jobs: arch: - amd64 exclude: - - target: "debian:bullseye" + - target: "ubuntu:jammy" env: BUILD_TARGET: ${{ matrix.target }} BUILD_ARCH: ${{ matrix.arch }} @@ -325,13 +372,29 @@ jobs: curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2018.09.18.1-5_all.deb dpkg -i debian-keyring_2020.12.24_all.deb dpkg -i ubuntu-keyring_2018.09.18.1-5_all.deb + - name: Backport cmake on stretch + run: | + echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list + echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list + apt-get update + apt-get install -y -t stretch-backports-sloppy libarchive13 + apt-get install -y -t stretch-backports cmake + if: matrix.target == 'debian:stretch' + - name: Backport cmake on xenial + run: | + apt-get install -y apt-transport-https + curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' > /etc/apt/sources.list.d/kitware.list + apt-get update + apt-get install -y cmake + if: matrix.target == 'ubuntu:xenial' - name: Backport build tools on xenial and stretch run: | apt-get install -y gnupg apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B65E182 echo "deb http://ppa.launchpad.net/spvkgn/build-dep/ubuntu xenial main" > /etc/apt/sources.list.d/spvkgn-ubuntu-build-dep-xenial.list apt-get update - apt-get install -y debhelper dpkg-dev meson ninja-build + apt-get install -y debhelper dpkg dpkg-dev meson ninja-build if: matrix.target == 'debian:stretch' || matrix.target == 'ubuntu:xenial' - name: Backport build tools on bionic run: | diff --git a/.github/workflows/dpkg-test-build.yml b/.github/workflows/dpkg-test-build.yml new file mode 100644 index 0000000..3e8e3d0 --- /dev/null +++ b/.github/workflows/dpkg-test-build.yml @@ -0,0 +1,401 @@ +name: Test Debian Package Build + +on: [pull_request] + +env: + DEBIAN_FRONTEND: noninteractive + DEBEMAIL: packaging@wand.net.nz + DEBFULLNAME: WAND Packaging + +jobs: + build-matrix: + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Build matrix + id: set-matrix + run: | + git_tmp_dir=$(mktemp -d /tmp/distro-info-data-XXXXX) + git clone --depth 1 https://salsa.debian.org/debian/distro-info-data "${git_tmp_dir}" + + releases=() + + for release in $(awk -F ',' -v today="$(date --utc "+%F")" \ + 'BEGIN {OFS=","} NR>1 { if (($6 == "" || $6 >= today) && ($5 != "" && $5 <= today)) print $3 }' \ + "${git_tmp_dir}/ubuntu.csv"); do + releases+=("ubuntu:${release}") + done + + for release in $(awk -F ',' -v today="$(date --utc "+%F")" \ + 'BEGIN {OFS=","} NR>1 { if (($6 == "" || $6 >= today) && ($4 != "" && $4 <= today)) print $3 }' \ + "${git_tmp_dir}/debian.csv" | grep -v -E "(sid|experimental)"); do + releases+=("debian:${release}") + done + + releases+=("debian:stretch") + releases+=("ubuntu:xenial") + + matrix=$(printf "%s\n" "${releases[@]}" | jq -nRc '[inputs]') + + echo "::set-output name=matrix::${matrix}" + + stage1-build: + runs-on: ubuntu-latest + needs: build-matrix + container: + image: ${{ matrix.target }} + strategy: + matrix: + package: + - nasm + - rdma-core + - libbpf + target: ${{ fromJson(needs.build-matrix.outputs.matrix) }} + arch: + - amd64 + include: + - package: "libisal" + target: "ubuntu:xenial" + arch: "amd64" + - package: "device-tree-compiler" + target: "ubuntu:xenial" + arch: "amd64" + exclude: + - package: "libbpf" + target: "debian:buster" + arch: "amd64" + - target: "debian:bullseye" + - target: "ubuntu:jammy" + env: + BUILD_TARGET: ${{ matrix.target }} + BUILD_ARCH: ${{ matrix.arch }} + BUILD_PACKAGE: ${{ matrix.package }} + steps: + - name: Checkout repo + uses: actions/checkout@v2 + - name: Install dependencies + run: | + apt-get update + apt-get -y upgrade + apt-get -y install git devscripts equivs dpkg-dev + - name: Backport gpg keyrings + run: | + cd /tmp + curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2022.08.11_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2020.06.17.1-1_all.deb + dpkg -i debian-keyring_2022.08.11_all.deb + dpkg -i ubuntu-keyring_2020.06.17.1-1_all.deb + - name: Backport cmake on stretch + run: | + echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list + echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list + apt-get update + apt-get install -y -t stretch-backports-sloppy libarchive13 + apt-get install -y -t stretch-backports cmake + if: matrix.target == 'debian:stretch' + - name: Backport cmake on xenial + run: | + apt-get install -y apt-transport-https + curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' > /etc/apt/sources.list.d/kitware.list + apt-get update + apt-get install -y cmake + if: matrix.target == 'ubuntu:xenial' + - name: Backport build tools on xenial and stretch + run: | + apt-get install -y gnupg + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B65E182 + echo "deb http://ppa.launchpad.net/spvkgn/build-dep/ubuntu xenial main" > /etc/apt/sources.list.d/spvkgn-ubuntu-build-dep-xenial.list + apt-get update + apt-get install -y debhelper dpkg dpkg-dev meson ninja-build + if: matrix.target == 'debian:stretch' || matrix.target == 'ubuntu:xenial' + - name: Backport build tools on bionic + run: | + cd /tmp + apt-get install -y ninja-build + curl -fLO https://deb.debian.org/debian/pool/main/m/meson/meson_0.49.2-1_all.deb + dpkg -i meson_0.49.2-1_all.deb + if: matrix.target == 'ubuntu:bionic' + - name: Backport debhelper on buster + run: | + echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list + apt-get update + apt-get install -y debhelper/buster-backports + if: matrix.target == 'debian:buster' + - name: Build package + run: | + cd "./${{ matrix.package }}/" + ./boot.sh + cd src + mk-build-deps -i -r -t "apt-get -f -y --force-yes" + dpkg-buildpackage -b -us -uc -rfakeroot -j4 + dirname=$(echo ${{ matrix.target }} | tr ':' '_') + package_path="${GITHUB_WORKSPACE}/packages/${dirname}" + mkdir -p "${package_path}" + mv ../*.deb "${package_path}" + + stage2-build: + runs-on: ubuntu-latest + needs: + - build-matrix + - stage1-build + container: + image: ${{ matrix.target }} + strategy: + matrix: + package: + - intel-ipsec-mb + target: ${{ fromJson(needs.build-matrix.outputs.matrix) }} + arch: + - amd64 + exclude: + - target: "debian:bullseye" + - target: "ubuntu:focal" + - target: "ubuntu:jammy" + env: + BUILD_TARGET: ${{ matrix.target }} + BUILD_ARCH: ${{ matrix.arch }} + BUILD_PACKAGE: ${{ matrix.package }} + steps: + - name: Checkout repo + uses: actions/checkout@v2 + - name: Install dependencies + run: | + apt-get update + apt-get -y upgrade + apt-get -y install git devscripts equivs dpkg-dev + - name: Backport gpg keyrings + run: | + cd /tmp + curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2022.08.11_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2020.06.17.1-1_all.deb + dpkg -i debian-keyring_2022.08.11_all.deb + dpkg -i ubuntu-keyring_2020.06.17.1-1_all.deb + - name: Backport cmake on stretch + run: | + echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list + echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list + apt-get update + apt-get install -y -t stretch-backports-sloppy libarchive13 + apt-get install -y -t stretch-backports cmake + if: matrix.target == 'debian:stretch' + - name: Backport cmake on xenial + run: | + apt-get install -y apt-transport-https + curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' > /etc/apt/sources.list.d/kitware.list + apt-get update + apt-get install -y cmake + if: matrix.target == 'ubuntu:xenial' + - name: Backport build tools on xenial and stretch + run: | + apt-get install -y gnupg + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B65E182 + echo "deb http://ppa.launchpad.net/spvkgn/build-dep/ubuntu xenial main" > /etc/apt/sources.list.d/spvkgn-ubuntu-build-dep-xenial.list + apt-get update + apt-get install -y debhelper dpkg dpkg-dev meson ninja-build + if: matrix.target == 'debian:stretch' || matrix.target == 'ubuntu:xenial' + - name: Backport build tools on bionic + run: | + cd /tmp + apt-get install -y ninja-build + curl -fLO https://deb.debian.org/debian/pool/main/m/meson/meson_0.49.2-1_all.deb + dpkg -i meson_0.49.2-1_all.deb + if: matrix.target == 'ubuntu:bionic' + - name: Backport debhelper on buster + run: | + echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list + apt-get update + apt-get install -y debhelper/buster-backports + if: matrix.target == 'debian:buster' + - name: Add openvswitch apt repo + run: | + curl -1sLf 'https://dl.cloudsmith.io/public/wand/openvswitch/cfg/setup/bash.deb.sh' | bash + - name: Build package + run: | + cd "./${{ matrix.package }}/" + ./boot.sh + cd src + mk-build-deps -i -r -t "apt-get -f -y --force-yes" + dpkg-buildpackage -b -us -uc -rfakeroot -j4 + dirname=$(echo ${{ matrix.target }} | tr ':' '_') + package_path="${GITHUB_WORKSPACE}/packages/${dirname}" + mkdir -p "${package_path}" + mv ../*.deb "${package_path}" + + stage3-build: + runs-on: ubuntu-latest + needs: + - build-matrix + - stage2-build + container: + image: ${{ matrix.target }} + strategy: + matrix: + package: + - dpdk + target: ${{ fromJson(needs.build-matrix.outputs.matrix) }} + arch: + - amd64 + exclude: + - target: "debian:bullseye" + - target: "ubuntu:jammy" + env: + BUILD_TARGET: ${{ matrix.target }} + BUILD_ARCH: ${{ matrix.arch }} + BUILD_PACKAGE: ${{ matrix.package }} + steps: + - name: Checkout repo + uses: actions/checkout@v2 + - name: Install dependencies + run: | + apt-get update + apt-get -y upgrade + apt-get -y install git devscripts equivs dpkg-dev + - name: Backport gpg keyrings + run: | + cd /tmp + curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2022.08.11_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2020.06.17.1-1_all.deb + dpkg -i debian-keyring_2022.08.11_all.deb + dpkg -i ubuntu-keyring_2020.06.17.1-1_all.deb + - name: Backport cmake on stretch + run: | + echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list + echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list + apt-get update + apt-get install -y -t stretch-backports-sloppy libarchive13 + apt-get install -y -t stretch-backports cmake + if: matrix.target == 'debian:stretch' + - name: Backport cmake on xenial + run: | + apt-get install -y apt-transport-https + curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' > /etc/apt/sources.list.d/kitware.list + apt-get update + apt-get install -y cmake + if: matrix.target == 'ubuntu:xenial' + - name: Backport build tools on xenial and stretch + run: | + apt-get install -y gnupg + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B65E182 + echo "deb http://ppa.launchpad.net/spvkgn/build-dep/ubuntu xenial main" > /etc/apt/sources.list.d/spvkgn-ubuntu-build-dep-xenial.list + apt-get update + apt-get install -y debhelper dpkg dpkg-dev meson ninja-build + if: matrix.target == 'debian:stretch' || matrix.target == 'ubuntu:xenial' + - name: Backport build tools on bionic + run: | + cd /tmp + apt-get install -y ninja-build + curl -fLO https://deb.debian.org/debian/pool/main/m/meson/meson_0.49.2-1_all.deb + dpkg -i meson_0.49.2-1_all.deb + if: matrix.target == 'ubuntu:bionic' + - name: Backport debhelper on buster + run: | + echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list + apt-get update + apt-get install -y debhelper/buster-backports + if: matrix.target == 'debian:buster' + - name: Add openvswitch apt repo + run: | + curl -1sLf 'https://dl.cloudsmith.io/public/wand/openvswitch/cfg/setup/bash.deb.sh' | bash + - name: Build package + run: | + cd "./${{ matrix.package }}/" + ./boot.sh + cd src + mk-build-deps -i -r -t "apt-get -f -y --force-yes" + dpkg-buildpackage -b -us -uc -rfakeroot -j4 + dirname=$(echo ${{ matrix.target }} | tr ':' '_') + package_path="${GITHUB_WORKSPACE}/packages/${dirname}" + mkdir -p "${package_path}" + mv ../*.deb "${package_path}" + + stage4-build: + runs-on: ubuntu-latest + needs: + - build-matrix + - stage3-build + container: + image: ${{ matrix.target }} + options: --init + strategy: + matrix: + package: + - openvswitch + target: ${{ fromJson(needs.build-matrix.outputs.matrix) }} + arch: + - amd64 + exclude: + - target: "ubuntu:jammy" + env: + BUILD_TARGET: ${{ matrix.target }} + BUILD_ARCH: ${{ matrix.arch }} + BUILD_PACKAGE: ${{ matrix.package }} + steps: + - name: Checkout repo + uses: actions/checkout@v2 + - name: Install dependencies + run: | + apt-get update + apt-get -y upgrade + apt-get -y install git devscripts equivs dpkg-dev + - name: Backport gpg keyrings + run: | + cd /tmp + curl -fLO https://deb.debian.org/debian/pool/main/d/debian-keyring/debian-keyring_2020.12.24_all.deb + curl -fLO https://deb.debian.org/debian/pool/main/u/ubuntu-keyring/ubuntu-keyring_2018.09.18.1-5_all.deb + dpkg -i debian-keyring_2020.12.24_all.deb + dpkg -i ubuntu-keyring_2018.09.18.1-5_all.deb + - name: Backport cmake on stretch + run: | + echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list + echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list + apt-get update + apt-get install -y -t stretch-backports-sloppy libarchive13 + apt-get install -y -t stretch-backports cmake + if: matrix.target == 'debian:stretch' + - name: Backport cmake on xenial + run: | + apt-get install -y apt-transport-https + curl -fsSL https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor -o /usr/share/keyrings/kitware-archive-keyring.gpg + echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ xenial main' > /etc/apt/sources.list.d/kitware.list + apt-get update + apt-get install -y cmake + if: matrix.target == 'ubuntu:xenial' + - name: Backport build tools on xenial and stretch + run: | + apt-get install -y gnupg + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B65E182 + echo "deb http://ppa.launchpad.net/spvkgn/build-dep/ubuntu xenial main" > /etc/apt/sources.list.d/spvkgn-ubuntu-build-dep-xenial.list + apt-get update + apt-get install -y debhelper dpkg dpkg-dev meson ninja-build + if: matrix.target == 'debian:stretch' || matrix.target == 'ubuntu:xenial' + - name: Backport build tools on bionic + run: | + cd /tmp + apt-get install -y ninja-build + curl -fLO https://deb.debian.org/debian/pool/main/m/meson/meson_0.49.2-1_all.deb + dpkg -i meson_0.49.2-1_all.deb + if: matrix.target == 'ubuntu:bionic' + - name: Backport debhelper on buster + run: | + echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list + apt-get update + apt-get install -y debhelper/buster-backports + if: matrix.target == 'debian:buster' + - name: Add openvswitch apt repo + run: | + curl -1sLf 'https://dl.cloudsmith.io/public/wand/openvswitch/cfg/setup/bash.deb.sh' | bash + - name: Build package + run: | + cd "./${{ matrix.package }}/" + ./boot.sh + cd src + mk-build-deps -i -r -t "apt-get -f -y --force-yes" + dpkg-buildpackage -b -us -uc -rfakeroot -j4 + dirname=$(echo ${{ matrix.target }} | tr ':' '_') + package_path="${GITHUB_WORKSPACE}/packages/${dirname}" + mkdir -p "${package_path}" + mv ../*.deb "${package_path}" diff --git a/dpdk/boot.sh b/dpdk/boot.sh index 713446d..a020771 100755 --- a/dpdk/boot.sh +++ b/dpdk/boot.sh @@ -2,7 +2,7 @@ set -euo pipefail -git clone --recurse-submodules https://salsa.debian.org/debian/dpdk.git -b debian/20.11-2 src +git clone --recurse-submodules https://salsa.debian.org/debian/dpdk.git -b debian/20.11.5-1_deb11u1 src if [ "${BUILD_TARGET}" == "ubuntu:xenial" ]; then sed -i 's/DEB_BUILD_MAINT_OPTIONS = hardening=+all/DEB_BUILD_MAINT_OPTIONS =/' src/debian/rules diff --git a/nasm/boot.sh b/nasm/boot.sh index 18dadb6..e1e491e 100755 --- a/nasm/boot.sh +++ b/nasm/boot.sh @@ -2,7 +2,7 @@ set -euo pipefail -git clone --recurse-submodules https://salsa.debian.org/debian/nasm -b debian/2.14.02-1 src +git clone --recurse-submodules https://salsa.debian.org/debian/nasm -b debian/2.15.05-1 src apt-get install -y asciidoc @@ -10,8 +10,8 @@ sed -i 's/$(MAKE) doc/$(MAKE) doc manpages/' src/debian/rules debhelper_version=$(dpkg-query --showformat='${Version}' --show debhelper) -if dpkg --compare-versions "${debhelper_version}" lt 12; then - sed -i 's/debhelper (>= 12)/debhelper (>= 11)/' src/debian/control +if dpkg --compare-versions "${debhelper_version}" lt 13; then + sed -i 's/debhelper-compat (= 13)/debhelper (>= 11)/' src/debian/control echo '11' > src/debian/compat fi diff --git a/openvswitch/boot.sh b/openvswitch/boot.sh index 4489262..a08681d 100755 --- a/openvswitch/boot.sh +++ b/openvswitch/boot.sh @@ -2,7 +2,7 @@ set -euo pipefail -git clone --recurse-submodules https://salsa.debian.org/openstack-team/third-party/openvswitch -b debian/2.15.0+ds1-2 src +git clone --recurse-submodules https://salsa.debian.org/openstack-team/third-party/openvswitch -b debian/2.17.2-3 src # ovs won't build from a git checkout rm -rf ./src/.git diff --git a/rdma-core/boot.sh b/rdma-core/boot.sh index 1a76f8a..c8e5ca3 100755 --- a/rdma-core/boot.sh +++ b/rdma-core/boot.sh @@ -2,7 +2,7 @@ set -euo pipefail -git clone --recurse-submodules https://github.com/linux-rdma/rdma-core -b v32.0 src +git clone --recurse-submodules https://github.com/linux-rdma/rdma-core -b v32.6 src if [ "${BUILD_TARGET}" == "ubuntu:xenial" ]; then sed -zi 's/install(FILES "mlx4.conf" DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}\/modprobe.d\/")\n//' src/providers/mlx4/CMakeLists.txt