Repository navigation
183 lines (165 loc) · 6.25 KB
/
Copy pathtest.yaml
File metadata and controls
183 lines (165 loc) · 6.25 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
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
name: test
# The whole eval-under matrix, in one workflow.
#
# Cells come from evals/matrix.yaml via bin/ci/matrix-json.sh, rather
# than being spelled out here: adding a filesystem or a suite should be
# a data edit, and the shell scripts in bin/ci/ read the same file, so
# they cannot drift from what CI actually runs.
#
# All non-trivial shell logic lives in bin/ci/*.sh so it can be
# shellcheck'd and exercised locally in the Vagrant VM. See
# .claude/CLAUDE.md.
on:
push:
branches: [main, master]
paths:
- "bin/**"
- "provision/**"
- "evals/matrix.yaml"
- "evals/known-issues.yaml"
- ".github/workflows/test.yaml"
pull_request:
paths:
- "bin/**"
- "provision/**"
- "evals/matrix.yaml"
- "evals/known-issues.yaml"
- ".github/workflows/test.yaml"
workflow_dispatch:
inputs:
git-annex-run:
description: >-
con/git-annex build-ubuntu.yaml run id to test
(empty: newest build with a package)
required: false
default: ""
schedule:
- cron: "17 5 * * 1" # Mon 05:17 UTC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
matrix:
runs-on: ubuntu-latest
permissions:
contents: read
actions: read # to list con/git-annex runs and their artifacts
outputs:
cells: ${{ steps.cells.outputs.matrix }}
git-annex-run: ${{ steps.git-annex-build.outputs.run_id }}
steps:
- uses: actions/checkout@v4
- id: cells
run: echo "matrix=$(bin/ci/matrix-json.sh)" >> "$GITHUB_OUTPUT"
# Pick the git-annex build once, so every cell of this run tests
# the same one. On failure the cells fall back to picking it
# themselves (empty run id) rather than all going red.
- id: git-annex-build
continue-on-error: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_ANNEX_RUN_ID: ${{ inputs.git-annex-run }}
run: bin/ci/pick-git-annex-build.sh
test:
needs: matrix
name: ${{ matrix.name }}
# ubuntu-22.04: kernel 5.15/6.5, within BeeGFS 7.4.x and 8.x DKMS
# support. ubuntu-24.04 hosted runners ship 6.17-azure which BeeGFS
# kernel modules cannot build against. NFS + loop backends don't
# need this, but sharing the runner OS keeps the matrix uniform.
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.cells) }}
permissions:
contents: read
actions: read # to download artifacts from con/git-annex
env:
EVAL_UNDER_OUTPUT_DIR: /tmp/eval-under-output/${{ matrix.slug }}
steps:
- uses: actions/checkout@v4
- name: Install backend client dependencies
run: bin/ci/install-backend.sh "${{ matrix.backend }}" "${{ matrix.version }}"
- name: Install target ${{ matrix.target }}
run: bin/ci/install-target.sh "${{ matrix.target }}"
# Only some targets need the daily build (and the token that
# fetching it requires). Which ones is data -- `needs-git-annex`
# in evals/matrix.yaml, carried through by matrix-json.sh -- not a
# target name spelled out here: a second git-annex-using target
# would silently run without git-annex installed.
# Indexed, not dotted: the documented form for a property name
# containing hyphens.
- name: Fetch latest git-annex daily build from con/git-annex
if: ${{ matrix['needs-git-annex'] }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_ANNEX_RUN_ID: ${{ needs.matrix.outputs.git-annex-run }}
run: bin/ci/install-git-annex-daily.sh
- name: Configure git identity
run: |
git config --global user.email test@github.land
git config --global user.name "GitHub Almighty"
# Known failures are expected; "Check against known issues" decides.
- name: Run ${{ matrix.target }} under ${{ matrix.backend }}
id: suite
continue-on-error: true
run: >-
sudo -E bin/ci/run-under.sh
"${{ matrix.backend }}" "${{ matrix.version }}" "${{ matrix.target }}"
- name: Dump failure logs
if: failure() || steps.suite.outcome == 'failure'
run: >-
bin/ci/dump-failure-logs.sh
"${{ matrix.backend }}" "${{ matrix.version }}" "${{ matrix.target }}"
# !cancelled(), not always(): a run superseded by a newer push would
# otherwise record every cell as "incomplete".
- name: Check against known issues
if: ${{ !cancelled() }}
run: >-
bin/ci/check-cell.sh
"${{ matrix.backend }}" "${{ matrix.version }}" "${{ matrix.target }}"
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.slug }}
path: |
/var/log/beegfs-*
/opt/eval-under-src/git/t/test-results/**
${{ env.EVAL_UNDER_OUTPUT_DIR }}/**
if-no-files-found: ignore
# One tiny artifact per cell, read back by the `publish` job. A
# matrix job cannot contribute to a `needs.*.outputs` map, so this
# is how a fan-out reports 20 individual verdicts to a fan-in.
- name: Record cell result
if: always()
run: |
mkdir -p result && echo "${{ job.status }}" > result/conclusion
cp "$EVAL_UNDER_OUTPUT_DIR/verdict.json" result/ || true
- name: Upload cell result
if: always()
uses: actions/upload-artifact@v4
with:
name: result-${{ matrix.slug }}
path: result/
publish:
needs: test
# always(): the point is to publish the red cells too.
# Not on pull_request: a PR must not rewrite the status the README
# and the report page show for master.
if: always() && github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: write
actions: read # to resolve each cell's job URL for the report
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: result-*
path: results
- name: Merge results and publish the status site
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bin/ci/publish-status.sh