Fix the logic; in case of error reset state. #14
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: Rust | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
workflow_dispatch: | |
inputs: | |
name: | |
description: 'Manually triggered' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: rust-src, rustfmt | |
- run: rustup component add rustfmt | |
- name: Cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
device: [nanos, nanox, nanosplus] | |
env: | |
OBJCOPY: arm-none-eabi-objcopy | |
NM: arm-none-eabi-nm | |
steps: | |
- name: arm-none-eabi-gcc | |
uses: fiam/[email protected] | |
with: | |
release: '9-2019-q4' | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Checkout SDK (targets) | |
uses: actions/checkout@v3 | |
with: | |
repository: 'alamgu/ledger-nanos-sdk' | |
ref: memory-fixes | |
path: rsdk | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: rust-src, clippy | |
- run: rustup component add clippy | |
- name: Cargo clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -Z build-std=core -Z build-std-features=compiler-builtins-mem --target ./rsdk/${{ matrix.device }}.json | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
device: [nanos, nanox, nanosplus] | |
env: | |
OBJCOPY: arm-none-eabi-objcopy | |
NM: arm-none-eabi-nm | |
steps: | |
- name: arm-none-eabi-gcc | |
uses: fiam/[email protected] | |
with: | |
release: '9-2019-q4' | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Checkout SDK (targets) | |
uses: actions/checkout@v3 | |
with: | |
repository: 'alamgu/ledger-nanos-sdk' | |
ref: memory-fixes | |
path: rsdk | |
- name: Install clang | |
run: sudo apt-get update && sudo apt install -y clang | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: rust-src | |
- run: echo "$PWD/rsdk/scripts" >> $GITHUB_PATH | |
- name: Cargo build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: -Z build-std=core -Z build-std-features=compiler-builtins-mem --target ./rsdk/${{ matrix.device }}.json |