@@ -2,12 +2,12 @@ name: CI for specs
22
33on :
44 push :
5- branches : [ main ]
6- paths : [ .github/**, document/** ]
5+ branches : [ main, wasm-3.0 ]
6+ paths : [ .github/**, document/**, spectec/** ]
77
88 pull_request :
9- branches : [ main ]
10- paths : [ .github/**, document/** ]
9+ branches : [ main, wasm-3.0 ]
10+ paths : [ .github/**, document/**, spectec/** ]
1111
1212 # Allows you to run this workflow manually from the Actions tab
1313 workflow_dispatch :
@@ -17,25 +17,33 @@ 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"
23+ - name : Setup OCaml
24+ uses : ocaml/setup-ocaml@v3
25+ with :
26+ ocaml-compiler : 4.14.x
27+ - name : Setup Dune
28+ run : opam install --yes dune menhir mdx zarith && opam exec dune --version
2329 - name : Setup Node.js
24- uses : actions/setup-node@v3
30+ uses : actions/setup-node@v4
2531 with :
2632 node-version : 16
2733 - name : Setup Bikeshed
2834 run : pip install bikeshed && bikeshed update
2935 - name : Setup TexLive
3036 run : sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
3137 - name : Setup Sphinx
32- run : pip install six && pip install sphinx==5.1.0
38+ run : pip install six && pip install sphinx==8.1.3
39+ - name : Build SpecTec
40+ run : cd spectec && opam exec make
3341 - name : Build main spec
34- run : cd document/core && make main
42+ run : cd document/core && opam exec make main
3543 - name : Run Bikeshed
36- run : cd document/core && make bikeshed
44+ run : cd document/core && opam exec make bikeshed
3745 - name : Upload artifact
38- uses : actions/upload-artifact@v2
46+ uses : actions/upload-artifact@v4
3947 with :
4048 name : core-rendered
4149 path : document/core/_build/html
@@ -44,13 +52,13 @@ jobs:
4452 runs-on : ubuntu-latest
4553 steps :
4654 - name : Checkout repo
47- uses : actions/checkout@v2
55+ uses : actions/checkout@v4
4856 - name : Setup Bikeshed
4957 run : pip install bikeshed && bikeshed update
5058 - name : Run Bikeshed
5159 run : bikeshed spec "document/js-api/index.bs" "document/js-api/index.html"
5260 - name : Upload artifact
53- uses : actions/upload-artifact@v2
61+ uses : actions/upload-artifact@v4
5462 with :
5563 name : js-api-rendered
5664 path : document/js-api/index.html
@@ -59,43 +67,134 @@ jobs:
5967 runs-on : ubuntu-latest
6068 steps :
6169 - name : Checkout repo
62- uses : actions/checkout@v2
70+ uses : actions/checkout@v4
6371 - name : Setup Bikeshed
6472 run : pip install bikeshed && bikeshed update
6573 - name : Run Bikeshed
6674 run : bikeshed spec "document/web-api/index.bs" "document/web-api/index.html"
6775 - name : Upload artifact
68- uses : actions/upload-artifact@v2
76+ uses : actions/upload-artifact@v4
6977 with :
7078 name : web-api-rendered
7179 path : document/web-api/index.html
7280
81+ build-code-metadata-spec :
82+ runs-on : ubuntu-latest
83+ steps :
84+ - name : Checkout repo
85+ uses : actions/checkout@v4
86+ with :
87+ submodules : " recursive"
88+ - name : Setup TexLive
89+ run : sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
90+ - name : Setup Sphinx
91+ run : pip install six && pip install sphinx==8.1.3
92+ - name : Build main spec
93+ run : cd document/metadata/code && make main
94+ - name : Upload artifact
95+ uses : actions/upload-artifact@v4
96+ with :
97+ name : code-metadata-rendered
98+ path : document/metadata/code/_build/html
99+
100+ build-legacy-exceptions-core-spec :
101+ runs-on : ubuntu-latest
102+ steps :
103+ - name : Checkout repo
104+ uses : actions/checkout@v4
105+ with :
106+ submodules : " recursive"
107+ - name : Setup TexLive
108+ run : sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
109+ - name : Setup Sphinx
110+ run : pip install six && pip install sphinx==8.1.3
111+ - name : Build main spec
112+ run : cd document/legacy/exceptions/core && make main
113+ - name : Upload artifact
114+ uses : actions/upload-artifact@v4
115+ with :
116+ name : legacy-exceptions-core-rendered
117+ path : document/legacy/exceptions/core/_build/html
118+
119+ build-legacy-exceptions-js-api-spec :
120+ runs-on : ubuntu-latest
121+ steps :
122+ - name : Checkout repo
123+ uses : actions/checkout@v4
124+ - name : Setup Bikeshed
125+ run : pip install bikeshed && bikeshed update
126+ - name : Run Bikeshed
127+ run : bikeshed spec "document/legacy/exceptions/js-api/index.bs" "document/legacy/exceptions/js-api/index.html"
128+ - name : Upload artifact
129+ uses : actions/upload-artifact@v4
130+ with :
131+ name : legacy-exceptions-js-api-rendered
132+ path : document/legacy/exceptions/js-api/index.html
133+
134+ build-spec-versions :
135+ runs-on : ubuntu-latest
136+ steps :
137+ - name : Checkout repo
138+ uses : actions/checkout@v4
139+ - name : Upload artifacts
140+ uses : actions/upload-artifact@v4
141+ with :
142+ name : versions-rendered
143+ path : document/versions/
144+
73145 publish-spec :
74146 runs-on : ubuntu-latest
75- needs : [build-core-spec, build-js-api-spec, build-web-api-spec]
147+ needs :
148+ - build-core-spec
149+ - build-js-api-spec
150+ - build-web-api-spec
151+ - build-code-metadata-spec
152+ - build-legacy-exceptions-core-spec
153+ - build-legacy-exceptions-js-api-spec
154+ - build-spec-versions
76155 steps :
77156 - name : Checkout repo
78- uses : actions/checkout@v2
157+ uses : actions/checkout@v4
79158 - name : Create output directory
80159 run : mkdir _output && cp document/index.html _output/index.html
81160 - name : Download core spec artifact
82- uses : actions/download-artifact@v2
161+ uses : actions/download-artifact@v4
83162 with :
84163 name : core-rendered
85164 path : _output/core
86165 - name : Download JS API spec artifact
87- uses : actions/download-artifact@v2
166+ uses : actions/download-artifact@v4
88167 with :
89168 name : js-api-rendered
90169 path : _output/js-api
91170 - name : Download Web API spec artifact
92- uses : actions/download-artifact@v2
171+ uses : actions/download-artifact@v4
93172 with :
94173 name : web-api-rendered
95174 path : _output/web-api
175+ - name : Download code metadata spec artifact
176+ uses : actions/download-artifact@v4
177+ with :
178+ name : code-metadata-rendered
179+ path : _output/metadata/code
180+ - name : Download legacy exceptions core spec artifact
181+ uses : actions/download-artifact@v4
182+ with :
183+ name : legacy-exceptions-core-rendered
184+ path : _output/legacy/exceptions/core
185+ - name : Download legacy exceptions JS API spec artifact
186+ uses : actions/download-artifact@v4
187+ with :
188+ name : legacy-exceptions-js-api-rendered
189+ path : _output/legacy/exceptions/js-api
190+ - name : Download spec versions artifacts
191+ uses : actions/download-artifact@v4
192+ with :
193+ name : versions-rendered
194+ path : _output/versions
96195 - name : Publish to GitHub Pages
97196 if : github.ref == 'refs/heads/main'
98- uses : peaceiris/actions-gh-pages@v3
197+ uses : peaceiris/actions-gh-pages@v4
99198 with :
100199 publish_dir : ./_output
101200 github_token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments