Move PAM generation to build time, optimizing download size #327
Workflow file for this run
This file contains 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: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
- wip | |
pull_request: | |
jobs: | |
ci: | |
name: "Test-build avr-device with all targets and runtime enabled" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Stable Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
# Rust Dependencies | |
- name: Install Nightly Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly-2025-01-08 | |
components: rust-src,rustfmt | |
# Actual test run | |
- name: Test-compile the crate | |
run: cargo check --all-features | |
# Package artifacts | |
- name: Generate a cargo package for the macros | |
run: cd macros/; cargo package --no-verify --allow-dirty | |
- name: Generate a cargo package for avr-device | |
run: cargo package --no-verify --allow-dirty | |
# Upload artifacts | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: avr-device | |
path: | | |
target/avr-atmega328p/debug/build/avr-device-*/out/svd/ | |
target/package/avr-device-*.crate | |
macros/target/package/avr-device-macros-*.crate | |
ci-example: | |
name: "Test-build ATmega328P example" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly-2025-01-08 | |
components: rust-src,rustfmt | |
- name: Install AVR gcc, binutils, and libc | |
run: sudo apt-get install -y avr-libc binutils-avr gcc-avr | |
- name: Build ATmega328P example | |
run: cargo build --example atmega328p --features atmega328p,rt |