Add watchpoint hook for setting reset reason on sw reset #130
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: CI | |
on: [push] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint_libs: | |
name: Lint Libraries | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [wire-protocols, env-config, bootloader-support, update-manager] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain and components | |
run: rustup component add rustfmt clippy | |
- name: Check | |
working-directory: libraries/${{ matrix.package }} | |
run: cargo check --all-features --target x86_64-unknown-linux-gnu | |
- name: Clippy | |
working-directory: libraries/${{ matrix.package }} | |
run: cargo clippy --all-features --target x86_64-unknown-linux-gnu -- -W clippy::all -D warnings | |
- name: Format | |
working-directory: libraries/${{ matrix.package }} | |
run: cargo fmt --all -- --check | |
- name: Doc Generation | |
working-directory: libraries/${{ matrix.package }} | |
run: cargo doc --workspace --bins --examples --all-features --no-deps --target x86_64-unknown-linux-gnu | |
test_libs: | |
name: Test Libraries | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [wire-protocols, env-config, bootloader-support, update-manager] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain and components | |
run: rustup component add rustfmt clippy | |
- name: Test | |
working-directory: libraries/${{ matrix.package }} | |
run: cargo test --target x86_64-unknown-linux-gnu | |
lint_embedded: | |
name: Lint Embedded | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [firmware, bootloader] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain and components | |
run: rustup component add rustfmt clippy | |
- name: Check | |
working-directory: ${{ matrix.package }} | |
run: cargo check --all-features | |
- name: Clippy | |
working-directory: ${{ matrix.package }} | |
run: cargo clippy --all-features -- -W clippy::all -D warnings | |
- name: Format | |
working-directory: ${{ matrix.package }} | |
run: cargo fmt --all -- --check | |
- name: Doc Generation | |
working-directory: ${{ matrix.package }} | |
run: cargo doc --workspace --bins --examples --all-features --no-deps | |
build_embedded: | |
name: Build Embedded | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [firmware, bootloader] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain and components | |
run: rustup component add rustfmt clippy llvm-tools-preview | |
- name: Install binutils, flip-link | |
working-directory: ${{ matrix.package }} | |
run: cargo install cargo-binutils flip-link | |
- name: Build release binary | |
working-directory: ${{ matrix.package }} | |
run: cargo build --release | |
- name: Print firmware size | |
working-directory: ${{ matrix.package }} | |
run: | | |
cargo size --release | |
echo '## Firmware size' >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
cargo size --release >> $GITHUB_STEP_SUMMARY | |
echo '```' >> $GITHUB_STEP_SUMMARY | |
lint_host_tools: | |
name: Lint Host Tools | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [agp-linker, air-gradient-cli] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain and components | |
run: rustup component add rustfmt clippy | |
- name: Check | |
working-directory: host_tools/${{ matrix.package }} | |
run: cargo check --all-features | |
- name: Clippy | |
working-directory: host_tools/${{ matrix.package }} | |
run: cargo clippy --all-features -- -W clippy::all -D warnings | |
- name: Format | |
working-directory: host_tools/${{ matrix.package }} | |
run: cargo fmt --all -- --check | |
- name: Doc Generation | |
working-directory: host_tools/${{ matrix.package }} | |
run: cargo doc --workspace --bins --examples --all-features --no-deps | |
build_host_tools: | |
name: Build Host Tools | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [agp-linker, air-gradient-cli] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain and components | |
run: rustup component add rustfmt clippy | |
- name: Build debug binary | |
working-directory: host_tools/${{ matrix.package }} | |
run: cargo build --all-features | |
- name: Build release binary | |
working-directory: host_tools/${{ matrix.package }} | |
run: cargo build --release --all-features | |
test_host_tools: | |
name: Test Host Tools | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
package: [agp-linker, air-gradient-cli] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain and components | |
run: rustup component add rustfmt clippy | |
- name: Test | |
working-directory: host_tools/${{ matrix.package }} | |
run: cargo test |