-
Notifications
You must be signed in to change notification settings - Fork 2.5k
129 lines (124 loc) · 3.77 KB
/
main.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
name: Build and Test
permissions:
contents: read
packages: write
on:
push: {}
pull_request: {}
workflow_dispatch:
inputs:
impls:
description: 'Space separated list of impls to test (or all)'
required: true
default: 'all'
self-hosted:
description: 'Include self-hosted tests'
required: true
default: 'no'
options: ['yes', 'no']
jobs:
get-matrix:
runs-on: ubuntu-24.04
outputs:
do-linux: ${{ steps.get-matrix-step.outputs.do_linux }}
matrix-linux: ${{ steps.get-matrix-step.outputs.linux }}
do-macos: ${{ steps.get-matrix-step.outputs.do_macos }}
matrix-macos: ${{ steps.get-matrix-step.outputs.macos }}
steps:
- uses: actions/checkout@v4
- id: files
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: kanaka/get-changed-files@v3
with:
default-base: master
- id: get-matrix-step
run: |
export OVERRIDE_IMPLS="${{ github.event.inputs.impls }}" # "
echo "OVERRIDE_IMPLS: ${OVERRIDE_IMPLS}"
./get-ci-matrix.py ${{ steps.files.outputs.all }} > "${GITHUB_OUTPUT}"
linux:
needs: get-matrix
if: ${{ needs.get-matrix.outputs.do-linux == 'true' }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.get-matrix.outputs.matrix-linux) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Need full history for voom like versions
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build/Push
run: |
export ${{ matrix.IMPL }}
./ci.sh docker-build-push ${IMPL}
- name: Build
run: |
export ${{ matrix.IMPL }}
./ci.sh build ${IMPL}
- name: Step Tests
run: |
export ${{ matrix.IMPL }}
./ci.sh test ${IMPL}
- name: Regression Tests
run: |
export ${{ matrix.IMPL }}
STEP=stepA REGRESS=1 HARD=1 OPTIONAL=0 ./ci.sh test ${IMPL}
- name: Performance Tests
run: |
export ${{ matrix.IMPL }}
./ci.sh perf ${IMPL}
- name: Self-hosted Tests
if: ${{ github.event.inputs.self-hosted == 'yes' }}
run: |
export ${{ matrix.IMPL }}
DO_SELF_HOST=1 ./ci.sh test ${IMPL}
- name: Archive logs and debug output
uses: actions/upload-artifact@v4
with:
name: logs.${{ matrix.IMPL }}
path: |
*.log
*.debug
macos:
needs: get-matrix
if: ${{ needs.get-matrix.outputs.do-macos == 'true' }}
runs-on: macos-12
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.get-matrix.outputs.matrix-macos) }}
steps:
- uses: actions/checkout@v4
- name: Build
run: |
export ${{ matrix.IMPL }}
./ci.sh build ${IMPL}
- name: Step Tests
run: |
export ${{ matrix.IMPL }}
./ci.sh test ${IMPL}
- name: Regression Tests
run: |
export ${{ matrix.IMPL }}
STEP=stepA REGRESS=1 HARD=1 OPTIONAL=0 ./ci.sh test ${IMPL}
- name: Performance Tests
run: |
export ${{ matrix.IMPL }}
./ci.sh perf ${IMPL}
- name: Self-hosted Tests
if: ${{ github.event.inputs.self-hosted == 'yes' }}
run: |
export ${{ matrix.IMPL }}
DO_SELF_HOST=1 ./ci.sh test ${IMPL}
- name: Archive logs and debug output
uses: actions/upload-artifact@v4
with:
name: logs.${{ matrix.IMPL }}
path: |
*.log
*.debug