From 4afa3b9f19c019610edf899096256ed8e540e9ba Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 4 Oct 2024 14:35:45 -0700 Subject: [PATCH 1/5] [ci] Use build matrix to run W3C spec builds independently --- .github/workflows/w3c-publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/w3c-publish.yml b/.github/workflows/w3c-publish.yml index eb190eddc3..ea02fffb1e 100644 --- a/.github/workflows/w3c-publish.yml +++ b/.github/workflows/w3c-publish.yml @@ -31,6 +31,9 @@ env: jobs: publish-to-w3c-TR: + strategy: + matrix: + spec: [core, js-api, web-api] runs-on: ubuntu-latest steps: - name: Checkout repo @@ -44,12 +47,14 @@ jobs: - name: Setup Bikeshed run: pip install bikeshed && bikeshed update - name: Setup TexLive + if: ${{ matrix.spec }} == "core" run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended - name: Setup Sphinx + if: ${{ matrix.spec }} == "core" run: pip install six && pip install sphinx==5.1.0 - name: Publish all specs to their https://www.w3.org/TR/ URLs if: env.W3C_ECHIDNA_TOKEN_CORE - run: cd document && make -e WD-echidna-CI + run: cd document && make -e -c ${{ matrix.spec }} WD-echidna-CI env: W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }} W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }} @@ -57,7 +62,7 @@ jobs: ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }} - name: Validate all specs with Echidna if: env.W3C_USERNAME - run: cd document && make -e WD-echidna + run: cd document && make -e -c ${{ matrix.spec }} WD-echidna env: W3C_USERNAME: ${{ secrets.W3C_USERNAME }} W3C_PASSWORD: ${{ secrets.W3C_PASSWORD }} From 33e0c59b7e913fb02f461183e14395b82e7095e2 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 4 Oct 2024 14:41:16 -0700 Subject: [PATCH 2/5] fix --- .github/workflows/w3c-publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/w3c-publish.yml b/.github/workflows/w3c-publish.yml index ea02fffb1e..8a1f24f487 100644 --- a/.github/workflows/w3c-publish.yml +++ b/.github/workflows/w3c-publish.yml @@ -47,14 +47,14 @@ jobs: - name: Setup Bikeshed run: pip install bikeshed && bikeshed update - name: Setup TexLive - if: ${{ matrix.spec }} == "core" + if: ${{ matrix.spec == 'core' }} run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended - name: Setup Sphinx - if: ${{ matrix.spec }} == "core" + if: ${{ matrix.spec == 'core' }} run: pip install six && pip install sphinx==5.1.0 - name: Publish all specs to their https://www.w3.org/TR/ URLs if: env.W3C_ECHIDNA_TOKEN_CORE - run: cd document && make -e -c ${{ matrix.spec }} WD-echidna-CI + run: cd document && make -e -C ${{ matrix.spec }} WD-echidna-CI env: W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }} W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }} @@ -62,7 +62,7 @@ jobs: ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }} - name: Validate all specs with Echidna if: env.W3C_USERNAME - run: cd document && make -e -c ${{ matrix.spec }} WD-echidna + run: cd document && make -e -C ${{ matrix.spec }} WD-echidna env: W3C_USERNAME: ${{ secrets.W3C_USERNAME }} W3C_PASSWORD: ${{ secrets.W3C_PASSWORD }} From e1db1407495c9265baa3d04a6a58ff7c621db801 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 4 Oct 2024 14:43:48 -0700 Subject: [PATCH 3/5] don't fail fast --- .github/workflows/w3c-publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/w3c-publish.yml b/.github/workflows/w3c-publish.yml index 8a1f24f487..afa532e806 100644 --- a/.github/workflows/w3c-publish.yml +++ b/.github/workflows/w3c-publish.yml @@ -32,6 +32,7 @@ env: jobs: publish-to-w3c-TR: strategy: + fail-fast: false matrix: spec: [core, js-api, web-api] runs-on: ubuntu-latest From bae862c18a9b157d03e0b959c0b2cbfcbf60be6a Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 4 Oct 2024 14:47:55 -0700 Subject: [PATCH 4/5] make step name nicer --- .github/workflows/w3c-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/w3c-publish.yml b/.github/workflows/w3c-publish.yml index afa532e806..54809d8463 100644 --- a/.github/workflows/w3c-publish.yml +++ b/.github/workflows/w3c-publish.yml @@ -53,7 +53,7 @@ jobs: - name: Setup Sphinx if: ${{ matrix.spec == 'core' }} run: pip install six && pip install sphinx==5.1.0 - - name: Publish all specs to their https://www.w3.org/TR/ URLs + - name: Publish ${{ matrix.spec }} spec to its https://www.w3.org/TR/ URL if: env.W3C_ECHIDNA_TOKEN_CORE run: cd document && make -e -C ${{ matrix.spec }} WD-echidna-CI env: @@ -61,7 +61,7 @@ jobs: W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }} W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }} ECHIDNA_DRYRUN: ${{ !(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main') }} - - name: Validate all specs with Echidna + - name: Validate ${{ matrix.spec }} spec with Echidna if: env.W3C_USERNAME run: cd document && make -e -C ${{ matrix.spec }} WD-echidna env: From 351b35b595f48e54ef76905d7d5b443eccd43fb4 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Fri, 4 Oct 2024 14:51:10 -0700 Subject: [PATCH 5/5] use 'uploaded' instead of 'published' to reflect possible dry run or validation failure --- document/core/Makefile | 4 ++-- document/js-api/Makefile | 4 ++-- document/web-api/Makefile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/document/core/Makefile b/document/core/Makefile index 20b6ac4ca8..f0016afd8f 100644 --- a/document/core/Makefile +++ b/document/core/Makefile @@ -201,7 +201,7 @@ WD-echidna: WD-tar -F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt python3 ../util/check-echidna-status.py $(BUILDDIR) @echo - @echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" + @echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" .PHONY: WD-echidna-CI WD-echidna-CI: WD-tar @@ -217,7 +217,7 @@ WD-echidna-CI: WD-tar -F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt python3 ../util/check-echidna-status.py $(BUILDDIR) @echo - @echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" + @echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" .PHONY: diff diff: bikeshed diff --git a/document/js-api/Makefile b/document/js-api/Makefile index 79a3ebfc8a..acd14cf25d 100644 --- a/document/js-api/Makefile +++ b/document/js-api/Makefile @@ -54,7 +54,7 @@ WD-echidna: WD-tar -F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt python3 ../util/check-echidna-status.py $(BUILDDIR) @echo - @echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" + @echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" .PHONY: WD-echidna-CI WD-echidna-CI: WD-tar @@ -70,4 +70,4 @@ WD-echidna-CI: WD-tar -F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt python3 ../util/check-echidna-status.py $(BUILDDIR) @echo - @echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" + @echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" diff --git a/document/web-api/Makefile b/document/web-api/Makefile index 22e82cc6cb..0deb3d9d4d 100644 --- a/document/web-api/Makefile +++ b/document/web-api/Makefile @@ -54,7 +54,7 @@ WD-echidna: WD-tar -F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt python3 ../util/check-echidna-status.py $(BUILDDIR) @echo - @echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" + @echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" .PHONY: WD-echidna-CI WD-echidna-CI: WD-tar @@ -70,4 +70,4 @@ WD-echidna-CI: WD-tar -F "dry-run=$(ECHIDNA_DRYRUN)" | tee $(BUILDDIR)/WD-echidna-id.txt python3 ../util/check-echidna-status.py $(BUILDDIR) @echo - @echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`" + @echo "Uploaded $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"