Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/wasm-3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rossberg committed Sep 24, 2024
2 parents c85c0a6 + f501994 commit 2907d07
Show file tree
Hide file tree
Showing 49 changed files with 1,846 additions and 786 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/ci-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,27 @@ jobs:
name: legacy-exceptions-js-api-rendered
path: document/legacy/exceptions/js-api/index.html

build-spec-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: versions-rendered
path: document/versions/

publish-spec:
runs-on: ubuntu-latest
needs: [build-core-spec, build-js-api-spec, build-web-api-spec, build-code-metadata-spec, build-legacy-exceptions-core-spec, build-legacy-exceptions-js-api-spec]
needs:
- build-core-spec
- build-js-api-spec
- build-web-api-spec
- build-code-metadata-spec
- build-legacy-exceptions-core-spec
- build-legacy-exceptions-js-api-spec
- build-spec-versions
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand Down Expand Up @@ -170,6 +188,11 @@ jobs:
with:
name: legacy-exceptions-js-api-rendered
path: _output/legacy/exceptions/js-api
- name: Download spec versions artifacts
uses: actions/download-artifact@v4
with:
name: versions-rendered
path: _output/versions
- name: Publish to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/w3c-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,23 @@ on:
branches: [ main-only-on-spec-repo ]
paths: [ .github/**, document/** ]

# Allows you to run this workflow manually from the Actions tab
# Allows you to run this workflow manually from the Actions tab, gh CLI tool,
# or REST API. THe w3c-status options correspond to the valid options for
# Bikeshed's --md-status flag, and refer to the W3C rec-track document
# stages described in https://www.w3.org/policies/process/#maturity-stages
# (Editor's Draft, Working Draft, Candidiate Recommendation Draft, and
# Candidate Recommendation Snapshot).
workflow_dispatch:
inputs:
w3c-status:
required: true
type: choice
description: W3C Document Status
options:
- ED
- WD
- CRD
- CR

jobs:
publish-to-w3c-TR:
Expand All @@ -32,7 +47,7 @@ jobs:
- name: Publish all specs to their https://www.w3.org/TR/ URLs
run: cd document && make -e WD-echidna-CI
env:
STATUS: --md-status=WD
W3C_STATUS: ${{ github.event_name == 'push' && 'CRD' || inputs.w3c-status }}
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
Expand Down
2 changes: 2 additions & 0 deletions document/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This document is licensed under the W3C Software and Document License.
Its text can be found at https://www.w3.org/copyright/software-license/
16 changes: 8 additions & 8 deletions document/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DIRS = core js-api web-api metadata/code legacy/exceptions
DIRS = core js-api web-api metadata/code legacy/exceptions versions
FILES = index.html
BUILDDIR = _build
TAR = tar
Expand Down Expand Up @@ -28,21 +28,21 @@ diff: $(DIRS:%=diff-%)
# macOS: do “brew install tar” & run “make” as: TAR=gtar make -e WD-tar
.PHONY: WD-tar
WD-tar:
for dir in $(DIRS); \
do STATUS=--md-status=WD TAR=$(TAR) $(MAKE) -e -C $$dir $@;\
for dir in $(DIRS); do \
TAR=$(TAR) $(MAKE) -e -C $$dir $@ || exit 1; \
done

# macOS: do “brew install tar” & run “make” as: TAR=gtar make -e WD-echidna
.PHONY: WD-echidna
WD-echidna:
for dir in $(DIRS); \
do $(MAKE) -e -C $$dir $@;\
for dir in $(DIRS); do \
$(MAKE) -e -C $$dir $@ || exit 1; \
done

.PHONY: WD-echidna-CI
WD-echidna-CI:
for dir in $(DIRS); \
do $(MAKE) -e -C $$dir $@;\
for dir in $(DIRS); do \
$(MAKE) -e -C $$dir $@ || exit 1; \
done

# Directory-specific targets.
Expand All @@ -60,7 +60,7 @@ $(DIRS:%=build-%): build-%:
(cd $(@:build-%=%); make BUILDDIR=$(BUILDDIR) all)

.PHONY: $(DIRS:%=dir-%)
$(DIRS:%=dir-%): dir-%:
$(DIRS:%=dir-%): dir-%: $(BUILDDIR)
mkdir -p $(BUILDDIR)/$(@:dir-%=%)
rm -rf $(BUILDDIR)/$(@:dir-%=%)/*
cp -R $(@:dir-%=%)/$(BUILDDIR)/html/* $(BUILDDIR)/$(@:dir-%=%)/
Expand Down
10 changes: 6 additions & 4 deletions document/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#

# You can set these variables from the command line.
W3C_STATUS = ED
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER = a4
Expand All @@ -15,8 +16,9 @@ BUILDDIR = _build
STATICDIR = _static
DOWNLOADDIR = _download
NAME = WebAssembly
DECISION_URL = https://github.com/WebAssembly/meetings/blob/main/main/2017/WG-12-06.md
DECISION_URL = https://github.com/WebAssembly/meetings/blob/main/main/2024/WG-06-12.md
TAR = tar
DEADLINE = $(shell date -d "+30 days" +%Y-%m-%d 2>/dev/null || date -v +30d +%Y-%m-%d)

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
Expand Down Expand Up @@ -199,7 +201,7 @@ bikeshed-nested: $(GENERATED)
@echo
@echo =========================================================================
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
bikeshed spec $(STATUS) index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
bikeshed spec --md-status=$(W3C_STATUS) --md-deadline=$(DEADLINE) index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
mkdir -p $(BUILDDIR)/html/bikeshed/
(cd util/katex/ && yarn && yarn build && npm install --only=prod)
python3 util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
Expand Down Expand Up @@ -239,7 +241,7 @@ WD-echidna: WD-tar
-F "tar=@$(BUILDDIR)/WD.tar" \
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
@echo
@echo "Published working draft. Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
@echo "Published $(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
Expand All @@ -253,7 +255,7 @@ WD-echidna-CI: WD-tar
-F "token=$(W3C_ECHIDNA_TOKEN_CORE)" \
-F "decision=$(DECISION_URL)" | tee $(BUILDDIR)/WD-echidna-id.txt
@echo
@echo "Published working draft. Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"
@echo "Published $(W3C_STATUS). Check its status at https://labs.w3.org/echidna/api/status?id=`cat $(BUILDDIR)/WD-echidna-id.txt`"

.PHONY: diff
diff: bikeshed
Expand Down
Loading

0 comments on commit 2907d07

Please sign in to comment.