Skip to content

Commit 81bfc5f

Browse files
committed
Merge remote-tracking branch 'spec/wasm-3.0'
2 parents 70a3869 + 3b3d7aa commit 81bfc5f

File tree

166 files changed

+19776
-2497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+19776
-2497
lines changed

.github/workflows/ci-interpreter.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: CI for interpreter & tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, wasm-3.0 ]
66
paths: [ .github/**, interpreter/**, test/** ]
77

88
pull_request:
9-
branches: [ main ]
9+
branches: [ main, wasm-3.0 ]
1010
paths: [ .github/**, interpreter/**, test/** ]
1111

1212
# Allows you to run this workflow manually from the Actions tab
@@ -17,17 +17,17 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout repo
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
- name: Setup OCaml
22-
uses: ocaml/setup-ocaml@v2
22+
uses: ocaml/setup-ocaml@v3
2323
with:
2424
ocaml-compiler: 4.14.x
2525
- name: Setup OCaml tools
2626
run: opam install --yes ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
2727
- name: Setup Node.js
28-
uses: actions/setup-node@v2
28+
uses: actions/setup-node@v4
2929
with:
30-
node-version: 19.x
30+
node-version: 20.x
3131
- name: Build interpreter
3232
run: cd interpreter && opam exec make
3333
- name: Run tests

.github/workflows/ci-spec.yml

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: CI for specs
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, wasm-3.0 ]
66
paths: [ .github/**, document/** ]
77

88
pull_request:
9-
branches: [ main ]
9+
branches: [ main, wasm-3.0 ]
1010
paths: [ .github/**, document/** ]
1111

1212
# Allows you to run this workflow manually from the Actions tab
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout repo
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
with:
2222
submodules: "recursive"
2323
- name: Setup Node.js
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: 16
2727
- name: Setup Bikeshed
@@ -35,7 +35,7 @@ jobs:
3535
- name: Run Bikeshed
3636
run: cd document/core && make bikeshed
3737
- name: Upload artifact
38-
uses: actions/upload-artifact@v2
38+
uses: actions/upload-artifact@v4
3939
with:
4040
name: core-rendered
4141
path: document/core/_build/html
@@ -44,13 +44,13 @@ jobs:
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Checkout repo
47-
uses: actions/checkout@v2
47+
uses: actions/checkout@v4
4848
- name: Setup Bikeshed
4949
run: pip install bikeshed && bikeshed update
5050
- name: Run Bikeshed
5151
run: bikeshed spec "document/js-api/index.bs" "document/js-api/index.html"
5252
- name: Upload artifact
53-
uses: actions/upload-artifact@v2
53+
uses: actions/upload-artifact@v4
5454
with:
5555
name: js-api-rendered
5656
path: document/js-api/index.html
@@ -59,13 +59,13 @@ jobs:
5959
runs-on: ubuntu-latest
6060
steps:
6161
- name: Checkout repo
62-
uses: actions/checkout@v2
62+
uses: actions/checkout@v4
6363
- name: Setup Bikeshed
6464
run: pip install bikeshed && bikeshed update
6565
- name: Run Bikeshed
6666
run: bikeshed spec "document/web-api/index.bs" "document/web-api/index.html"
6767
- name: Upload artifact
68-
uses: actions/upload-artifact@v2
68+
uses: actions/upload-artifact@v4
6969
with:
7070
name: web-api-rendered
7171
path: document/web-api/index.html
@@ -75,7 +75,7 @@ jobs:
7575
needs: [build-core-spec]
7676
steps:
7777
- name: Checkout repo
78-
uses: actions/checkout@v2
78+
uses: actions/checkout@v4
7979
with:
8080
submodules: "recursive"
8181
- name: Setup TexLive
@@ -85,7 +85,7 @@ jobs:
8585
- name: Build main spec
8686
run: cd document/metadata/code && make main
8787
- name: Upload artifact
88-
uses: actions/upload-artifact@v2
88+
uses: actions/upload-artifact@v4
8989
with:
9090
name: code-metadata-rendered
9191
path: document/metadata/code/_build/html
@@ -94,7 +94,7 @@ jobs:
9494
runs-on: ubuntu-latest
9595
steps:
9696
- name: Checkout repo
97-
uses: actions/checkout@v2
97+
uses: actions/checkout@v4
9898
with:
9999
submodules: "recursive"
100100
- name: Setup TexLive
@@ -104,7 +104,7 @@ jobs:
104104
- name: Build main spec
105105
run: cd document/legacy/exceptions/core && make main
106106
- name: Upload artifact
107-
uses: actions/upload-artifact@v2
107+
uses: actions/upload-artifact@v4
108108
with:
109109
name: legacy-exceptions-core-rendered
110110
path: document/legacy/exceptions/core/_build/html
@@ -119,52 +119,75 @@ jobs:
119119
- name: Run Bikeshed
120120
run: bikeshed spec "document/legacy/exceptions/js-api/index.bs" "document/legacy/exceptions/js-api/index.html"
121121
- name: Upload artifact
122-
uses: actions/upload-artifact@v2
122+
uses: actions/upload-artifact@v4
123123
with:
124124
name: legacy-exceptions-js-api-rendered
125125
path: document/legacy/exceptions/js-api/index.html
126126

127+
build-spec-versions:
128+
runs-on: ubuntu-latest
129+
steps:
130+
- name: Checkout repo
131+
uses: actions/checkout@v4
132+
- name: Upload artifacts
133+
uses: actions/upload-artifact@v4
134+
with:
135+
name: versions-rendered
136+
path: document/versions/
137+
127138
publish-spec:
128139
runs-on: ubuntu-latest
129-
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]
140+
needs:
141+
- build-core-spec
142+
- build-js-api-spec
143+
- build-web-api-spec
144+
- build-code-metadata-spec
145+
- build-legacy-exceptions-core-spec
146+
- build-legacy-exceptions-js-api-spec
147+
- build-spec-versions
130148
steps:
131149
- name: Checkout repo
132-
uses: actions/checkout@v2
150+
uses: actions/checkout@v4
133151
- name: Create output directory
134152
run: mkdir _output && cp document/index.html _output/index.html
135153
- name: Download core spec artifact
136-
uses: actions/download-artifact@v2
154+
uses: actions/download-artifact@v4
137155
with:
138156
name: core-rendered
139157
path: _output/core
140158
- name: Download JS API spec artifact
141-
uses: actions/download-artifact@v2
159+
uses: actions/download-artifact@v4
142160
with:
143161
name: js-api-rendered
144162
path: _output/js-api
145163
- name: Download Web API spec artifact
146-
uses: actions/download-artifact@v2
164+
uses: actions/download-artifact@v4
147165
with:
148166
name: web-api-rendered
149167
path: _output/web-api
150168
- name: Download code metadata spec artifact
151-
uses: actions/download-artifact@v2
169+
uses: actions/download-artifact@v4
152170
with:
153171
name: code-metadata-rendered
154172
path: _output/metadata/code
155173
- name: Download legacy exceptions core spec artifact
156-
uses: actions/download-artifact@v2
174+
uses: actions/download-artifact@v4
157175
with:
158176
name: legacy-exceptions-core-rendered
159177
path: _output/legacy/exceptions/core
160178
- name: Download legacy exceptions JS API spec artifact
161-
uses: actions/download-artifact@v2
179+
uses: actions/download-artifact@v4
162180
with:
163181
name: legacy-exceptions-js-api-rendered
164182
path: _output/legacy/exceptions/js-api
183+
- name: Download spec versions artifacts
184+
uses: actions/download-artifact@v4
185+
with:
186+
name: versions-rendered
187+
path: _output/versions
165188
- name: Publish to GitHub Pages
166189
if: github.ref == 'refs/heads/main'
167-
uses: peaceiris/actions-gh-pages@v3
190+
uses: peaceiris/actions-gh-pages@v4
168191
with:
169192
publish_dir: ./_output
170193
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/w3c-publish.yml

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,76 @@
1-
name: Publish to W3C TR space
1+
name: Validate/Publish to W3C TR space
22

33
on:
44
push:
55
branches: [ main ]
66
paths: [ .github/**, document/** ]
7+
pull_request:
8+
paths: [ .github/**, document/** ]
79

8-
# Allows you to run this workflow manually from the Actions tab
10+
# Allows you to run this workflow manually from the Actions tab, gh CLI tool,
11+
# or REST API. THe w3c-status options correspond to the valid options for
12+
# Bikeshed's --md-status flag, and refer to the W3C rec-track document
13+
# stages described in https://www.w3.org/policies/process/#maturity-stages
14+
# (Editor's Draft, Working Draft, Candidiate Recommendation Draft, and
15+
# Candidate Recommendation Snapshot).
916
workflow_dispatch:
17+
inputs:
18+
dry-run:
19+
required: true
20+
type: boolean
21+
description: If set, Echidna will validate but not publish.
22+
w3c-status:
23+
required: true
24+
type: choice
25+
description: W3C Document Status
26+
options:
27+
- ED
28+
- WD
29+
- CRD
30+
- CR
31+
32+
env:
33+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
34+
W3C_STATUS: ${{ github.event_name == 'workflow_dispatch' && inputs.w3c-status || 'CRD' }}
1035

1136
jobs:
1237
publish-to-w3c-TR:
13-
if: github.repository == 'WebAssembly/spec'
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
spec: [core, js-api, web-api]
1442
runs-on: ubuntu-latest
1543
steps:
1644
- name: Checkout repo
17-
uses: actions/checkout@v2
45+
uses: actions/checkout@v4
1846
with:
1947
submodules: "recursive"
2048
- name: Setup Node.js
21-
uses: actions/setup-node@v3
49+
uses: actions/setup-node@v4
2250
with:
2351
node-version: 16
2452
- name: Setup Bikeshed
2553
run: pip install bikeshed && bikeshed update
2654
- name: Setup TexLive
55+
if: ${{ matrix.spec == 'core' }}
2756
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
2857
- name: Setup Sphinx
58+
if: ${{ matrix.spec == 'core' }}
2959
run: pip install six && pip install sphinx==5.1.0
30-
- name: Publish all specs to their https://www.w3.org/TR/ URLs
31-
run: cd document && make -e WD-echidna-CI
60+
- name: Publish ${{ matrix.spec }} spec to its https://www.w3.org/TR/ URL
61+
if: env.W3C_ECHIDNA_TOKEN_CORE
62+
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna-CI
3263
env:
33-
STATUS: --md-status=WD
3464
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
3565
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
3666
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
37-
YARN_ENABLE_IMMUTABLE_INSTALLS: false
67+
# Publish the draft on manual dispatches without dry-run set, or on pushes to the main branch.
68+
ECHIDNA_DRYRUN: |-
69+
${{ !((github.event_name == 'workflow_dispatch' && !inputs.dry-run) ||
70+
(github.event_name == 'push' && github.repository == 'WebAssembly/spec' && github.ref == 'refs/heads/main')) }}
71+
- name: Validate ${{ matrix.spec }} spec with Echidna
72+
if: env.W3C_USERNAME
73+
run: cd document && make -e -C ${{ matrix.spec }} WD-echidna
74+
env:
75+
W3C_USERNAME: ${{ secrets.W3C_USERNAME }}
76+
W3C_PASSWORD: ${{ secrets.W3C_PASSWORD }}

document/LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This document is licensed under the W3C Software and Document License.
2+
Its text can be found at https://www.w3.org/copyright/software-license/

document/Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DIRS = core js-api web-api metadata/code legacy/exceptions
1+
DIRS = core js-api web-api metadata/code legacy/exceptions versions
22
FILES = index.html
33
BUILDDIR = _build
44
TAR = tar
@@ -28,21 +28,21 @@ diff: $(DIRS:%=diff-%)
2828
# macOS: do “brew install tar” & run “make” as: TAR=gtar make -e WD-tar
2929
.PHONY: WD-tar
3030
WD-tar:
31-
for dir in $(DIRS); \
32-
do STATUS=--md-status=WD TAR=$(TAR) $(MAKE) -e -C $$dir $@;\
31+
for dir in $(DIRS); do \
32+
TAR=$(TAR) $(MAKE) -e -C $$dir $@ || exit 1; \
3333
done
3434

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

4242
.PHONY: WD-echidna-CI
4343
WD-echidna-CI:
44-
for dir in $(DIRS); \
45-
do $(MAKE) -e -C $$dir $@;\
44+
for dir in $(DIRS); do \
45+
$(MAKE) -e -C $$dir $@ || exit 1; \
4646
done
4747

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

6262
.PHONY: $(DIRS:%=dir-%)
63-
$(DIRS:%=dir-%): dir-%:
63+
$(DIRS:%=dir-%): dir-%: $(BUILDDIR)
6464
mkdir -p $(BUILDDIR)/$(@:dir-%=%)
6565
rm -rf $(BUILDDIR)/$(@:dir-%=%)/*
6666
cp -R $(@:dir-%=%)/$(BUILDDIR)/html/* $(BUILDDIR)/$(@:dir-%=%)/

0 commit comments

Comments
 (0)