Skip to content

Commit

Permalink
Merge branch 'main' into nested-interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
macovedj committed Jul 17, 2024
2 parents 90a402f + 1cdafa7 commit 3d45221
Show file tree
Hide file tree
Showing 446 changed files with 26,510 additions and 4,159 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto
*.waves text eol=lf
*.out text eol=lf
21 changes: 12 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
- build: aarch64-linux
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- build: wasm32-wasi
- build: wasm32-wasip1
os: ubuntu-latest
target: wasm32-wasi
target: wasm32-wasip1
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -44,7 +44,7 @@ jobs:
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
with:
name: ${{ matrix.build }}
if: matrix.build != 'wasm32-wasi'
if: matrix.build != 'wasm32-wasip1'
- run: |
echo CARGO_BUILD_TARGET=${{ matrix.target }} >> $GITHUB_ENV
rustup target add ${{ matrix.target }}
Expand Down Expand Up @@ -132,11 +132,12 @@ jobs:
submodules: true
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
with:
toolchain: 1.77.0
toolchain: 1.79.0
- run: rustup target add wasm32-wasip1
- run: |
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0-linux.tar.gz
tar xf wasi-sdk-21.0-linux.tar.gz
export WASI_SDK_PATH=$(pwd)/wasi-sdk-21.0
curl -LO https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sdk-22.0-linux.tar.gz
tar xf wasi-sdk-22.0-linux.tar.gz
export WASI_SDK_PATH=$(pwd)/wasi-sdk-22.0
cd crates/wit-component/dl && bash check.sh
wasm:
Expand All @@ -147,13 +148,14 @@ jobs:
with:
submodules: true
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
- run: rustup target add wasm32-wasip1
- run: |
tag=v10.0.1
curl -LO https://github.com/bytecodealliance/wasmtime/releases/download/${tag}/wasmtime-${tag}-x86_64-linux.tar.xz
tar xf wasmtime-${tag}-x86_64-linux.tar.xz
echo `pwd`/wasmtime-${tag}-x86_64-linux >> $GITHUB_PATH
echo CARGO_TARGET_WASM32_WASI_RUNNER='wasmtime run --dir . --' >> $GITHUB_ENV
echo CARGO_BUILD_TARGET='wasm32-wasi' >> $GITHUB_ENV
echo CARGO_TARGET_WASM32_WASIP1_RUNNER='wasmtime run --dir . --' >> $GITHUB_ENV
echo CARGO_BUILD_TARGET='wasm32-wasip1' >> $GITHUB_ENV
- run: |
cargo --locked test --workspace \
--exclude fuzz-stats \
Expand All @@ -168,6 +170,7 @@ jobs:
- uses: actions/checkout@v4
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
- run: rustup component add rustfmt
- run: printf "\n" > playground/component/src/bindings.rs
# Note that this doesn't use `cargo fmt` because that doesn't format
# modules-defined-in-macros which is in use in `wast` for example. This is
# the best alternative I can come up with at this time
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/playground.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build playground
on:
push:
branches: [main]
pull_request:
merge_group:

# Cancel any in-flight jobs for the same PR/branch so there's only one active
# at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
build:
name: Build playground deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: bytecodealliance/wasmtime/.github/actions/[email protected]
- uses: cargo-bins/[email protected]
- run: cargo binstall cargo-component -y
- run: rustup component add rustfmt # needed for cargo-component, apparently?
- run: rustup target add wasm32-wasip1
- run: npm ci
working-directory: playground
- run: npm run build
working-directory: playground

# also prepare to deploy GH pages on main
- if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v5
- if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: "./playground/dist"

deploy:
name: Deploy playground
if: github.ref == 'refs/heads/main'
needs: build
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ merged once all tests are passing. CI checks currently include:
* Code is all formatted correctly (use `cargo fmt` locally to pass this)
* Tests pass on Rust stable, beta, and Nightly.
* Tests pass on Linux, macOS, and Windows.
* This tool can be compiled to WebAssembly using the `wasm32-wasi` target.
* This tool can be compiled to WebAssembly using the `wasm32-wasip1` target.
* Fuzzers can be built.
* Various miscellaneous checks such as building the tool with various
combinations of Cargo features.
Expand Down
Loading

0 comments on commit 3d45221

Please sign in to comment.