feat: Stream Deck Studio TCP emulator (Cora protocol) #51
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libudev-dev | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| components: rustfmt, clippy | |
| - name: Install embedded target | |
| run: rustup target add thumbv6m-none-eabi | |
| - name: Install elf2uf2-rs | |
| run: cargo install elf2uf2-rs | |
| - name: Install flip-link | |
| run: cargo install flip-link | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy -- -D warnings | |
| - name: Check compilation | |
| run: cargo check --verbose | |
| - name: Build firmware (debug) | |
| run: cargo build --verbose --target thumbv6m-none-eabi --bins | |
| - name: Build firmware (release) | |
| run: cargo build --release --verbose --target thumbv6m-none-eabi --bins | |
| - name: Verify embedded binaries exist | |
| run: | | |
| set -euo pipefail | |
| expected=(mini module6 module15 module32 original original-v2 plus revised-mini xl) | |
| missing=0 | |
| for bin in "${expected[@]}"; do | |
| if [ -f "target/thumbv6m-none-eabi/release/$bin" ]; then | |
| echo "✅ Found target/thumbv6m-none-eabi/release/$bin" | |
| else | |
| echo "❌ Missing target/thumbv6m-none-eabi/release/$bin" | |
| missing=1 | |
| fi | |
| done | |
| echo "\nListing built files:" | |
| ls -la target/thumbv6m-none-eabi/release || true | |
| if [ "$missing" -ne 0 ]; then | |
| echo "One or more expected binaries are missing" | |
| exit 1 | |
| fi | |
| - name: Upload firmware artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: success() | |
| with: | |
| name: firmware-${{ github.sha }} | |
| path: | | |
| target/thumbv6m-none-eabi/release/mini | |
| target/thumbv6m-none-eabi/release/module6 | |
| target/thumbv6m-none-eabi/release/module15 | |
| target/thumbv6m-none-eabi/release/module32 | |
| target/thumbv6m-none-eabi/release/original | |
| target/thumbv6m-none-eabi/release/original-v2 | |
| target/thumbv6m-none-eabi/release/plus | |
| target/thumbv6m-none-eabi/release/revised-mini | |
| target/thumbv6m-none-eabi/release/xl | |
| retention-days: 30 | |
| security-audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-audit | |
| run: cargo install cargo-audit | |
| - name: Run security audit | |
| run: cargo audit |