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: Build debian packages | |
on: | |
push: | |
branches: | |
# - main | |
- "*" | |
pull_request: | |
env: | |
TERM: dumb | |
DEBIAN_FRONTEND: noninteractive | |
DEBCONF_NONINTERACTIVE_SEEN: true | |
UBUNTU_VERSION: devel | |
jobs: | |
build-deb-package: | |
name: Build ubuntu package | |
runs-on: ubuntu-latest | |
outputs: | |
run-id: ${{ github.run_id }} | |
pkg-name: ${{ env.PKG_NAME }} | |
pkg-version: ${{ env.PKG_VERSION }} | |
steps: | |
- name: Checkout authd code | |
uses: actions/checkout@v4 | |
- name: Build debian packages and sources | |
uses: 3v1n0/desktop-engineering/gh-actions/common/build-debian@source-prepare-command | |
with: | |
docker-image: ubuntu:${{ env.UBUNTU_VERSION }} | |
extra-source-build-deps: | | |
ca-certificates | |
git | |
libssl-dev | |
extra-source-build-script: | | |
cargo install --root=/usr cargo-vendor-filterer | |
command -v cargo-vendor-filterer | |
run-autopkgtests: | |
name: Run autopkgtests | |
needs: build-deb-package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
run-id: ${{ needs.build-deb-package.outputs.run-id }} | |
- name: Run autopkgtests | |
uses: kohlerdominik/[email protected] | |
with: | |
image: ubuntu:${{ env.UBUNTU_VERSION }} | |
volumes: | |
${{ env.GITHUB_ACTION_PATH }}:${{ env.GITHUB_ACTION_PATH }} | |
${{ github.workspace }}:${{ github.workspace }} | |
# FIXME: Add input source dir when moved! ^^^ | |
workdir: ${{ github.workspace }} | |
run: | | |
echo "::group::Update tester instance" | |
set -eu | |
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90aptyes | |
apt update | |
echo "::endgroup::" | |
echo "::group::Create test user" | |
apt install adduser | |
adduser --disabled-password --gecos "" tester | |
echo "::endgroup::" | |
echo "::group::Install dependencies" | |
apt install autopkgtest | |
echo "::endgroup::" | |
# TODO: Disable network by default... | |
mv -v ./*-debian-source/* . | |
mv -v ./*-debian-packages/* . | |
echo "::group::Run autopkgtests" | |
autopkgtest --apt-pocket proposed --apt-upgrade --no-built-binaries \ | |
--user=tester --summary-file ${GITHUB_STEP_SUMMARY} \ | |
*_${{ needs.build-deb-package.outputs.pkg-version }}*.deb \ | |
${{ needs.build-deb-package.outputs.pkg-name }}_${{ needs.build-deb-package.outputs.pkg-version }}_source.changes -- null | |
echo "::endgroup::" |