forked from maia-sdr/maia-sdr
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.1 KB
/
maia-wasm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: 'maia-wasm'
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
defaults:
run:
working-directory: maia-wasm
jobs:
wasm:
name: Build and test (wasm)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Format
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Doc
run: cargo doc
- name: Install wasm32-unknown-unknown Rust target
run: rustup target add wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build with wasm-pack
run: wasm-pack build --target web
x86_64:
name: Build and test (x86_64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: cargo test
run: cargo test --verbose
publish:
if: startsWith(github.event.ref, 'refs/tags/maia-wasm-')
needs: [wasm, x86_64]
uses: ./.github/workflows/publish.yml
with:
path: maia-wasm
secrets:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}