Skip to content

Commit 4799452

Browse files
committed
Merge branch 'main' into embedding-invoke
2 parents fdf1b7c + 25632dd commit 4799452

Some content is hidden

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

83 files changed

+5680
-3160
lines changed

.github/workflows/ci-interpreter.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI for interpreter & tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ interpreter/**, test/** ]
7+
8+
pull_request:
9+
branches: [ main ]
10+
paths: [ interpreter/**, test/** ]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
interpreter:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@v2
21+
- name: Setup OCaml
22+
uses: ocaml/setup-ocaml@v2
23+
with:
24+
ocaml-compiler: 4.12.x
25+
- name: Setup OCaml tools
26+
run: opam install --yes ocamlbuild.0.14.0 ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v2
29+
with:
30+
node-version: 19.x
31+
- name: Build interpreter
32+
run: cd interpreter && opam exec make
33+
- name: Run tests
34+
# Node can't handle the new instructions yet
35+
# run: cd interpreter && opam exec make JS='node --experimental-wasm-return_call' ci
36+
run: cd interpreter && opam exec make ci

.github/workflows/ci-spec.yml

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: CI for specs
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths: [ document/** ]
7+
8+
pull_request:
9+
branches: [ main ]
10+
paths: [ document/** ]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
jobs:
16+
build-core-spec:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@v2
21+
with:
22+
submodules: "recursive"
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: 16
27+
- name: Setup Bikeshed
28+
run: pip install bikeshed && bikeshed update
29+
- name: Setup TexLive
30+
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
31+
- name: Setup Sphinx
32+
run: pip install six && pip install sphinx==5.1.0
33+
- name: Build main spec
34+
run: cd document/core && make main
35+
# Deactivate broken Bikeshed build for the time being
36+
#- name: Run Bikeshed
37+
# run: cd document/core && make bikeshed
38+
- name: Upload artifact
39+
uses: actions/upload-artifact@v2
40+
with:
41+
name: core-rendered
42+
path: document/core/_build/html
43+
44+
build-legacy-exceptions-spec:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout repo
48+
uses: actions/checkout@v2
49+
with:
50+
submodules: "recursive"
51+
- name: Setup TexLive
52+
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
53+
- name: Setup Sphinx
54+
run: pip install six && pip install sphinx==5.1.0
55+
- name: Build main spec
56+
run: cd document/legacy/exceptions && make main
57+
- name: Upload artifact
58+
uses: actions/upload-artifact@v2
59+
with:
60+
name: legacy-exceptions-rendered
61+
path: document/legacy/exceptions/_build/html
62+
63+
build-js-api-spec:
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Checkout repo
67+
uses: actions/checkout@v2
68+
- name: Setup Bikeshed
69+
run: pip install bikeshed && bikeshed update
70+
- name: Run Bikeshed
71+
run: bikeshed spec "document/js-api/index.bs" "document/js-api/index.html"
72+
- name: Upload artifact
73+
uses: actions/upload-artifact@v2
74+
with:
75+
name: js-api-rendered
76+
path: document/js-api/index.html
77+
78+
build-web-api-spec:
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Checkout repo
82+
uses: actions/checkout@v2
83+
- name: Setup Bikeshed
84+
run: pip install bikeshed && bikeshed update
85+
- name: Run Bikeshed
86+
run: bikeshed spec "document/web-api/index.bs" "document/web-api/index.html"
87+
- name: Upload artifact
88+
uses: actions/upload-artifact@v2
89+
with:
90+
name: web-api-rendered
91+
path: document/web-api/index.html
92+
93+
publish-spec:
94+
runs-on: ubuntu-latest
95+
needs: [build-core-spec, build-legacy-exceptions-spec, build-js-api-spec, build-web-api-spec]
96+
steps:
97+
- name: Checkout repo
98+
uses: actions/checkout@v2
99+
- name: Create output directory
100+
run: mkdir _output && cp document/index.html _output/index.html
101+
- name: Download core spec artifact
102+
uses: actions/download-artifact@v2
103+
with:
104+
name: core-rendered
105+
path: _output/core
106+
- name: Download legacy exceptions spec artifact
107+
uses: actions/download-artifact@v2
108+
with:
109+
name: legacy-exceptions-rendered
110+
path: _output/legacy/exceptions
111+
- name: Download JS API spec artifact
112+
uses: actions/download-artifact@v2
113+
with:
114+
name: js-api-rendered
115+
path: _output/js-api
116+
- name: Download Web API spec artifact
117+
uses: actions/download-artifact@v2
118+
with:
119+
name: web-api-rendered
120+
path: _output/web-api
121+
- name: Publish to GitHub Pages
122+
if: github.ref == 'refs/heads/main'
123+
uses: peaceiris/actions-gh-pages@v3
124+
with:
125+
publish_dir: ./_output
126+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/main.yml

-103
This file was deleted.

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Mirror main branch to master branch
2+
13
on:
24
push:
35
branches:
@@ -8,8 +10,7 @@ jobs:
810
runs-on: ubuntu-latest
911
name: Mirror main branch to master branch
1012
steps:
11-
- name: Mirror action step
12-
id: mirror
13+
- name: Mirror branch
1314
uses: google/[email protected]
1415
with:
1516
github-token: ${{ secrets.GITHUB_TOKEN }}

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
![Build Status](https://github.com/WebAssembly/exception-handling/actions/workflows/main.yml/badge.svg)
1+
[![CI for specs](https://github.com/WebAssembly/exception-handling/actions/workflows/ci-spec.yml/badge.svg)](https://github.com/WebAssembly/exception-handling/actions/workflows/ci-spec.yml)
2+
[![CI for interpreter & tests](https://github.com/WebAssembly/exception-handling/actions/workflows/ci-interpreter.yml/badge.svg)](https://github.com/WebAssembly/exception-handling/actions/workflows/ci-interpreter.yml)
23

34
# Exception Handling Proposal for WebAssembly
45

@@ -11,7 +12,6 @@ summary of the proposal.
1112
[webassembly.github.io/exception-handling](https://webassembly.github.io/exception-handling/).
1213

1314
Original README from upstream repository follows...
14-
=======
1515

1616
# spec
1717

document/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DIRS = core js-api web-api
1+
DIRS = core js-api web-api legacy/exceptions
22
FILES = index.html
33
BUILDDIR = _build
44

document/core/Makefile

+18-9
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,14 @@ bikeshed-keep:
8989
echo Downloaded Bikeshed.
9090

9191

92-
.PHONY: index
93-
index:
94-
(cd appendix; ./gen-index-instructions.py)
92+
GENERATED = appendix/index-instructions.rst
93+
.INTERMEDIATE: $(GENERATED)
94+
95+
%.rst: %.py
96+
(cd `dirname $@`; ./`basename $^`)
9597

9698
.PHONY: pdf
97-
pdf: index latexpdf
99+
pdf: $(GENERATED) latexpdf
98100
mkdir -p $(BUILDDIR)/html/$(DOWNLOADDIR)
99101
ln -f $(BUILDDIR)/latex/$(NAME).pdf $(BUILDDIR)/html/$(DOWNLOADDIR)/$(NAME).pdf
100102

@@ -103,9 +105,10 @@ pdf: index latexpdf
103105
clean:
104106
rm -rf $(BUILDDIR)
105107
rm -rf $(STATICDIR)
108+
rm -f $(GENERATED)
106109

107110
.PHONY: html
108-
html: index
111+
html: $(GENERATED)
109112
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
110113
for file in `ls $(BUILDDIR)/html/*.html`; \
111114
do \
@@ -121,23 +124,29 @@ html: index
121124
@echo "Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html/."
122125

123126
.PHONY: dirhtml
124-
dirhtml:
127+
dirhtml: $(GENERATED)
125128
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
126129
@echo
127130
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
128131

129132
.PHONY: singlehtml
130-
singlehtml:
133+
singlehtml: $(GENERATED)
131134
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
132135
@echo
133136
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
134137

135138
.PHONY: bikeshed
136-
bikeshed:
139+
bikeshed: $(GENERATED)
137140
$(SPHINXBUILD) -b singlehtml -c util/bikeshed \
138141
$(ALLSPHINXOPTS) $(BUILDDIR)/bikeshed_singlehtml
139142
python3 util/bikeshed_fixup.py $(BUILDDIR)/bikeshed_singlehtml/index.html \
140143
>$(BUILDDIR)/bikeshed_singlehtml/index_fixed.html
144+
@echo ==== Showing contents of _build/bikeshed_singlehtml/index_fixed.html ====
145+
@head -n10 _build/bikeshed_singlehtml/index_fixed.html
146+
@echo ... skipping $$(expr `cat _build/bikeshed_singlehtml/index_fixed.html | wc -l` - 20) lines ...
147+
@tail -n10 _build/bikeshed_singlehtml/index_fixed.html
148+
@echo
149+
@echo =========================================================================
141150
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
142151
bikeshed spec index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
143152
mkdir -p $(BUILDDIR)/html/bikeshed/
@@ -259,7 +268,7 @@ latex:
259268
"(use \`make latexpdf' here to do that automatically)."
260269

261270
.PHONY: latexpdf
262-
latexpdf:
271+
latexpdf: $(GENERATED)
263272
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
264273
@echo "Running LaTeX files through pdflatex..."
265274
$(MAKE) -C $(BUILDDIR)/latex LATEXMKOPTS=" </dev/null" all-pdf >$(BUILDDIR)/latex/LOG 2>&1 || cat $(BUILDDIR)/latex/LOG

0 commit comments

Comments
 (0)