6565 target : wasm32-unknown-unknown
6666 - platform : wasm32-wasi
6767 os : ubuntu-latest
68- target : wasm32-wasip1-threads
68+ target : wasm32-wasip2
6969
7070 steps :
7171 - name : Checkout source code
@@ -100,7 +100,16 @@ jobs:
100100 cross clippy --workspace --target ${{ matrix.target }} -- -D warnings
101101
102102 - name : Run clippy
103- if : ${{ matrix.platform != 'wasm32-unknown' && matrix.platform != 'linux-riscv64' && matrix.platform != 'linux-s390x' }}
103+ if : ${{ matrix.platform == 'wasm32-wasi' }}
104+ env :
105+ CARGO_TERM_COLOR : always
106+ RUSTC_BOOTSTRAP : 1
107+ run : |
108+ rustup target install ${{ matrix.target }}
109+ cargo clippy --workspace --target ${{ matrix.target }} -- -D warnings
110+
111+ - name : Run clippy
112+ if : ${{ matrix.platform != 'wasm32-unknown' && matrix.platform != 'linux-riscv64' && matrix.platform != 'linux-s390x' && matrix.platform != 'wasm32-wasi' }}
104113 env :
105114 CARGO_TERM_COLOR : always
106115 run : |
@@ -125,11 +134,51 @@ jobs:
125134 CARGO_TERM_COLOR : always
126135 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
127136 RUST_BACKTRACE : 1
137+ RUSTC_BOOTSTRAP : 1
128138 RUST_LOG : info
129139 run : |
130140 rustup target install ${{ matrix.target }}
131141 cargo build --workspace --target ${{ matrix.target }}
132142
143+ - name : Build
144+ if : ${{ matrix.platform == 'linux-riscv64' || matrix.platform == 'linux-s390x' }}
145+ env :
146+ CARGO_TERM_COLOR : always
147+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
148+ RUST_BACKTRACE : 1
149+ RUST_LOG : info
150+ run : |
151+ cross build --workspace --target ${{ matrix.target }}
152+
153+ - name : Build
154+ if : ${{ matrix.platform != 'wasm32-unknown' && matrix.platform != 'wasm32-wasi' && matrix.platform != 'linux-riscv64' && matrix.platform != 'linux-s390x' }}
155+ env :
156+ CARGO_TERM_COLOR : always
157+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
158+ RUST_BACKTRACE : 1
159+ RUST_LOG : info
160+ run : |
161+ rustup target install ${{ matrix.target }}
162+ cargo build --workspace --target ${{ matrix.target }}
163+
164+ - name : Install wasmtime
165+ if : ${{ matrix.platform == 'wasm32-wasi' }}
166+ uses : taiki-e/install-action@v2
167+ with :
168+ tool : wasmtime
169+
170+ - name : Tests
171+ if : ${{ matrix.platform == 'wasm32-wasi' }}
172+ env :
173+ CARGO_TERM_COLOR : always
174+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
175+ RUST_BACKTRACE : 1
176+ RUST_LOG : info
177+ RUSTC_BOOTSTRAP : 1
178+ CARGO_TARGET_WASM32_WASIP2_RUNNER : " wasmtime -W max-wasm-stack=8388608 -S http -S inherit-network -S allow-ip-name-lookup --dir=. --dir=${{ github.workspace }}::${{ github.workspace }} --env=HOME=/home --dir=${{ runner.temp }}::/home --env=TMPDIR=/tmp --dir=/tmp::/tmp"
179+ run : |
180+ cargo test --workspace --tests --exclude ristretto_classfile --target ${{ matrix.target }} -- --test-threads=1
181+
133182 - name : Tests
134183 if : ${{ !startsWith(matrix.platform, 'wasm32') && matrix.platform != 'linux-riscv64' && matrix.platform != 'linux-s390x' && matrix.platform != 'macos-arm' }}
135184 env :
0 commit comments