-
-
Notifications
You must be signed in to change notification settings - Fork 34
112 lines (102 loc) · 3.82 KB
/
Copy pathtest.yml
File metadata and controls
112 lines (102 loc) · 3.82 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
name: CI
on:
push:
branches: [ main ]
tags:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
zig_version: ['0.16.0']
mode: [debug, release]
config:
- { os: ubuntu-24.04, target: native, backends: 'linux io_uring epoll poll' }
- { os: ubuntu-24.04-arm, target: native, backends: 'linux io_uring epoll poll' }
- { os: macos-latest, target: native, backends: 'kqueue poll' }
- { os: macos-15-intel, target: native, backends: 'kqueue poll' }
- { os: windows-latest, target: native, backends: 'iocp poll' }
- { os: ubuntu-latest, target: arm-linux, qemu: true, backends: 'linux epoll poll' }
- { os: ubuntu-latest, target: thumb-linux, qemu: true, backends: 'linux epoll poll' }
- { os: ubuntu-latest, target: x86-linux, qemu: true, backends: 'linux epoll poll' }
- { os: ubuntu-latest, target: riscv32-linux, qemu: true, backends: 'linux epoll poll' }
- { os: ubuntu-latest, target: riscv64-linux, qemu: true, backends: 'linux epoll poll' }
- { os: ubuntu-latest, target: loongarch64-linux, qemu: true, backends: 'linux epoll poll' }
- { os: ubuntu-latest, target: powerpc64le-linux, qemu: true, backends: 'linux epoll poll' }
- { os: ubuntu-latest, target: x86_64-freebsd, vm: freebsd, backends: 'kqueue poll' }
- { os: ubuntu-latest, target: x86_64-netbsd, vm: netbsd, backends: 'kqueue poll' }
- { os: ubuntu-latest, target: x86_64-openbsd, vm: openbsd, backends: 'kqueue poll' }
runs-on: ${{ matrix.config.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Zig
uses: mlugg/setup-zig@v2
with:
version: ${{ matrix.zig_version }}
- name: Install QEMU
if: matrix.config.qemu
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y qemu-user-static
- name: Build and test for each backend
shell: bash
run: |
for backend in ${{ matrix.config.backends }}; do
echo "Building with backend: $backend"
./check.sh --full --backend $backend \
${{ matrix.config.target != 'native' && format('--target {0}', matrix.config.target) || '' }} \
${{ matrix.config.qemu && '--qemu' || '' }} \
${{ matrix.config.vm && '--no-exec' || '' }} \
${{ matrix.mode == 'release' && '--release' || '' }}
if [ -n "${{ matrix.config.vm }}" ]; then
cp zig-out/bin/test zig-out/bin/test-$backend
fi
done
timeout-minutes: 10
env:
TEST_VERBOSE: 2
- name: Run tests (FreeBSD VM)
if: matrix.config.vm == 'freebsd'
uses: vmactions/freebsd-vm@v1
timeout-minutes: 20
with:
envs: 'TEST_VERBOSE'
run: |
for test in zig-out/bin/test-*; do
echo "Running $test"
./$test
done
env:
TEST_VERBOSE: 2
- name: Run tests (NetBSD VM)
if: matrix.config.vm == 'netbsd'
uses: vmactions/netbsd-vm@v1
timeout-minutes: 20
with:
release: '10.1'
envs: 'TEST_VERBOSE'
run: |
for test in zig-out/bin/test-*; do
echo "Running $test"
./$test
done
env:
TEST_VERBOSE: 2
- name: Run tests (OpenBSD VM)
if: matrix.config.vm == 'openbsd'
uses: vmactions/openbsd-vm@v1
timeout-minutes: 20
with:
envs: 'TEST_VERBOSE'
run: |
# OpenBSD's default per-process fd limit is low; the max-executors
# test opens a loop (and waker fds) per executor and needs more.
ulimit -n 4096
for test in zig-out/bin/test-*; do
echo "Running $test"
./$test
done
env:
TEST_VERBOSE: 2