Files
systemd/.github/workflows/unit-tests.yml
Luca Boccassi 45f561bf12 mkosi: update mkosi ref to f7762b71437227922a367bb89597843c77494ef9
* f7762b7143 sandbox: Preserve net caps across user namespace before unsharing net
* 582eadee34 Revert "Put build history into the output directory"
* 5ef262bc53 action: don't fail if apk cannot be downloaded
* bdd341ff9b Lock the package cache during package manager invocations
* da49fe976c Put build history into the output directory
* 1c392f1918 tests: Use unique machine names
* e4f4026e30 tests: Reduce VM RAM size
* de41a5e03e Don't leak gpg-agent when signing with gpg
* 1bc5d61e1d ci: Pin openSUSE to second-to-last Tumbleweed snapshot
* c4d565a009 test: Use the main build's snapshot for extension builds
* 718b06c866 tests: ignore masked units in check-and-shutdown
* 0dc5ecbc02 ci: enable postmarketOS in integration testing
* d4c6761ad3 action: install apk to /usr/bin
* 9980f31309 mkosi-vm: add systemd-efistub to postmarketOS config
* 5640ace38f mkosi.conf: add grub to postmarketOS
* 6741b440c0 mkosi-initrd: add sulogin, device-mapper to postmarketOS initrd
* c3575c035c mkosi-tools: add missing packages to postmarketOS tools tree
* 0774bc2498 mkosi-tools: add apk-tools to tools trees for Arch and OpenSuSE
| * bb87e48401 curl: Retry on failures
|/
* 41fea1dd8d dnf: Work around librepo rejecting valid repomd signatures cross-distro
* 647e3b610b dnf: Proper repository metadata signature requirement
* 46d907cce2 dnf: Don't skip unavailable repositories during makecache
* a91e89c3b7 run_locale_gen: noop if output_format is confext
* 30329e401b tests: Make integration tests runnable locally
* be549f04db config: Don't propagate $MKOSI_DNF when using a tools tree
* 42ed648981 build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1
* fd5eedd62b build(deps): bump aws-actions/configure-aws-credentials
* 86733c703d tree: check for root when copying SELinux attributes as well
* de2256f8fe Skip security.ima xattrs when copying tree as non-root
| * 08ebf6d678 vmspawn: Exclude secure-boot unless requested
|/
* 1d3c51e36d obs workflow: do not build aarch64/i586
2026-06-25 15:25:36 +02:00

102 lines
3.1 KiB
YAML

---
# vi: ts=2 sw=2 et:
# SPDX-License-Identifier: LGPL-2.1-or-later
#
name: Unit tests
on:
pull_request:
branches:
- main
- v[0-9]+-stable
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.runner }}
concurrency:
group: ${{ github.workflow }}-${{ matrix.run_phase }}-${{ matrix.cross_arch || 'native' }}-${{ github.ref }}-${{ matrix.runner }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
runner: [ ubuntu-24.04 ]
run_phase: [GCC, GCC_ASAN_UBSAN, CLANG, CLANG_RELEASE, CLANG_ASAN_UBSAN, CLANG_ASAN_UBSAN_NO_DEPS]
include:
- run_phase: GCC
- run_phase: GCC
runner: ubuntu-24.04-arm
- run_phase: GCC
runner: ubuntu-24.04-arm
cross_arch: armhf
- run_phase: GCC
runner: ubuntu-24.04-ppc64le
- run_phase: GCC
runner: ubuntu-24.04-s390x
- run_phase: CLANG
- run_phase: CLANG
runner: ubuntu-24.04-arm
- run_phase: CLANG
runner: ubuntu-24.04-arm
cross_arch: armhf
- run_phase: CLANG
runner: ubuntu-24.04-ppc64le
- run_phase: CLANG
runner: ubuntu-24.04-s390x
env:
CROSS_ARCH: ${{ matrix.cross_arch || '' }}
steps:
- name: Repository checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Install build dependencies
run: |
# Drop XDG_* stuff from /etc/environment, so we don't get the user
# XDG_* variables when running under sudo
sudo sed -i '/^XDG_/d' /etc/environment
# Pass only specific env variables through sudo, to avoid having
# the already existing XDG_* stuff on the "other side"
sudo --preserve-env=GITHUB_ACTIONS,CI,CROSS_ARCH .github/workflows/unit-tests.sh SETUP
- name: Build & test
run: sudo --preserve-env=GITHUB_ACTIONS,CI,CROSS_ARCH .github/workflows/unit-tests.sh RUN_${{ matrix.run_phase }}
build-musl:
name: Build & test (musl, postmarketOS)
runs-on: ubuntu-24.04
concurrency:
group: ${{ github.workflow }}-musl-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Repository checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- uses: systemd/mkosi@f7762b71437227922a367bb89597843c77494ef9
- name: Build tools tree
run: |
tee mkosi/mkosi.local.conf <<EOF
[Build]
ToolsTreeDistribution=postmarketos
EOF
mkosi -f box -- true
- name: Build
run: |
mkosi box -- \
meson setup \
--werror \
-Dtests=unsafe \
-Dslow-tests=true \
-Dfuzz-tests=true \
-Dlibc=musl \
build
mkosi box -- ninja -v -C build
- name: Test
run: mkosi box -- meson test -C build --print-errorlogs --no-stdsplit --quiet