Skip to content

Commit

Permalink
Add GitHub job for building WASM
Browse files Browse the repository at this point in the history
  • Loading branch information
Dove6 committed Aug 27, 2024
1 parent 5db0d02 commit e1134ab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --all --verbose --features bevy/x11
- name: Run tests
Expand All @@ -26,7 +27,21 @@ jobs:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all --check
- name: Check code quality
run: cargo clippy --all --features bevy/x11 -- -Dwarnings
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0
- uses: Swatinem/rust-cache@v2
- name: Build debug
run: cargo build --target wasm32-unknown-unknown --all --verbose -Zbuild-std=std,panic_abort
- name: Generate files for debug
run: wasm-bindgen --no-typescript --target web --out-dir ./out_debug/ --out-name "pixlib" ./target/wasm32-unknown-unknown/debug/pixlib.wasm
- name: Summarize size of out dir for debug
run: du -sh ./out_debug

0 comments on commit e1134ab

Please sign in to comment.