|
1 | 1 | name: interop
|
2 | 2 | on:
|
3 |
| - schedule: |
4 |
| - - cron: "0 */8 * * *" # every 8h |
5 |
| - |
6 |
| -# Cache key for caching the Wireshark build. |
7 |
| -# To trigger a rebuild of Wireshark increment this value. |
8 |
| -# The rebuild will then build the current master of Wireshark and save it under the new key. |
9 |
| -env: |
10 |
| - WIRESHARK_CACHEKEY: 6 |
| 3 | + push: |
| 4 | + branches: ["s3-setup"] |
11 | 5 |
|
12 | 6 | jobs:
|
13 |
| - wireshark: |
14 |
| - runs-on: ubuntu-latest |
15 |
| - steps: |
16 |
| - - name: Restore from cache |
17 |
| - id: restore-cache |
18 |
| - uses: actions/cache@v3 |
19 |
| - env: |
20 |
| - VERSION: ${{ env.WIRESHARK_CACHEKEY }} |
21 |
| - with: |
22 |
| - key: wireshark-${{ env.VERSION }} |
23 |
| - path: tshark.tar.gz |
24 |
| - - name: Show tshark version information |
25 |
| - if: steps.restore-cache.outputs.cache-hit == 'true' |
26 |
| - run: | |
27 |
| - tar xfz tshark.tar.gz |
28 |
| - ./tshark -v |
29 |
| - - uses: actions/checkout@v3 |
30 |
| - if: steps.restore-cache.outputs.cache-hit != 'true' |
31 |
| - with: |
32 |
| - repository: the-tcpdump-group/libpcap |
33 |
| - - name: Build libpcap |
34 |
| - if: steps.restore-cache.outputs.cache-hit != 'true' |
35 |
| - run: | |
36 |
| - ./autogen.sh |
37 |
| - ./configure --disable-dbus --disable-rdma |
38 |
| - sudo make install |
39 |
| - - uses: actions/checkout@v3 |
40 |
| - if: steps.restore-cache.outputs.cache-hit != 'true' |
41 |
| - with: |
42 |
| - repository: wireshark/wireshark |
43 |
| - - name: Install dependencies |
44 |
| - if: steps.restore-cache.outputs.cache-hit != 'true' |
45 |
| - run: sudo apt-get install -y cmake libglib2.0-dev libc-ares-dev libgcrypt20-dev flex bison byacc ninja-build |
46 |
| - - name: Build Wireshark |
47 |
| - if: steps.restore-cache.outputs.cache-hit != 'true' |
48 |
| - run: | |
49 |
| - cmake -GNinja -DBUILD_wireshark=0 -DBUILD_qtshark=0 -DBUILD_editcap=0 -DBUILD_capinfos=0 -DBUILD_text2pcap=0 -DBUILD_rawshark=0 -DBUILD_sdjournal=0 -DBUILD_sshdump=0 -DBUILD_ciscodump=0 -DBUILD_sharkd=0 -DENABLE_STATIC=1 -DENABLE_PLUGINS=0 -DENABLE_LIBXML2=0 -DENABLE_BROTLI=0 -DUSE_STATIC=1 -DENABLE_GNUTLS=1 . |
50 |
| - ninja |
51 |
| - - run: run/tshark -v |
52 |
| - if: steps.restore-cache.outputs.cache-hit != 'true' |
53 |
| - - name: Compress |
54 |
| - if: steps.restore-cache.outputs.cache-hit != 'true' |
55 |
| - run: tar -czvf tshark.tar.gz -C run/ tshark |
56 |
| - - name: Upload |
57 |
| - uses: actions/upload-artifact@v3 |
58 |
| - with: |
59 |
| - name: wireshark |
60 |
| - path: tshark.tar.gz |
61 |
| - config: |
62 |
| - runs-on: ubuntu-latest |
63 |
| - outputs: |
64 |
| - logname: ${{ steps.set-logname.outputs.logname }} |
65 |
| - starttime: ${{ steps.set-starttime.outputs.starttime }} |
66 |
| - servers: ${{ steps.set-servers.outputs.servers }} |
67 |
| - clients: ${{ steps.set-clients.outputs.clients }} |
68 |
| - images: ${{ steps.set-images.outputs.images }} |
69 |
| - steps: |
70 |
| - - name: Set log name |
71 |
| - id: set-logname |
72 |
| - run: | |
73 |
| - LOGNAME=$(date -u +"%Y-%m-%dT%H:%M") |
74 |
| - echo $LOGNAME |
75 |
| - echo "logname=$LOGNAME" >> $GITHUB_OUTPUT |
76 |
| - - name: Save start time |
77 |
| - id: set-starttime |
78 |
| - run: | |
79 |
| - STARTTIME=$(date +%s) |
80 |
| - echo $STARTTIME |
81 |
| - echo "starttime=$STARTTIME" >> $GITHUB_OUTPUT |
82 |
| - - uses: actions/checkout@v3 |
83 |
| - - uses: actions/setup-python@v4 |
84 |
| - with: |
85 |
| - python-version: 3.8 |
86 |
| - - name: Determine servers |
87 |
| - id: set-servers |
88 |
| - run: | |
89 |
| - SERVERS=$(jq -c 'with_entries(select(.value.role == "server" or .value.role == "both")) | keys_unsorted' implementations.json) |
90 |
| - echo $SERVERS |
91 |
| - echo "servers=$SERVERS" >> $GITHUB_OUTPUT |
92 |
| - - name: Determine clients |
93 |
| - id: set-clients |
94 |
| - run: | |
95 |
| - CLIENTS=$(jq -c 'with_entries(select(.value.role == "client" or .value.role == "both")) | keys_unsorted' implementations.json) |
96 |
| - echo $CLIENTS |
97 |
| - echo "clients=$CLIENTS" >> $GITHUB_OUTPUT |
98 |
| - - name: Determine Docker images |
99 |
| - id: set-images |
100 |
| - run: | |
101 |
| - IMAGES=$(jq -c 'keys_unsorted' implementations.json) |
102 |
| - echo $IMAGES |
103 |
| - echo "images=$IMAGES" >> $GITHUB_OUTPUT |
104 |
| - docker-pull-tools: |
105 |
| - runs-on: ubuntu-latest |
106 |
| - strategy: |
107 |
| - matrix: |
108 |
| - image: [ 'quic-network-simulator', 'quic-interop-iperf-endpoint' ] |
109 |
| - steps: |
110 |
| - - uses: actions/checkout@v3 |
111 |
| - - name: Pull |
112 |
| - run: | |
113 |
| - URL="martenseemann/${{ matrix.image }}" |
114 |
| - docker pull $URL |
115 |
| - echo "URL=$URL" >> $GITHUB_ENV |
116 |
| - - name: Docker inspect |
117 |
| - run: docker image inspect $URL |
118 |
| - - name: Save Docker image |
119 |
| - run: | |
120 |
| - docker save $URL | gzip --best > ${{ matrix.image }}.tar.gz |
121 |
| - du -sh ${{ matrix.image }}.tar.gz |
122 |
| - - name: Upload result |
123 |
| - uses: actions/upload-artifact@v3 |
124 |
| - with: |
125 |
| - name: images-tools |
126 |
| - path: ${{ matrix.image }}.tar.gz |
127 |
| - if-no-files-found: error |
128 |
| - docker-pull-images: |
129 |
| - needs: [ config ] |
130 |
| - runs-on: ubuntu-latest |
131 |
| - strategy: |
132 |
| - matrix: |
133 |
| - image: ${{ fromJson(needs.config.outputs.images) }} |
134 |
| - name: Pull ${{ matrix.image }} |
135 |
| - steps: |
136 |
| - - uses: actions/checkout@v3 |
137 |
| - - name: Run docker pull |
138 |
| - run: | |
139 |
| - URL=$(jq -r '.["${{ matrix.image }}"].image' implementations.json) |
140 |
| - echo $URL |
141 |
| - docker pull $URL |
142 |
| - echo "URL=$URL" >> $GITHUB_ENV |
143 |
| - - name: Docker inspect |
144 |
| - run: docker image inspect $URL |
145 |
| - - name: Save Docker image |
146 |
| - run: | |
147 |
| - docker save $URL | gzip --best > ${{ matrix.image }}.tar.gz |
148 |
| - du -sh ${{ matrix.image }}.tar.gz |
149 |
| - - name: Upload result |
150 |
| - uses: actions/upload-artifact@v3 |
151 |
| - with: |
152 |
| - name: image-${{ matrix.image }} |
153 |
| - path: ${{ matrix.image }}.tar.gz |
154 |
| - if-no-files-found: error |
155 |
| - tests: |
156 |
| - needs: [ wireshark, config, docker-pull-tools, docker-pull-images ] |
157 |
| - runs-on: ubuntu-latest |
158 |
| - continue-on-error: true |
159 |
| - strategy: |
160 |
| - fail-fast: false |
161 |
| - matrix: |
162 |
| - server: ${{ fromJson(needs.config.outputs.servers) }} |
163 |
| - client: ${{ fromJson(needs.config.outputs.clients) }} |
164 |
| - name: (${{ matrix.server }} - ${{ matrix.client }}) |
165 |
| - steps: |
166 |
| - - uses: actions/checkout@v3 |
167 |
| - - uses: actions/setup-python@v4 |
168 |
| - with: |
169 |
| - python-version: 3.8 |
170 |
| - - name: Enable IPv6 support |
171 |
| - run: sudo modprobe ip6table_filter |
172 |
| - - run: docker image ls |
173 |
| - - name: Download tools Docker images |
174 |
| - uses: actions/download-artifact@v3 |
175 |
| - with: |
176 |
| - name: images-tools |
177 |
| - - name: Download ${{ matrix.server }} Docker image |
178 |
| - uses: actions/download-artifact@v3 |
179 |
| - with: |
180 |
| - name: image-${{ matrix.server }} |
181 |
| - - name: Download ${{ matrix.client }} Docker image |
182 |
| - if: ${{ matrix.server != matrix.client }} |
183 |
| - uses: actions/download-artifact@v3 |
184 |
| - with: |
185 |
| - name: image-${{ matrix.client }} |
186 |
| - - name: Load docker images |
187 |
| - run: | |
188 |
| - docker load --input quic-network-simulator.tar.gz |
189 |
| - docker load --input quic-interop-iperf-endpoint.tar.gz |
190 |
| - docker load --input ${{ matrix.server }}.tar.gz |
191 |
| - docker load --input ${{ matrix.client }}.tar.gz |
192 |
| - - run: docker image ls |
193 |
| - - name: Download Wireshark |
194 |
| - uses: actions/download-artifact@v3 |
195 |
| - with: |
196 |
| - name: wireshark |
197 |
| - path: wireshark |
198 |
| - - name: Install Wireshark |
199 |
| - run: | |
200 |
| - cd wireshark |
201 |
| - tar xfz tshark.tar.gz |
202 |
| - sudo mv tshark /usr/local/bin |
203 |
| - cd .. && rm -r wireshark |
204 |
| - - name: Install Python packages |
205 |
| - run: | |
206 |
| - pip install -U pip |
207 |
| - pip install -r requirements.txt |
208 |
| - - name: Run tests |
209 |
| - env: |
210 |
| - CRON: "true" |
211 |
| - run: | |
212 |
| - (python run.py --client ${{ matrix.client }} --server ${{ matrix.server }} --log-dir logs --json ${{ matrix.server }}_${{ matrix.client }}_results.json -t onlyTests || true) | tee output.txt |
213 |
| - mkdir -p logs/${{ matrix.server }}_${{ matrix.client }} |
214 |
| - mv output.txt logs/${{ matrix.server }}_${{ matrix.client }}/ |
215 |
| - - name: Run measurements |
216 |
| - env: |
217 |
| - CRON: "true" |
218 |
| - run: | |
219 |
| - python run.py --client ${{ matrix.client }} --server ${{ matrix.server }} --log-dir logs_measurement --json ${{ matrix.server }}_${{ matrix.client }}_measurements.json -t onlyMeasurements || true |
220 |
| - if [ ! -d "logs_measurement" ]; then exit 0; fi |
221 |
| - find logs_measurement -depth -name "sim" -type d -exec rm -r "{}" \; |
222 |
| - find logs_measurement -depth -name "client" -type d -exec rm -r "{}" \; |
223 |
| - find logs_measurement -depth -name "server" -type d -exec rm -r "{}" \; |
224 |
| - mv logs_measurement/${{ matrix.server }}_${{ matrix.client }}/* logs/${{ matrix.server }}_${{ matrix.client }}/ |
225 |
| - - name: Upload logs |
226 |
| - if: ${{ github.event_name == 'schedule' }} |
227 |
| - uses: appleboy/scp-action@master |
228 |
| - with: |
229 |
| - host: interop.seemann.io |
230 |
| - username: ${{ secrets.INTEROP_SEEMANN_IO_USER }} |
231 |
| - key: ${{ secrets.INTEROP_SEEMANN_IO_SSH_KEY }} |
232 |
| - source: logs/${{ matrix.server }}_${{ matrix.client }} |
233 |
| - target: /mnt/logs/${{ needs.config.outputs.logname }} |
234 |
| - strip_components: 1 |
235 |
| - - name: Upload result |
236 |
| - uses: actions/upload-artifact@v3 |
237 |
| - with: |
238 |
| - name: results |
239 |
| - if-no-files-found: error |
240 |
| - path: | |
241 |
| - ${{ matrix.server }}_${{ matrix.client }}_results.json |
242 |
| - ${{ matrix.server }}_${{ matrix.client }}_measurements.json |
243 |
| - aggregate: |
244 |
| - needs: [ config, tests ] |
| 7 | + backblaze: |
245 | 8 | runs-on: ubuntu-latest
|
| 9 | + # These permissions are needed to interact with GitHub's OIDC Token endpoint. |
| 10 | + permissions: |
| 11 | + id-token: write |
| 12 | + contents: read |
246 | 13 | env:
|
247 | 14 | LOGNAME: ${{ needs.config.outputs.logname }}
|
248 | 15 | steps:
|
249 | 16 | - uses: actions/checkout@v3
|
250 | 17 | - uses: actions/setup-python@v4
|
251 | 18 | with:
|
252 | 19 | python-version: 3.8
|
253 |
| - - name: Download results |
254 |
| - uses: actions/download-artifact@v3 |
255 |
| - with: |
256 |
| - name: results |
257 |
| - - name: Aggregate results |
258 |
| - run: | |
259 |
| - python .github/workflows/aggregate.py \ |
260 |
| - --start-time ${{ needs.config.outputs.starttime }} \ |
261 |
| - --server ${{ join(fromJson(needs.config.outputs.servers), ',') }} \ |
262 |
| - --client ${{ join(fromJson(needs.config.outputs.clients), ',') }} \ |
263 |
| - --log-dir=$LOGNAME \ |
264 |
| - --output result.json |
265 |
| - - name: Print result |
266 |
| - run: jq '.' result.json |
267 |
| - - name: Upload result to artifacts |
268 |
| - uses: actions/upload-artifact@v3 |
269 |
| - with: |
270 |
| - name: results |
271 |
| - path: result.json |
272 |
| - - name: Upload result to interop.seemann.io |
273 |
| - if: ${{ github.event_name == 'schedule' }} |
274 |
| - uses: appleboy/scp-action@master |
275 |
| - with: |
276 |
| - host: interop.seemann.io |
277 |
| - username: ${{ secrets.INTEROP_SEEMANN_IO_USER }} |
278 |
| - key: ${{ secrets.INTEROP_SEEMANN_IO_SSH_KEY }} |
279 |
| - source: result.json |
280 |
| - target: /mnt/logs/${{ needs.config.outputs.logname }} |
281 |
| - - name: Publish result |
282 |
| - if: ${{ github.event_name == 'schedule' }} |
283 |
| - uses: appleboy/ssh-action@master |
| 20 | + - run: cat "foobar" > result.json |
| 21 | + - name: Configure S3 credentials |
| 22 | + uses: aws-actions/configure-aws-credentials@v4 |
284 | 23 | with:
|
285 |
| - host: interop.seemann.io |
286 |
| - username: ${{ secrets.INTEROP_SEEMANN_IO_USER }} |
287 |
| - key: ${{ secrets.INTEROP_SEEMANN_IO_SSH_KEY }} |
288 |
| - envs: LOGNAME |
289 |
| - script: | |
290 |
| - cd /mnt/logs |
291 |
| - jq '. += [ "${{ needs.config.outputs.logname }}" ]' logs.json | sponge logs.json |
292 |
| - rm latest || true |
293 |
| - ln -s $LOGNAME latest |
| 24 | + aws-access-key-id: ${{ secrets.BACKBLAZE_KEY_ID }} |
| 25 | + aws-secret-access-key: ${{ secrets.BACKBLAZE_APPLICATION_KEY }} |
| 26 | + - run: aws s3 ls --endpoint-url=https://s3.us-west-000.backblazeb2.com |
0 commit comments