-
Notifications
You must be signed in to change notification settings - Fork 37
214 lines (181 loc) · 8.51 KB
/
tests.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
206
207
208
209
210
211
212
213
214
name: tests
on:
create:
tags:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
linux:
runs-on: ubuntu-latest
name: "Linux, ${{ matrix.system.target }} (build=${{ matrix.build }}, threads=${{ matrix.threads }})"
strategy:
fail-fast: false
matrix:
build: [release, debug]
threads: [true, false]
system:
- { target: gcc, cc: gcc }
- { target: clang, cc: clang }
- { target: arm, toolchain: gcc-arm-linux-gnueabi, cc: arm-linux-gnueabi-gcc, qemu: qemu-arm-static, linkAtomic: true }
- { target: armhf, toolchain: gcc-arm-linux-gnueabihf, cc: arm-linux-gnueabihf-gcc, qemu: qemu-arm-static }
- { target: aarch64, toolchain: gcc-aarch64-linux-gnu, cc: aarch64-linux-gnu-gcc, qemu: qemu-aarch64-static }
- { target: riscv64, toolchain: gcc-riscv64-linux-gnu, cc: riscv64-linux-gnu-gcc, qemu: qemu-riscv64-static, linkAtomic: true }
- { target: ppc, toolchain: gcc-powerpc-linux-gnu, cc: powerpc-linux-gnu-gcc, qemu: qemu-ppc-static, linkAtomic: true }
- { target: ppc64, toolchain: gcc-powerpc64-linux-gnu, cc: powerpc64-linux-gnu-gcc, qemu: qemu-ppc64-static }
- { target: s390x, toolchain: gcc-s390x-linux-gnu, cc: s390x-linux-gnu-gcc, qemu: qemu-s390x-static }
- { target: alpha, toolchain: gcc-alpha-linux-gnu, cc: alpha-linux-gnu-gcc, qemu: qemu-alpha-static }
# Architectures with expected failures (mostly due to FP issues, e.g. NaN representation, conversion, arithemtic)
- { target: i386, toolchain: gcc-multilib, cc: clang -m32, qemu: qemu-i386-static, linkAtomic: true }
- { target: hppa, toolchain: gcc-hppa-linux-gnu, cc: hppa-linux-gnu-gcc, qemu: qemu-hppa-static }
- { target: mips, toolchain: gcc-mips-linux-gnu, cc: mips-linux-gnu-gcc, qemu: qemu-mips-static, linkAtomic: true }
- { target: mipsel, toolchain: gcc-mipsel-linux-gnu, cc: mipsel-linux-gnu-gcc, qemu: qemu-mipsel-static, linkAtomic: true }
- { target: mips64, toolchain: gcc-mips64-linux-gnuabi64, cc: mips64-linux-gnuabi64-gcc, qemu: qemu-mips64-static }
- { target: mips64el, toolchain: gcc-mips64el-linux-gnuabi64, cc: mips64el-linux-gnuabi64-gcc, qemu: qemu-mips64el-static }
- { target: ppc64le, toolchain: gcc-powerpc64le-linux-gnu, cc: powerpc64le-linux-gnu-gcc, qemu: qemu-ppc64le-static }
# Disabled due to miscompilation or qemu issues (?)
# - { target: sh4, toolchain: gcc-sh4-linux-gnu, cc: sh4-linux-gnu-gcc, qemu: qemu-sh4-static }
# - { target: sparc64, toolchain: gcc-sparc64-linux-gnu, cc: sparc64-linux-gnu-gcc, qemu: qemu-sparc64-static }
# Disabled due to too large `switch'-statement
# - { target: m68k, toolchain: gcc-m68k-linux-gnu, cc: m68k-linux-gnu-gcc, qemu: qemu-m68k-static }
env:
CC: ${{ matrix.system.cc }}
steps:
- uses: actions/checkout@v3
- name: Install QEMU
if: ${{ matrix.system.qemu }}
run: |
sudo apt update
sudo apt install qemu-user-static
- name: Install ${{ matrix.system.toolchain }}
if: ${{ matrix.system.toolchain }}
run: |
sudo apt install ${{ matrix.system.toolchain }}
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
w2c2:
- 'w2c2/**'
- 'futex/**'
- 'tests/**'
wasi:
- 'wasi/**'
- if: steps.changes.outputs.w2c2 == 'true'
name: Build w2c2
env:
LDFLAGS: -static
working-directory: ./w2c2
run: make BUILD=${{ matrix.build }} FEATURES="unistd libgen getopt glob ${{ matrix.threads && 'threads' || '' }}"
- if: steps.changes.outputs.w2c2 == 'true'
name: Test w2c2
env:
LDFLAGS: -static
working-directory: ./w2c2
run: make test BUILD=${{ matrix.build }} FEATURES="unistd libgen getopt glob ${{ matrix.threads && 'threads' || '' }}"
- if: steps.changes.outputs.w2c2 == 'true'
name: Build futex
working-directory: ./futex
run: make BUILD=${{ matrix.build }}
- if: steps.changes.outputs.w2c2 == 'true'
name: Test futex
env:
LDFLAGS: -static ${{ matrix.system.linkAtomic && '-latomic' || '' }}
working-directory: ./futex
run: make test BUILD=${{ matrix.build }}
- if: steps.changes.outputs.w2c2 == 'true'
name: Run WebAssembly tests
env:
LDFLAGS: -static ${{ matrix.system.linkAtomic && '-latomic' || '' }}
ARCH: ${{ matrix.system.target }}
working-directory: ./tests
shell: bash
run: make run-tests
- if: steps.changes.outputs.wasi == 'true'
name: Build wasi
working-directory: ./wasi
run: make BUILD=${{ matrix.build }}
- if: steps.changes.outputs.wasi == 'true'
name: Test wasi
env:
LDFLAGS: -static ${{ matrix.system.linkAtomic && '-latomic' || '' }}
working-directory: ./wasi
run: make test BUILD=${{ matrix.build }}
macos:
runs-on: macos-latest
name: "macOS (build=${{ matrix.build }}, threads=${{ matrix.threads }})"
strategy:
fail-fast: false
matrix:
build: [release, debug]
threads: [true, false]
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
w2c2:
- 'w2c2/**'
- 'futex/**'
- 'tests/**'
wasi:
- 'wasi/**'
- if: steps.changes.outputs.w2c2 == 'true'
name: Build w2c2
working-directory: ./w2c2
run: make BUILD=${{ matrix.build }} FEATURES="unistd libgen getopt glob ${{ matrix.threads && 'threads' || '' }}"
- if: steps.changes.outputs.w2c2 == 'true'
name: Test w2c2
working-directory: ./w2c2
run: make test BUILD=${{ matrix.build }} FEATURES="unistd libgen getopt glob ${{ matrix.threads && 'threads' || '' }}"
- if: steps.changes.outputs.w2c2 == 'true'
name: Build futex
working-directory: ./futex
run: make BUILD=${{ matrix.build }}
- if: steps.changes.outputs.w2c2 == 'true'
name: Test futex
working-directory: ./futex
run: make test BUILD=${{ matrix.build }}
- if: steps.changes.outputs.w2c2 == 'true'
name: Run WebAssembly tests
working-directory: ./tests
shell: bash
run: make run-tests
- if: steps.changes.outputs.wasi == 'true'
name: Build wasi
working-directory: ./wasi
run: make BUILD=${{ matrix.build }} FEATURES="unistd sysuio systime sysresource strndup fcntl timespec lstat pthreads"
- if: steps.changes.outputs.wasi == 'true'
name: Test wasi
working-directory: ./wasi
run: make test BUILD=${{ matrix.build }} FEATURES="unistd sysuio systime sysresource strndup fcntl timespec lstat pthreads"
windows-msvc:
runs-on: windows-2019
name: "Windows (MSVC)"
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
w2c2:
- 'w2c2/**'
wasi:
- 'wasi/**'
- if: steps.changes.outputs.w2c2 == 'true'
name: Build w2c2
working-directory: ./w2c2
run: |
cmake -Bbuild
cmake --build build
- if: steps.changes.outputs.wasi == 'true'
name: Build wasi
working-directory: ./wasi
run: |
cmake -Bbuild
cmake --build build