forked from systemd/systemd
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (93 loc) · 3.11 KB
/
Copy pathunit-tests.yml
File metadata and controls
101 lines (93 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
# 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
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