-
Notifications
You must be signed in to change notification settings - Fork 8
79 lines (74 loc) · 2.22 KB
/
ci.yaml
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
name: ci
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
name: Build and Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Build Examples
run: zig build
- name: Run unit tests
run: zig build test --summary all
linux-pipeline:
name: Linux Pipeline
needs: unit-tests
runs-on: ubuntu-latest
strategy:
matrix:
async: [io_uring, epoll, poll]
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Generate random 64-bit integer
id: random
shell: bash
run: echo "RANDOM_INT=$(shuf -i 1-9223372036854775807 -n 1)" >> $GITHUB_ENV
- name: Run E2E tests with ${{ matrix.async }}
run: zig build -Dasync=${{ matrix.async }} test_e2e -- ${{ env.RANDOM_INT }}
macos-pipeline:
name: macOS Pipeline
needs: unit-tests
runs-on: macos-latest
strategy:
matrix:
async: [kqueue, poll]
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Generate random 64-bit integer
id: random
shell: bash
run: echo "RANDOM_INT=$(shuf -i 1-9223372036854775807 -n 1)" >> $GITHUB_ENV
- name: Run E2E tests with ${{ matrix.async }}
run: zig build -Dasync=${{ matrix.async }} test_e2e -- ${{ env.RANDOM_INT }}
windows-pipeline:
name: Windows Pipeline
needs: unit-tests
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.13.0
- name: Generate random 64-bit integer
id: random
shell: pwsh
run: echo "RANDOM_INT=$([long]::Parse([math]::Floor([decimal](Get-Random -Minimum 1 -Maximum 9223372036854775807)).ToString()))" >> $env:GITHUB_ENV
#- name: Run E2E tests with poll
# run: zig build -Dasync=poll test_e2e -- ${{ env.RANDOM_INT }}