-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.64 KB
/
example-apps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: example-apps-build
on:
pull_request:
paths:
- 'app-sdk/**'
- 'example-apps/**'
- '.github/workflows/example-apps.yml'
push:
branches:
- main
workflow_dispatch:
jobs:
format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: "Format example app: Game of Life"
run: cargo fmt --all --check --manifest-path example-apps/game-of-life/Cargo.toml
- name: "Format example app: Hello World"
run: cargo fmt --all --check --manifest-path example-apps/hello-world/Cargo.toml
- name: "Format example app: Nyan Cat"
run: cargo fmt --all --check --manifest-path example-apps/nyan-cat/Cargo.toml
- name: "Format example app: Scrolling Text"
run: cargo fmt --all --check --manifest-path example-apps/scrolling-text/Cargo.toml
build:
name: Build example apps
needs: [format]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: "wasm32-unknown-unknown,wasm32-wasi"
- name: Build Game of Life
run: cargo build --release --manifest-path example-apps/game-of-life/Cargo.toml
- name: Build Hello World
run: cargo build --release --manifest-path example-apps/hello-world/Cargo.toml
- name: Build Nyan Cat
run: cargo build --release --manifest-path example-apps/nyan-cat/Cargo.toml
- name: Build Scrolling Text
run: cargo build --release --manifest-path example-apps/scrolling-text/Cargo.toml