Skip to content

Commit 4ccad2f

Browse files
Merge remote-tracking branch 'spec/main' into merge2
2 parents f521d7b + 1b2b34a commit 4ccad2f

File tree

1,019 files changed

+436952
-6887
lines changed

Some content is hidden

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

1,019 files changed

+436952
-6887
lines changed

.github/workflows/ci-interpreter.yml

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

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

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

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
@@ -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
- name: Setup OCaml
2222
uses: ocaml/setup-ocaml@v3
2323
with:
24-
ocaml-compiler: 4.12.x
24+
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: Build interpreter

.github/workflows/ci-spec.yml

Lines changed: 129 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,57 @@ name: CI for specs
22

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

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

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
1414

1515
jobs:
16+
ensure-wasm-latest:
17+
if: ${{ github.repository == 'WebAssembly/spec' }}
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repo
21+
uses: actions/checkout@v4
22+
- name: Diff wasm-latest
23+
run: bash .github/workflows/diff-wasm-latest.sh
24+
1625
build-core-spec:
1726
runs-on: ubuntu-latest
1827
steps:
1928
- name: Checkout repo
20-
uses: actions/checkout@v2
29+
uses: actions/checkout@v4
2130
with:
2231
submodules: "recursive"
32+
- name: Setup OCaml
33+
uses: ocaml/setup-ocaml@v3
34+
with:
35+
ocaml-compiler: 4.14.x
36+
- name: Setup Dune
37+
run: opam install --yes dune menhir mdx zarith && opam exec dune --version
2338
- name: Setup Node.js
24-
uses: actions/setup-node@v3
39+
uses: actions/setup-node@v4
2540
with:
2641
node-version: 16
2742
- name: Setup Bikeshed
2843
run: pip install bikeshed && bikeshed update
2944
- name: Setup TexLive
3045
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
3146
- name: Setup Sphinx
32-
run: pip install six && pip install sphinx==5.1.0
47+
run: pip install six && pip install sphinx==8.1.3
48+
- name: Build SpecTec
49+
run: cd spectec && opam exec make
3350
- name: Build main spec
34-
run: cd document/core && make main
51+
run: cd document/core && opam exec make main
3552
- name: Run Bikeshed
36-
run: cd document/core && make bikeshed
53+
run: cd document/core && opam exec make bikeshed
3754
- name: Upload artifact
38-
uses: actions/upload-artifact@v2
55+
uses: actions/upload-artifact@v4
3956
with:
4057
name: core-rendered
4158
path: document/core/_build/html
@@ -44,13 +61,13 @@ jobs:
4461
runs-on: ubuntu-latest
4562
steps:
4663
- name: Checkout repo
47-
uses: actions/checkout@v2
64+
uses: actions/checkout@v4
4865
- name: Setup Bikeshed
4966
run: pip install bikeshed && bikeshed update
5067
- name: Run Bikeshed
5168
run: bikeshed spec "document/js-api/index.bs" "document/js-api/index.html"
5269
- name: Upload artifact
53-
uses: actions/upload-artifact@v2
70+
uses: actions/upload-artifact@v4
5471
with:
5572
name: js-api-rendered
5673
path: document/js-api/index.html
@@ -59,43 +76,135 @@ jobs:
5976
runs-on: ubuntu-latest
6077
steps:
6178
- name: Checkout repo
62-
uses: actions/checkout@v2
79+
uses: actions/checkout@v4
6380
- name: Setup Bikeshed
6481
run: pip install bikeshed && bikeshed update
6582
- name: Run Bikeshed
6683
run: bikeshed spec "document/web-api/index.bs" "document/web-api/index.html"
6784
- name: Upload artifact
68-
uses: actions/upload-artifact@v2
85+
uses: actions/upload-artifact@v4
6986
with:
7087
name: web-api-rendered
7188
path: document/web-api/index.html
7289

90+
build-code-metadata-spec:
91+
runs-on: ubuntu-latest
92+
steps:
93+
- name: Checkout repo
94+
uses: actions/checkout@v4
95+
with:
96+
submodules: "recursive"
97+
- name: Setup TexLive
98+
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
99+
- name: Setup Sphinx
100+
run: pip install six && pip install sphinx==8.1.3
101+
- name: Build main spec
102+
run: cd document/metadata/code && make main
103+
- name: Upload artifact
104+
uses: actions/upload-artifact@v4
105+
with:
106+
name: code-metadata-rendered
107+
path: document/metadata/code/_build/html
108+
109+
build-legacy-exceptions-core-spec:
110+
runs-on: ubuntu-latest
111+
steps:
112+
- name: Checkout repo
113+
uses: actions/checkout@v4
114+
with:
115+
submodules: "recursive"
116+
- name: Setup TexLive
117+
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
118+
- name: Setup Sphinx
119+
run: pip install six && pip install sphinx==8.1.3
120+
- name: Build main spec
121+
run: cd document/legacy/exceptions/core && make main
122+
- name: Upload artifact
123+
uses: actions/upload-artifact@v4
124+
with:
125+
name: legacy-exceptions-core-rendered
126+
path: document/legacy/exceptions/core/_build/html
127+
128+
build-legacy-exceptions-js-api-spec:
129+
runs-on: ubuntu-latest
130+
steps:
131+
- name: Checkout repo
132+
uses: actions/checkout@v4
133+
- name: Setup Bikeshed
134+
run: pip install bikeshed && bikeshed update
135+
- name: Run Bikeshed
136+
run: bikeshed spec "document/legacy/exceptions/js-api/index.bs" "document/legacy/exceptions/js-api/index.html"
137+
- name: Upload artifact
138+
uses: actions/upload-artifact@v4
139+
with:
140+
name: legacy-exceptions-js-api-rendered
141+
path: document/legacy/exceptions/js-api/index.html
142+
143+
build-spec-versions:
144+
runs-on: ubuntu-latest
145+
steps:
146+
- name: Checkout repo
147+
uses: actions/checkout@v4
148+
- name: Upload artifacts
149+
uses: actions/upload-artifact@v4
150+
with:
151+
name: versions-rendered
152+
path: document/versions/
153+
73154
publish-spec:
74155
runs-on: ubuntu-latest
75-
needs: [build-core-spec, build-js-api-spec, build-web-api-spec]
156+
needs:
157+
- ensure-wasm-latest
158+
- build-core-spec
159+
- build-js-api-spec
160+
- build-web-api-spec
161+
- build-code-metadata-spec
162+
- build-legacy-exceptions-core-spec
163+
- build-legacy-exceptions-js-api-spec
164+
- build-spec-versions
76165
steps:
77166
- name: Checkout repo
78-
uses: actions/checkout@v2
167+
uses: actions/checkout@v4
79168
- name: Create output directory
80169
run: mkdir _output && cp document/index.html _output/index.html
81170
- name: Download core spec artifact
82-
uses: actions/download-artifact@v2
171+
uses: actions/download-artifact@v4
83172
with:
84173
name: core-rendered
85174
path: _output/core
86175
- name: Download JS API spec artifact
87-
uses: actions/download-artifact@v2
176+
uses: actions/download-artifact@v4
88177
with:
89178
name: js-api-rendered
90179
path: _output/js-api
91180
- name: Download Web API spec artifact
92-
uses: actions/download-artifact@v2
181+
uses: actions/download-artifact@v4
93182
with:
94183
name: web-api-rendered
95184
path: _output/web-api
185+
- name: Download code metadata spec artifact
186+
uses: actions/download-artifact@v4
187+
with:
188+
name: code-metadata-rendered
189+
path: _output/metadata/code
190+
- name: Download legacy exceptions core spec artifact
191+
uses: actions/download-artifact@v4
192+
with:
193+
name: legacy-exceptions-core-rendered
194+
path: _output/legacy/exceptions/core
195+
- name: Download legacy exceptions JS API spec artifact
196+
uses: actions/download-artifact@v4
197+
with:
198+
name: legacy-exceptions-js-api-rendered
199+
path: _output/legacy/exceptions/js-api
200+
- name: Download spec versions artifacts
201+
uses: actions/download-artifact@v4
202+
with:
203+
name: versions-rendered
204+
path: _output/versions
96205
- name: Publish to GitHub Pages
97206
if: github.ref == 'refs/heads/main'
98-
uses: peaceiris/actions-gh-pages@v3
207+
uses: peaceiris/actions-gh-pages@v4
99208
with:
100209
publish_dir: ./_output
101210
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci-spectec.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI for spectec
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ spectec/**, document/** ]
7+
8+
pull_request:
9+
branches: [ main ]
10+
paths: [ spectec/**, document/** ]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
spec-tec:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@v4
21+
- name: Setup OCaml
22+
uses: ocaml/setup-ocaml@v3
23+
with:
24+
ocaml-compiler: 4.14.x
25+
- name: Setup Dune
26+
run: opam install --yes dune menhir mdx zarith
27+
- name: Setup Latex
28+
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
29+
- name: Setup Sphinx
30+
run: pip install six && pip install sphinx==8.1.3
31+
- name: Build and test
32+
run: cd spectec && opam exec make ci
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Identify the highest versioned directory
4+
HIGHEST_VER=$(ls -d specification/wasm-[0-9]* 2>/dev/null | sort -V | tail -n 1)
5+
6+
if [ -z "$HIGHEST_VER" ]; then
7+
echo "❌ Error: No wasm-X.Y versioned directories found in specification/"
8+
exit 1
9+
fi
10+
11+
LATEST="specification/wasm-latest"
12+
13+
# Check that wasm-latest exists
14+
if [ ! -d "$LATEST" ]; then
15+
echo "❌ Error: $LATEST does not exist."
16+
exit 1
17+
fi
18+
19+
# Diff the highest version with wasm-latest and check that the diff is empty
20+
echo "Checking for differences between $HIGHEST_VER and $LATEST..."
21+
22+
if diff -qr "$HIGHEST_VER" "$LATEST" > /dev/null; then
23+
echo "✅ Success: Contents match. No changes needed."
24+
else
25+
echo "🔍 Differences detected:"
26+
echo "--------------------------------"
27+
diff -r "$HIGHEST_VER" "$LATEST"
28+
echo "--------------------------------"
29+
exit 1
30+
fi

.github/workflows/mirror-to-master.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)