@@ -2,40 +2,57 @@ name: CI for specs
22
33on :
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
1515jobs :
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 }}
0 commit comments