
This workflow is too spendthrift for deployment: every job sets up Rust, and the `build` job also installs Trunk, which takes even more resources. The workflow serves well, however, as a proof of concept. Introducing a syntax error into `src/main.rs` causes the `build` and `test` jobs to fail, but allows `run-examples` to succeed. Similarly, introducing a syntax error into `examples/point-on-sphere.rs` causes `run-examples` to fail, but allows the other jobs to succeed.
25 lines
No EOL
667 B
YAML
25 lines
No EOL
667 B
YAML
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
steps:
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
- uses: ./.forgejo/setup-rust
|
|
- run: rustup target add wasm32-unknown-unknown
|
|
- run: cargo install trunk
|
|
- run: cd app-proto; trunk build
|
|
test:
|
|
runs-on: docker
|
|
steps:
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
- uses: ./.forgejo/setup-rust
|
|
- run: cd app-proto; cargo test
|
|
run-examples:
|
|
runs-on: docker
|
|
steps:
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
- uses: ./.forgejo/setup-rust
|
|
- uses: ./.forgejo/run-examples |