Skip to content

Commit 4f213b4

Browse files
committed
CI validates WASM support
For now failure is allowed as no work was done, but this should confirm the crate can at least be compiled to that target. We try different targets, including WASI, for good measure, and already build crates that are naturally working.
1 parent 109f434 commit 4f213b4

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/wasm.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: WASM
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags-ignore: [ '*' ]
7+
paths:
8+
- '.github/**'
9+
- 'git-pack/**'
10+
- '*.toml'
11+
pull_request:
12+
branches: [ main ]
13+
paths:
14+
- '.github/**'
15+
- 'git-pack/**'
16+
- '*.toml'
17+
18+
jobs:
19+
wasm:
20+
name: WebAssembly
21+
runs-on: ubuntu-latest
22+
continue-on-error: true
23+
strategy:
24+
matrix:
25+
target: [ wasm32-unknown-unknown, wasm32-wasi ]
26+
steps:
27+
- uses: actions/checkout@master
28+
- name: Install Rust
29+
run: rustup update stable && rustup default stable && rustup target add ${{ matrix.target }}
30+
- run: set +x; for name in git-hash git-date git-features git-actor git-validate git-object; do (cd $name && cargo build --target ${{ matrix.target }}); done
31+
name: naturally working
32+
- run: set +x; for feature in rustsha1 zlib crc32 progress; do (cd git-features && cargo build --features $feature --target ${{ matrix.target }}); done
33+
name: git-features --features
34+
# - run: cargo build -p git-pack --target ${{ matrix.target }} // TODO: make something like it work

0 commit comments

Comments
 (0)