forked from mozilla/neqo
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
166 lines (152 loc) · 5.47 KB
/
action.yml
File metadata and controls
166 lines (152 loc) · 5.47 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
name: 'QUIC Interop Runner Action'
description: 'Run the QUIC Interop Runner tests.'
author: 'mxinden'
inputs:
client:
description: 'client implementations (comma-separated)'
required: false
default: ''
server:
description: 'server implementations (comma-separated)'
required: false
default: ''
test:
description: 'test cases (comma-separatated)'
required: false
default: 'onlyTests'
implementations:
description: 'Modified "implementations.json" data'
required: false
default: ''
outputs:
result:
description: 'One of "success", "failure", or "timeout".'
value: ${{ steps.result.outputs.result }}
runs:
using: "composite"
steps:
- name: Checkout quic-interop/quic-interop-runner repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: 'quic-interop/quic-interop-runner'
path: 'quic-interop-runner'
persist-credentials: false
- name: Enable IPv6 support
run: sudo modprobe ip6table_filter
shell: bash
- name: Install dependencies
run: |
sudo add-apt-repository ppa:wireshark-dev/nightly
sudo apt-get update
sudo apt-get install -y --no-install-recommends tshark
shell: bash
- name: Checkout linuxquic repository
if: ${{ inputs.server == 'linuxquic' || inputs.client == 'linuxquic' }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
repository: 'lxin/quic'
path: 'linuxquic'
persist-credentials: false
- name: Install Linux QUIC module
if: ${{ inputs.server == 'linuxquic' || inputs.client == 'linuxquic' }}
run: |
cd linuxquic && sed -i '/LIBGNUTLS/d' configure.ac
./autogen.sh && ./configure --prefix=/usr
sudo make -C modules install
cd ../ && rm -r linuxquic
shell: bash
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
# FIXME: Turning caching on causes this error:
# `Failed to save: <h2>Our services aren't available right now</h2><p>We're working to restore all services as soon as possible. Please check back soon.</p>`
# Since this happens for *each* parallel QNS run, it's simply too noisy.
with:
python-version: 3.12
# cache: 'pip'
# cache-dependency-path: 'quic-interop-runner/requirements.txt'
- name: Install Python packages
run: |
cd quic-interop-runner
pip install -U pip
pip install -r requirements.txt
shell: bash
- name: Run tests
env:
CLIENT: ${{ inputs.client }}
SERVER: ${{ inputs.server }}
TEST: ${{ inputs.test }}
IMPLEMENTATIONS: ${{ inputs.implementations }}
run: |
cd quic-interop-runner
if [ -n "$IMPLEMENTATIONS" ]; then
echo "$IMPLEMENTATIONS" > implementations.json
fi
ARGS="--log-dir ../logs --json ../result.json"
if [ -n "$CLIENT" ]; then
ARGS="$ARGS --client $CLIENT"
fi
if [ -n "$SERVER" ]; then
ARGS="$ARGS --server $SERVER"
fi
if [ -n "$TEST" ]; then
ARGS="$ARGS --test $TEST"
fi
# Don't fail CI if the interop test fails
set -o pipefail
python -u run.py $ARGS 2>&1 | tee ../summary.txt || true
# But do fail if any log contains 'RUST_BACKTRACE=full', which indicates a panic
# (that we assume happened in neqo.)
for log in ../logs/*/*/output.txt; do
if grep -q 'RUST_BACKTRACE=full' "$log"; then
echo "Panic detected in $log"
tail -n 50 "$log"
FAILED=1
[ -z "$FAILED" ] && echo "FAILED=1" >> "$GITHUB_ENV"
fi
done
[ -z "$FAILED" ] && echo "FAILED=0" >> "$GITHUB_ENV"
# Remove all log files > $MAX_SIZE for succeeded tests to make the artifacts smaller.
MAX_SIZE=2M
echo "Removed log file > $MAX_SIZE during GitHub workflow" > note.txt
echo "Removing these log files > $MAX_SIZE:"
SUCCEEDED=$(jq < ../result.json '. | .results[][] | select(.result == "succeeded").name' | tr -d '"')
for run in ../logs/*; do
for test in $SUCCEEDED; do
find "$run/$test" -type f -size +$MAX_SIZE -ls -exec cp note.txt {} \;
done
done
exit $FAILED
shell: bash
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: ${{ always() }}
id: upload-logs
with:
name: '${{ inputs.client }} vs. ${{ inputs.server }} logs'
path: logs
compression-level: 9
- name: Store log URL
if: ${{ always() }}
env:
ARTIFACT_URL: ${{ steps.upload-logs.outputs.artifact-url }}
run: |
jq ". + {log_url: \"$ARTIFACT_URL\"}" < result.json > result.json.tmp
mv result.json.tmp result.json
shell: bash
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: ${{ always() }}
with:
name: '${{ inputs.client }} vs. ${{ inputs.server }} results'
path: |
result.json
summary.txt
retention-days: 1
- id: result
if: ${{ always() }}
run: |
if [ -z "$FAILED" ]; then
echo "result=timeout" >> $GITHUB_OUTPUT
elif [ "$FAILED" -eq 0 ]; then
echo "result=success" >> $GITHUB_OUTPUT
else
echo "result=failure" >> $GITHUB_OUTPUT
fi
shell: bash