Skip to content

Commit

Permalink
Merge pull request #7 from ssnover/example-apps-ci
Browse files Browse the repository at this point in the history
Add CI for example apps
  • Loading branch information
ssnover authored Apr 23, 2024
2 parents 233dd74 + 437e4e0 commit cd536a7
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .github/workflows/example-apps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
1 change: 1 addition & 0 deletions .github/workflows/wasm-frontends.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- 'simulator/frontend/**'
- 'runner/runner_msgs/**'
- 'simulator/sim_msgs/**'
- '.github/workflows/wasm-frontends.yml'
push:
branches:
- main
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# megabit
A retro-style display which renders pixels at the behest of apps powered by WebAssembly!

Coprocessor Firmware Build: [![coproc-build](https://github.com/ssnover/megabit/actions/workflows/coproc.yml/badge.svg)](https://github.com/ssnover/megabit/actions/workflows/coproc.yml)
[![linux-apps-build](https://github.com/ssnover/megabit/actions/workflows/linux-apps.yml/badge.svg)](https://github.com/ssnover/megabit/actions/workflows/linux-apps.yml)[![coproc-build](https://github.com/ssnover/megabit/actions/workflows/coproc.yml/badge.svg)](https://github.com/ssnover/megabit/actions/workflows/coproc.yml)[![wasm-frontends-build](https://github.com/ssnover/megabit/actions/workflows/wasm-frontends.yml/badge.svg)](https://github.com/ssnover/megabit/actions/workflows/wasm-frontends.yml)[![example-app-build](https://github.com/ssnover/megabit/actions/workflows/example-apps.yml/badge.svg)](https://github.com/ssnover/megabit/actions/workflows/example-apps.yml)

### Hello World from Megabit (Simulator)
![Scrolling text saying "Hello world from Megabit" in red on black background](docs/assets/hello-megabit.gif)
Expand Down

0 comments on commit cd536a7

Please sign in to comment.