forked from 1b-agent/opencadstudio-upstream
The web bundle is only built when a release is published, so a desktop-only call in shared code can reach main unnoticed and fail the next release at the wasm step (#1224, #1347). Run cargo check for wasm32-unknown-unknown on the app and the web worker instead.
35 lines
917 B
YAML
35 lines
917 B
YAML
name: Web build check
|
|
|
|
# The web bundle is only built when a release is published (pages.yml), so a
|
|
# desktop-only call in shared code can sit on main unnoticed until the next
|
|
# release fails at the wasm step. Type-check the web target on every change
|
|
# instead; this is a check, not a bundle build, so it stays fast.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: web-check-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
wasm32:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: wasm32-unknown-unknown
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
# The app and the parse worker that trunk's post-build hook compiles.
|
|
- name: cargo check (wasm32)
|
|
run: cargo check --locked --target wasm32-unknown-unknown -p OpenCADStudio -p ocs_web_worker
|