mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Merge pull request #3583 from deantvv/test-wasm32-wasi
ci: add test for wasm32-wasi
This commit is contained in:
42
.github/workflows/ci.yaml
vendored
42
.github/workflows/ci.yaml
vendored
@@ -117,16 +117,6 @@ jobs:
|
||||
command: check
|
||||
args: --target wasm32-unknown-unknown --no-default-features
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
target: wasm32-wasi
|
||||
|
||||
- name: Check compilation for wasi
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: check
|
||||
args: --target wasm32-wasi --features freeze-stdlib
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
target: x86_64-unknown-freebsd
|
||||
@@ -333,3 +323,35 @@ jobs:
|
||||
PUBLISH_DIR: ./wasm/demo/dist
|
||||
EXTERNAL_REPOSITORY: RustPython/demo
|
||||
PUBLISH_BRANCH: master
|
||||
|
||||
wasm-wasi:
|
||||
name: Run snippets and cpython tests on wasm-wasi
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: wasm32-wasi
|
||||
override: true
|
||||
- name: Setup Wasmer
|
||||
uses: wasmerio/setup-wasmer@v1
|
||||
- name: Install clang
|
||||
run: sudo apt-get update && sudo apt-get install clang -y
|
||||
- name: Cache cargo dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-wasm_opt3-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-debug_opt3-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: build rustpython
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: --release --target wasm32-wasi --features freeze-stdlib --verbose
|
||||
- name: run snippets
|
||||
run: wasmer run --dir . target/wasm32-wasi/release/rustpython.wasm -- extra_tests/snippets/variables.py
|
||||
|
||||
Reference in New Issue
Block a user