Skip to content

Commit 6bb508a

Browse files
committed
Update action.yaml
1 parent 17e3f7a commit 6bb508a

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

.github/workflows/action.yaml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,9 @@ build_examples:
1515
- run: rustup target add wasm32-unknown-unknown
1616
- run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
1717
- run: |
18-
cargo build -p wasm-bindgen-cli
18+
cargo install wasm-bindgen-cli
1919
ln -snf `pwd`/target/debug/wasm-bindgen $(dirname `which cargo`)/wasm-bindgen
20-
# crete a workspace of all examples and install their dependencies at once
21-
# sed is used to convert the literal "\n" to a newline character
22-
- run: |
23-
[ -f pnpm-workspace.yaml ] || (echo 'packages:\n - "examples/*"' > pnpm-workspace.yaml && sed -i -e 's/\\n/\n/g' pnpm-workspace.yaml)
24-
- run: |
25-
[ -f package.json ] || (echo '{}' > package.json)
26-
- run: corepack pnpm install -r
27-
- run: |
28-
function build() {
29-
(cd examples/$1 &&
30-
(corepack pnpm run build -- --output-path ../../exbuild/$1 ||
31-
(./build.sh && mkdir -p ../../exbuild/$1 && cp -r ./* ../../exbuild/$1 && rm ../../exbuild/$1/**/.gitignore))
32-
) || exit 1;
33-
}
34-
export -f build
35-
ls examples | grep -v README | grep -v raytrace | grep -v deno | grep -v wasm-audio-worklet | parallel -j4 build
36-
env:
37-
RUSTFLAGS: --cfg=web_sys_unstable_apis
20+
3821
- uses: actions/upload-artifact@v4
3922
with:
4023
name: examples1

0 commit comments

Comments
 (0)