Skip to content

Commit

Permalink
Merge pull request #144 from cryptoquick/wasm-ci
Browse files Browse the repository at this point in the history
WASM in CI
  • Loading branch information
dr-orlovsky committed Oct 7, 2022
2 parents 7b38236 + 641d7c7 commit 5b4679b
Show file tree
Hide file tree
Showing 5 changed files with 307 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- name: Feature ${{matrix.feature}}
uses: actions-rs/cargo@v1
with:
Expand All @@ -45,6 +46,7 @@ jobs:
with:
toolchain: ${{matrix.toolchain}}
override: true
- uses: Swatinem/rust-cache@v2
- name: All features
if: matrix.toolchain != '1.41.1'
uses: actions-rs/cargo@v1
Expand All @@ -68,6 +70,7 @@ jobs:
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
- name: Create dependency
run: |
cargo new dep_test
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
toolchain: 1.64.0
override: true
components: rustfmt
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
name: Formatting
with:
Expand All @@ -35,11 +36,31 @@ jobs:
toolchain: 1.64.0
override: true
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
name: Clippy
with:
command: clippy
args: --workspace --all-features
wasm-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustc 1.52.0
uses: actions-rs/toolchain@v1
with:
toolchain: 1.52.0
override: true
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: jetli/wasm-pack-action@v0.3.0
- name: Add wasm32 target
run: rustup target add wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
name: Clippy
with:
command: clippy
args: --workspace --all-features --target wasm32-unknown-unknown
doc:
runs-on: ubuntu-latest
steps:
Expand All @@ -50,6 +71,7 @@ jobs:
toolchain: 1.64.0
override: true
components: rust-docs
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
name: Doc
with:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,24 @@ jobs:
with:
toolchain: nightly
override: true
- uses: Swatinem/rust-cache@v2
- name: Build & test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features --no-fail-fast
wasm-testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: Swatinem/rust-cache@v2
- uses: jetli/wasm-pack-action@v0.3.0
- name: Add wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Test in headless Chrome
run: wasm-pack test --headless --chrome
151 changes: 151 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5b4679b

Please sign in to comment.