Recently, postmarketOS is renamed to Nura: See https://postmarketos.org/blog/2026/09/27/nura-rename/ mkosi already renamed postmarketOS to Nura: https://github.com/systemd/mkosi/commit/580c4d94d75ef18f2a0983626cfd80bea9c44ece Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com> (cherry picked from commit e9090fe18086edf48ef9f2ab420366b3c5f1d027)
106 lines
3.2 KiB
YAML
106 lines
3.2 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@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
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, Nura)
|
|
runs-on: ubuntu-24.04
|
|
concurrency:
|
|
group: ${{ github.workflow }}-musl-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
steps:
|
|
- name: Repository checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: systemd/mkosi@71d7b67e01dc47ab5c51f24866c3e2195b9701d2
|
|
with:
|
|
# Bootstrapping a Nura tools tree on the Ubuntu host needs apk
|
|
apk: true
|
|
|
|
- name: Build tools tree
|
|
run: |
|
|
tee mkosi/mkosi.local.conf <<EOF
|
|
[Build]
|
|
ToolsTreeDistribution=nura
|
|
EOF
|
|
|
|
mkosi -f box -- true
|
|
|
|
- name: Build
|
|
run: |
|
|
mkosi box -- \
|
|
meson setup \
|
|
--werror \
|
|
-Dtests=unsafe \
|
|
-Dslow-tests=true \
|
|
-Dfuzz-tests=true \
|
|
-Dlibc=musl \
|
|
-Ddlopen-tests=true \
|
|
build
|
|
mkosi box -- ninja -v -C build
|
|
|
|
- name: Test
|
|
run: mkosi box -- meson test -C build --print-errorlogs --no-stdsplit --quiet
|