Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/wasm-3.0' into HEAD
Browse files Browse the repository at this point in the history
See #82
  • Loading branch information
sbc100 committed Sep 23, 2024
2 parents 4bded37 + f501994 commit d8f6d8e
Show file tree
Hide file tree
Showing 27 changed files with 940 additions and 282 deletions.
49 changes: 36 additions & 13 deletions .github/workflows/ci-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Run Bikeshed
run: cd document/core && make bikeshed
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: core-rendered
path: document/core/_build/html
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Run Bikeshed
run: bikeshed spec "document/js-api/index.bs" "document/js-api/index.html"
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: js-api-rendered
path: document/js-api/index.html
Expand All @@ -65,7 +65,7 @@ jobs:
- name: Run Bikeshed
run: bikeshed spec "document/web-api/index.bs" "document/web-api/index.html"
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: web-api-rendered
path: document/web-api/index.html
Expand All @@ -85,7 +85,7 @@ jobs:
- name: Build main spec
run: cd document/metadata/code && make main
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: code-metadata-rendered
path: document/metadata/code/_build/html
Expand All @@ -104,7 +104,7 @@ jobs:
- name: Build main spec
run: cd document/legacy/exceptions/core && make main
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: legacy-exceptions-core-rendered
path: document/legacy/exceptions/core/_build/html
Expand All @@ -119,49 +119,72 @@ jobs:
- name: Run Bikeshed
run: bikeshed spec "document/legacy/exceptions/js-api/index.bs" "document/legacy/exceptions/js-api/index.html"
- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
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
- name: Create output directory
run: mkdir _output && cp document/index.html _output/index.html
- name: Download core spec artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: core-rendered
path: _output/core
- name: Download JS API spec artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: js-api-rendered
path: _output/js-api
- name: Download Web API spec artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: web-api-rendered
path: _output/web-api
- name: Download code metadata spec artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: code-metadata-rendered
path: _output/metadata/code
- name: Download legacy exceptions core spec artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: legacy-exceptions-core-rendered
path: _output/legacy/exceptions/core
- name: Download legacy exceptions JS API spec artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
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
17 changes: 14 additions & 3 deletions .github/workflows/w3c-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,23 @@ on:
branches: [ main ]
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: string
type: choice
description: W3C Document Status
options:
- ED
- WD
- CRD
- CR

jobs:
publish-to-w3c-TR:
Expand All @@ -34,7 +45,7 @@ jobs:
- name: Publish all specs to their https://www.w3.org/TR/ URLs
run: cd document && make -e WD-echidna-CI
env:
W3C_STATUS: ${{ github.event_name == 'push' && 'WD' || inputs.w3c-status }}
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
4 changes: 2 additions & 2 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 @@ -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
3 changes: 2 additions & 1 deletion document/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ DOWNLOADDIR = _download
NAME = WebAssembly
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 @@ -155,7 +156,7 @@ bikeshed: $(GENERATED)
@echo
@echo =========================================================================
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
bikeshed spec --md-status=$(W3C_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
Loading

0 comments on commit d8f6d8e

Please sign in to comment.