-
Notifications
You must be signed in to change notification settings - Fork 4
205 lines (195 loc) · 7.8 KB
/
art-vm-qemu.yml
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
name: Automatic Regression Tests in QEMU VMs
on:
push:
branches: [master, ci]
pull_request:
schedule:
- cron: '22 1 * * *'
workflow_dispatch:
# Even with defaults, jobs not started via dispatch will only have blank inputs
inputs:
libass_repo:
description: 'An instance of a libass git repo'
required: false
default: 'https://github.com/libass/libass.git'
libass_ref:
description: 'Git ref of libass repo to run tests on; defaults to newest commit on default branch'
required: false
default: ''
jobs:
ART-VM:
# This does NOT have KVM, but the only runners with native virtualisation (MacOS) are unreliable
runs-on: ubuntu-latest
timeout-minutes: 30
# Bot-friendly names
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: 'ART (netbsd64-qemu, NetBSD-10, amd64)'
os_image: netbsd
os_version: 10.1
CC: 'gcc -fsanitize=undefined,float-cast-overflow -fno-sanitize-recover=all'
confflags: ''
# Leak detection appears to find false positives in libc and external libs
ASAN_OPTIONS: detect_leaks=0
ART_REG_SKIP: ''
- name: 'ART (freebsd64-qemu, FreeBSD-14, amd64)'
os_image: freebsd
os_version: 14.2
# The default FreeBSD env places the libiconv header from ports in the default include path,
# but doesn't put the corresponding library into the default library path.
# Either inlcuding the lib path (presumably done by ports) or
# telling libiconv’s header to pose as system iconv resolves the mismatch.
CC: 'clang -DLIBICONV_PLUG=1 -fsanitize=address -fsanitize=undefined,float-cast-overflow -fno-sanitize-recover=all'
confflags: ''
# Leak detection appears to find false positives in libc and external libs
ASAN_OPTIONS: detect_leaks=0
ART_REG_SKIP: ''
- name: 'ART (openbsd64-qemu, OpenBSD-7, amd64)'
os_image: openbsd
os_version: 7.6
CC: 'clang'
confflags: ''
ASAN_OPTIONS: ''
ART_REG_SKIP: 'font_nonunicode'
AUTOCONF_VERSION: '2.72'
AUTOMAKE_VERSION: '1.16'
# No illumos in cross-platform-actions/action yet, see
# https://github.com/cross-platform-actions/action/issues/20
#- name: 'ART (illumos32-qemu, OpenIndiana, i686)'
# vbox: openindiana/hipster
# CC: gcc -m32 -msse -msse2 -mfpmath=sse
# confflags: '--host=i686-pc-solaris2.11'
# ASAN_OPTIONS: ''
# ART_REG_SKIP: 'font_nonunicode'
env:
ASAN_OPTIONS: ${{ matrix.ASAN_OPTIONS }}
AUTOCONF_VERSION: ${{ matrix.AUTOCONF_VERSION }}
AUTOMAKE_VERSION: ${{ matrix.AUTOMAKE_VERSION }}
steps:
- name: Checkout Git Repos
env:
LIBASS_REPO: ${{ github.event.inputs.libass_repo }}
LIBASS_REF: ${{ github.event.inputs.libass_ref }}
TESTS_REPO: ${{ github.repository }}
TESTS_REF: ${{ github.ref }}
run: |
if [ -z "$LIBASS_REPO" ] ; then
LIBASS_REPO="https://github.com/libass/libass.git"
fi
# libass
echo "Cloning Libass Repo: $LIBASS_REPO"
git clone --depth=1 "$LIBASS_REPO" libass
cd libass
if [ -n "$LIBASS_REF" ] ; then
echo "Checking out non-default commit..."
git fetch --depth=1 origin "$LIBASS_REF":artci_laref
git checkout --force artci_laref
fi
echo "Testing libass commit:"
git log -1 --format=%H
cd ..
echo ""
# regression tests
git clone --depth=1 https://github.com/"${TESTS_REPO}".git libass-tests
cd libass-tests
if [ -n "$TESTS_REF" ] ; then
git fetch --depth=1 origin "$TESTS_REF":artci_laref
git checkout --force artci_laref
else
echo "Could not determine ref! Fallback to current master."
fi
echo "Using testsuite from commit:"
git log -1 --format=%H
- name: Install Packages
uses: cross-platform-actions/action@v0.27.0
with:
operating_system: ${{ matrix.os_image }}
version: ${{ matrix.os_version }}
# env vars not really needed here, but must match across all steps
environment_variables: ASAN_OPTIONS AUTOCONF_VERSION AUTOMAKE_VERSION
shutdown_vm: false
sync_files: false
run: |
# Install Packages
case "${{ matrix.os_image }}" in
netbsd)
# We'll use the base system's version of gcc
sudo pkgin -y install \
mozilla-rootcerts-openssl git nasm \
autoconf automake libtool-base pkg-config \
freetype fribidi harfbuzz fontconfig png
;;
freebsd)
# Using system compiler
sudo pkg -o ASSUME_ALWAYS_YES=yes install \
git nasm ca_root_nss \
autoconf automake libtool pkgconf \
freetype2 fribidi harfbuzz fontconfig png
;;
openbsd)
# while OpenBSD natively uses doas,
# cross-platform-action only preconfigured sudo.
# Using system-provided: compiler, fontconfig, freetype
sudo pkg_add \
git nasm libtool pkgconf \
autoconf-"$AUTOCONF_VERSION"p0 \
automake-"$AUTOMAKE_VERSION".5 \
fribidi harfbuzz libunibreak png
;;
openindiana/*)
pfexec pkg install --no-backup-be \
crypto/ca-certificates \
developer/versioning/git \
developer/gcc-10 \
developer/assembler/nasm \
developer/build/autoconf \
developer/build/automake \
developer/build/libtool \
developer/build/pkg-config \
system/library/freetype-2 \
library/fribidi \
library/c++/harfbuzz \
system/library/fontconfig \
image/library/libpng
;;
esac
- name: Build libass
uses: cross-platform-actions/action@v0.27.0
with:
operating_system: ${{ matrix.os_image }}
version: ${{ matrix.os_version }}
environment_variables: ASAN_OPTIONS AUTOCONF_VERSION AUTOMAKE_VERSION
shutdown_vm: false
sync_files: true
run: |
cd libass
./autogen.sh
./configure CC="${{ matrix.CC }}" ${{ matrix.confflags }} --enable-fuzz --enable-compare
make -j 2
cd ..
- name: Run Tests
uses: cross-platform-actions/action@v0.27.0
with:
operating_system: ${{ matrix.os_image }}
version: ${{ matrix.os_version }}
environment_variables: ASAN_OPTIONS AUTOCONF_VERSION AUTOMAKE_VERSION
shutdown_vm: false
sync_files: true
run: |
cd libass
ART_REG_SKIP="${{ matrix.ART_REG_SKIP }}" \
make ART_SAMPLES="../libass-tests" check \
|| (cat ./test-suite.log; exit 1)
- name: Shutdown VM
if: always()
uses: cross-platform-actions/action@v0.27.0
with:
operating_system: ${{ matrix.os_image }}
version: ${{ matrix.os_version }}
environment_variables: ASAN_OPTIONS AUTOCONF_VERSION AUTOMAKE_VERSION
shutdown_vm: true
sync_files: false
run: echo 'Byebye ^^)/"'