Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the wasmer.sh website to the main repo and a CI/CD build test #3759

Merged
merged 8 commits into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ jobs:
run: rustup target add wasm32-wasi
- name: make build-wasmer-wasm
run: make build-wasmer-wasm
- name: make build-web-install
run: make build-web-install

build_linux_aarch64:
name: ${{ matrix.build-what.name }} on linux-aarch64
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Separate workflow for the wasmer-web crate.
#

# Automatically cancel previous workflow runs when a new commit is pushed.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

name: Wasmer Web
on:
push:
branches:
- main
pull_request:
jobs:
web:
name: Build and Test (wasmer-web)
strategy:
matrix:
os: [ubuntu-latest]
rust: [nightly]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Configure Git clone credentials
uses: de-vri-es/setup-git-credentials@v2
with:
credentials: ${{secrets.GIT_CREDENTIALS}}
john-sharratt marked this conversation as resolved.
Show resolved Hide resolved

- name: Install Rust
uses: actions/checkout@v3
with:
toolchain: ${{ matrix.rust }}

- name: Show Rust version
run: |
rustc --version

- name: Check formatting
shell: bash
run: |
cd lib/wasi-web
cargo fmt --check

- name: Check
continue-on-error: true
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
run: |
cd lib/wasi-web
cargo check
131 changes: 118 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ members = [
"lib/wasi",
"lib/wasi-types",
"lib/wasi-experimental-io-devices",
"lib/wasi-web",
"lib/wasix/wasix-http-client",
"lib/wasm-interface",
"lib/c-api/tests/wasmer-c-api-test-runner",
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,13 @@ check-capi:
build-wasmer:
$(CARGO_BINARY) build $(CARGO_TARGET_FLAG) --release --manifest-path lib/cli/Cargo.toml $(compiler_features) --features="webc_runner" --bin wasmer

build-web-install:
cd lib/wasi-web && npm install || true
cd lib/wasi-web && npm run build

build-web:
cd lib/wasi-web && npm run build

build-wasmer-debug:
$(CARGO_BINARY) build $(CARGO_TARGET_FLAG) --manifest-path lib/cli/Cargo.toml $(compiler_features) --features "webc_runner,debug" --bin wasmer

Expand Down
8 changes: 8 additions & 0 deletions lib/wasi-web/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[unstable]
build-std = ['std', 'panic_abort']

[build]
target = "wasm32-unknown-unknown"
# This is needed so the module is compiled with atomics support (shared memory)
# We add the `-no-check-features` linker args because otherwise one of the modules fails to link
rustflags = '-Ctarget-feature=+atomics,+bulk-memory -Clink-args=--no-check-features'
7 changes: 7 additions & 0 deletions lib/wasi-web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
dist
.parcel-cache
.cache
target
pkg
wapm/*.wasm
Loading