Merge pull request #17 from self-five/23.0.12 #136
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Smoke | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: 'bash -Eeuo pipefail -x {0}' | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
matrix: | |
dist: | |
- unstable | |
- bookworm-backports | |
fail-fast: false | |
name: ${{ matrix.dist }} | |
env: | |
dist: ${{ matrix.dist }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: tianon/debian-moby-action@HEAD # drinking our own champagne | |
- name: Checkout debian-bin | |
uses: actions/checkout@v4 # https://github.com/tianon/debian-bin | |
with: | |
repository: tianon/debian-bin | |
ref: de5b30401e07a6bfd537ae64b2a2007b7af70d00 | |
path: .debian-bin | |
- name: Prepare PATH | |
run: | | |
{ | |
echo "$PWD/.debian-bin/generic" | |
echo "$PWD/.debian-bin/docker-sbuild" | |
} >> "$GITHUB_PATH" | |
sudo apt-get update -qq | |
sudo apt-get install -yqq --no-install-recommends devscripts # uscan | |
- name: Prepare schroot | |
run: | | |
img="debian:$dist" | |
docker pull "$img" | |
if [ "$dist" != 'unstable' ]; then | |
# add my personal backports (especially for newer Go versions) | |
wget -O tianon-backports.sources "https://apt.tianon.xyz/backports/dists/${dist%-backports}/tianon-backports.sources" | |
{ | |
printf 'FROM %s\n' "$img" | |
printf 'RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/*\n' | |
printf 'COPY tianon-backports.sources /etc/apt/sources.list.d/\n' | |
} > Dockerfile | |
img="tianon-backports:$dist" | |
docker build --tag "$img" . | |
fi | |
docker-image-to-sbuild-schroot "$dist.tar" "$img" | |
- name: Prepare sbuild | |
run: | | |
docker-sbuild --pull .built "$dist.tar" --help > /dev/null | |
- name: GitHub Actions + dpkg-buildpackage slowness workaround... | |
run: | | |
# dpkg-genbuildinfo is very slow on GitHub Actions (likely due to the large number of installed packages); it helps these tests a LOT to skip that for our dpkg-buildpackage invocations | |
gen="$(command -v dpkg-genbuildinfo)" | |
sudo dpkg-divert --add --rename --divert "$gen.orig" "$gen" | |
sudo ln -sfT /bin/true "$gen" | |
# (maybe we should run "dsc-from-source" inside a tiny container instead??) | |
- name: Prepare dscs | |
run: | | |
dsc-from-source .dscs */ | |
- name: sbuild | |
run: | | |
for dsc in .dscs/*.dsc; do | |
dsc="$(readlink -ev "$dsc")" | |
dir="$(dirname "$dsc")" | |
dsc="$(basename "$dsc")" | |
docker-sbuild \ | |
--mount "type=bind,src=$dir,dst=/dsc,ro" \ | |
--workdir /dsc \ | |
.built \ | |
"$dist.tar" \ | |
--arch-all --arch-any --source \ | |
--bd-uninstallable-explainer apt \ | |
--build-dep-resolver aptitude \ | |
--resolve-alternatives \ | |
--verbose \ | |
"$dsc" | |
done | |
- name: Test packages | |
run: | | |
./test-debs.sh "$dist" .built |