Skip to content

Commit 535bedf

Browse files
authored
[ci] Use build matrix to run W3C spec builds independently (#1825)
This ensures that all 3 specs build and upload even if one fails. Also use 'uploaded' in the status text instead of 'published' to reflect possible dry run or validation failure.
1 parent 2d480da commit 535bedf

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

.github/workflows/w3c-publish.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ env:
3131

3232
jobs:
3333
publish-to-w3c-TR:
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
spec: [core, js-api, web-api]
3438
runs-on: ubuntu-latest
3539
steps:
3640
- name: Checkout repo
@@ -44,20 +48,22 @@ jobs:
4448
- name: Setup Bikeshed
4549
run: pip install bikeshed && bikeshed update
4650
- name: Setup TexLive
51+
if: ${{ matrix.spec == 'core' }}
4752
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
4853
- name: Setup Sphinx
54+
if: ${{ matrix.spec == 'core' }}
4955
run: pip install six && pip install sphinx==5.1.0
50-
- name: Publish all specs to their https://www.w3.org/TR/ URLs
56+
- name: Publish ${{ matrix.spec }} spec to its https://www.w3.org/TR/ URL
5157
if: env.W3C_ECHIDNA_TOKEN_CORE
52-
run: cd document && make -e WD-echidna-CI
58+
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna-CI
5359
env:
5460
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
5561
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
5662
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
5763
ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }}
58-
- name: Validate all specs with Echidna
64+
- name: Validate ${{ matrix.spec }} spec with Echidna
5965
if: env.W3C_USERNAME
60-
run: cd document && make -e WD-echidna
66+
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna
6167
env:
6268
W3C_USERNAME: ${{ secrets.W3C_USERNAME }}
6369
W3C_PASSWORD: ${{ secrets.W3C_PASSWORD }}

document/core/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ WD-echidna: WD-tar
201201
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
202202
python3 ../util/check-echidna-status.py $(BUILDDIR)
203203
@echo
204-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
204+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
205205

206206
.PHONY: WD-echidna-CI
207207
WD-echidna-CI: WD-tar
@@ -217,7 +217,7 @@ WD-echidna-CI: WD-tar
217217
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
218218
python3 ../util/check-echidna-status.py $(BUILDDIR)
219219
@echo
220-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
220+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
221221

222222
.PHONY: diff
223223
diff: bikeshed

document/js-api/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ WD-echidna: WD-tar
5454
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
5555
python3 ../util/check-echidna-status.py $(BUILDDIR)
5656
@echo
57-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
57+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
5858

5959
.PHONY: WD-echidna-CI
6060
WD-echidna-CI: WD-tar
@@ -70,4 +70,4 @@ WD-echidna-CI: WD-tar
7070
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
7171
python3 ../util/check-echidna-status.py $(BUILDDIR)
7272
@echo
73-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
73+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"

document/web-api/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ WD-echidna: WD-tar
5454
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
5555
python3 ../util/check-echidna-status.py $(BUILDDIR)
5656
@echo
57-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
57+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
5858

5959
.PHONY: WD-echidna-CI
6060
WD-echidna-CI: WD-tar
@@ -70,4 +70,4 @@ WD-echidna-CI: WD-tar
7070
-F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt
7171
python3 ../util/check-echidna-status.py $(BUILDDIR)
7272
@echo
73-
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
73+
@echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"

0 commit comments

Comments
 (0)