Skip to content

Commit

Permalink
fix CI checks for wasm32 (bevyengine#715)
Browse files Browse the repository at this point in the history
fix CI check for wasm32
  • Loading branch information
mrk-its authored Oct 22, 2020
1 parent 58eb7e7 commit c743a96
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,33 @@ jobs:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0 -D warnings"

build-wasm:
strategy:
matrix:
toolchain: [stable, nightly]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
needs: clean
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: wasm32-unknown-unknown
override: true

- uses: actions/cache@v2
with:
path: |
target
key: ${{ runner.os }}-cargo-check-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}

- name: Check wasm
uses: actions-rs/cargo@v1
with:
command: check
target: wasm32-unknown-unknown
override: true
args: --target wasm32-unknown-unknown --no-default-features --features bevy_winit,x11,hdr,bevy_gltf

clean:
runs-on: ubuntu-latest
Expand All @@ -72,7 +93,7 @@ jobs:
toolchain: nightly
components: rustfmt, clippy
override: true

- name: Install alsa
run: sudo apt-get install --no-install-recommends libasound2-dev

Expand All @@ -83,6 +104,6 @@ jobs:
run: cargo +nightly fmt --all -- --check

# type complexity must be ignored because we use huge templates for queries
# -A clippy::manual-strip: strip_prefix support was added in 1.45. we want to support earlier rust versions
# -A clippy::manual-strip: strip_prefix support was added in 1.45. we want to support earlier rust versions
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings -A clippy::type_complexity -A clippy::manual-strip

0 comments on commit c743a96

Please sign in to comment.