Skip to content

Commit

Permalink
Merge branch 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
rossberg committed Aug 29, 2024
2 parents 4d503df + 71755b3 commit 7378434
Show file tree
Hide file tree
Showing 102 changed files with 2,798 additions and 2,733 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci-interpreter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI for interpreter & tests

on:
push:
branches: [ main ]
paths: [ .github/**, interpreter/**, test/** ]

pull_request:
branches: [ main ]
paths: [ .github/**, interpreter/**, test/** ]

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

jobs:
interpreter:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.12.x
- name: Setup OCaml tools
run: opam install --yes ocamlfind.1.9.5 js_of_ocaml.4.0.0 js_of_ocaml-ppx.4.0.0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 19.x
- name: Build interpreter
run: cd interpreter && opam exec make
- name: Run tests
run: cd interpreter && opam exec make JS=node ci
101 changes: 101 additions & 0 deletions .github/workflows/ci-spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: CI for specs

on:
push:
branches: [ main ]
paths: [ .github/**, document/** ]

pull_request:
branches: [ main ]
paths: [ .github/**, document/** ]

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

jobs:
build-core-spec:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Setup TexLive
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- name: Setup Sphinx
run: pip install six && pip install sphinx==5.1.0
- name: Build main spec
run: cd document/core && make main
- name: Run Bikeshed
run: cd document/core && make bikeshed
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: core-rendered
path: document/core/_build/html

build-js-api-spec:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Run Bikeshed
run: bikeshed spec "document/js-api/index.bs" "document/js-api/index.html"
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: js-api-rendered
path: document/js-api/index.html

build-web-api-spec:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Run Bikeshed
run: bikeshed spec "document/web-api/index.bs" "document/web-api/index.html"
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: web-api-rendered
path: document/web-api/index.html

publish-spec:
runs-on: ubuntu-latest
needs: [build-core-spec, build-js-api-spec, build-web-api-spec]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Create output directory
run: mkdir _output && cp document/index.html _output/index.html
- name: Download core spec artifact
uses: actions/download-artifact@v2
with:
name: core-rendered
path: _output/core
- name: Download JS API spec artifact
uses: actions/download-artifact@v2
with:
name: js-api-rendered
path: _output/js-api
- name: Download Web API spec artifact
uses: actions/download-artifact@v2
with:
name: web-api-rendered
path: _output/web-api
- name: Publish to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./_output
github_token: ${{ secrets.GITHUB_TOKEN }}
105 changes: 0 additions & 105 deletions .github/workflows/main.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/mirror.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/w3c-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish to W3C TR space

on:
push:
branches: [ main ]
paths: [ .github/**, document/** ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
w3c-status:
required: true
type: string

jobs:
publish-to-w3c-TR:
if: github.repository == 'WebAssembly/spec'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Setup TexLive
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- name: Setup Sphinx
run: pip install six && pip install sphinx==5.1.0
- name: Publish all specs to their https://www.w3.org/TR/ URLs
run: cd document && make -e WD-echidna-CI
env:
W3C_STATUS: ${{ github.event_name == 'push' && 'WD' || inputs.w3c-status }}
W3C_ECHIDNA_TOKEN_CORE: ${{ secrets.W3C_ECHIDNA_TOKEN_CORE }}
W3C_ECHIDNA_TOKEN_JSAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_JSAPI }}
W3C_ECHIDNA_TOKEN_WEBAPI: ${{ secrets.W3C_ECHIDNA_TOKEN_WEBAPI }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
![Build Status](https://github.com/WebAssembly/multi-memory/actions/workflows/main.yml/badge.svg)
[![CI for specs](https://github.com/WebAssembly/multi-memory/actions/workflows/ci-spec.yml/badge.svg)](https://github.com/WebAssembly/multi-memory/actions/workflows/ci-spec.yml)
[![CI for interpreter & tests](https://github.com/WebAssembly/multi-memory/actions/workflows/ci-interpreter.yml/badge.svg)](https://github.com/WebAssembly/multi-memory/actions/workflows/ci-interpreter.yml)

# Multi Memory Proposal for WebAssembly

Expand Down
2 changes: 2 additions & 0 deletions document/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This document is licensed under the W3C Software and Document License.
Its text can be found at https://www.w3.org/copyright/software-license/
22 changes: 21 additions & 1 deletion document/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
DIRS = core js-api web-api
DIRS = js-api web-api core
FILES = index.html
BUILDDIR = _build
TAR = tar

# Global targets.

Expand All @@ -24,6 +25,25 @@ clean: $(DIRS:%=clean-%)
.PHONY: diff
diff: $(DIRS:%=diff-%)

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

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

.PHONY: WD-echidna-CI
WD-echidna-CI:
for dir in $(DIRS); do \
$(MAKE) -e -C $$dir $@ || exit 1; \
done

# Directory-specific targets.

Expand Down
1 change: 0 additions & 1 deletion document/core/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
_build
_static
document/*.pyc
appendix/index-instructions.rst
Loading

0 comments on commit 7378434

Please sign in to comment.