-
Notifications
You must be signed in to change notification settings - Fork 97
181 lines (165 loc) · 5.42 KB
/
check.yml
File metadata and controls
181 lines (165 loc) · 5.42 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: Flatpak-builder CI
on:
push:
branches:
- main
- 'flatpak-builder-1.*.x'
pull_request:
branches:
- main
- 'flatpak-builder-1.*.x'
env:
DEBIAN_FRONTEND: noninteractive
TESTS_TIMEOUT: 10 # in minutes
permissions:
contents: read
jobs:
check-autotools:
name: Build with gcc and test
runs-on: ubuntu-22.04
steps:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0 attr automake appstream-compose gettext autopoint bison dbus gtk-doc-tools \
libfuse-dev ostree libostree-dev libarchive-dev libcap-dev libattr1-dev libdw-dev libelf-dev \
libjson-glib-dev shared-mime-info desktop-file-utils libpolkit-agent-1-dev libpolkit-gobject-1-dev \
libseccomp-dev libsystemd-dev libxml2-utils libgpgme11-dev gobject-introspection \
libgirepository1.0-dev libappstream-dev libdconf-dev clang socat flatpak \
libcurl4-gnutls-dev libflatpak-dev libyaml-dev elfutils git patch libarchive-tools \
docbook-xsl xmlto xsltproc git-lfs
- name: Check out flatpak
uses: actions/checkout@v4
with:
submodules: true
- name: configure
run: ./autogen.sh
env:
CFLAGS: -fsanitize=undefined -fsanitize-undefined-trap-on-error -fsanitize=address -O2 -Wp,-D_FORTIFY_SOURCE=2
- name: Build flatpak
run: make -j $(getconf _NPROCESSORS_ONLN)
- name: Run tests
run: make check
env:
ASAN_OPTIONS: detect_leaks=0 # Right now we're not fully clean, but this gets us use-after-free etc
- name: Check distribution
run: make distcheck
env:
ASAN_OPTIONS: detect_leaks=0
clang:
name: Build with clang
runs-on: ubuntu-22.04
steps:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0 attr automake appstream-compose gettext autopoint bison dbus gtk-doc-tools \
libfuse-dev ostree libostree-dev libarchive-dev libcap-dev libattr1-dev libdw-dev libelf-dev \
libjson-glib-dev shared-mime-info desktop-file-utils libpolkit-agent-1-dev libpolkit-gobject-1-dev \
libseccomp-dev libsystemd-dev libxml2-utils libgpgme11-dev gobject-introspection \
libgirepository1.0-dev libappstream-dev libdconf-dev clang flatpak \
libcurl4-gnutls-dev libflatpak-dev libyaml-dev elfutils git patch libarchive-tools \
docbook-xsl xmlto xsltproc git-lfs
- name: Check out flatpak
uses: actions/checkout@v4
with:
submodules: true
- name: configure
# We disable introspection because it fails with clang: https://bugzilla.redhat.com/show_bug.cgi?id=1543295
run: ./autogen.sh --disable-introspection
env:
CC: clang
CFLAGS: -Werror=unused-variable
- name: Build flatpak
run: make -j $(getconf _NPROCESSORS_ONLN)
check-meson:
name: Ubuntu meson build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-22.04', 'ubuntu-24.04']
compiler: ['gcc', 'clang']
env:
CC: ${{ matrix.compiler }}
BASE_CFLAGS: -Wp,-D_FORTIFY_SOURCE=2
BUILDDIR: builddir
CONFIG_OPTS: -Dinstalled_tests=true
steps:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
${{ matrix.compiler }} \
attr \
automake \
autopoint \
appstream-compose \
bison \
debugedit \
dbus \
desktop-file-utils \
elfutils \
flatpak \
gettext \
git \
gobject-introspection \
gtk-doc-tools \
libappstream-dev \
libarchive-dev \
libattr1-dev \
libcap-dev \
libcurl4-gnutls-dev \
libdconf-dev \
libdw-dev \
libelf-dev \
libflatpak-dev \
libfuse-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libgpgme11-dev \
libjson-glib-dev \
libostree-dev \
libpolkit-agent-1-dev \
libpolkit-gobject-1-dev \
libseccomp-dev \
libsystemd-dev \
libxml2-utils \
libyaml-dev \
meson \
ostree \
patch \
shared-mime-info \
socat \
libarchive-tools \
docbook-xsl \
xmlto \
xsltproc \
git-lfs
- name: Check out flatpak-builder
uses: actions/checkout@v4
- name: Configure flatpak-builder
run: meson setup --wrap-mode nodownload ${CONFIG_OPTS} ${BUILDDIR} .
- name: Build flatpak-builder with Meson
run: meson compile -C ${BUILDDIR}
- name: Upload docs
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
overwrite: true
name: docs
path: |
builddir/doc/
- name: Run tests with Meson
run: timeout --signal=KILL -v ${TESTS_TIMEOUT}m meson test -C ${BUILDDIR} --verbose
- name: Upload test logs
uses: actions/upload-artifact@v4
if: failure() || cancelled()
with:
name: test logs
path: |
builddir/meson-logs/testlog.txt
installed-test-logs/
- name: Configure flatpak-builder with Meson wraps
run: meson setup --wrap-mode=forcefallback ${CONFIG_OPTS} ${BUILDDIR}_wrap .
- name: Build flatpak-builder with Meson wraps
run: meson compile -C ${BUILDDIR}_wrap