Cargo update #57
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] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- uses: actions-rs/toolchain@v1.0.6 | |
with: | |
toolchain: stable | |
components: llvm-tools-preview | |
target: thumbv7m-none-eabi | |
- name: cache | |
id: cache-target | |
uses: actions/cache@v2 | |
with: | |
path: target | |
key: ${{ runner.os }}-thumbv7m-none-eabi | |
- name: Build | |
run: | | |
echo "xxx" > tel.txt | |
cargo install cargo-binutils flip-link | |
cargo build --bin keyboard --target=thumbv7m-none-eabi | |
cargo objcopy --bin keyboard --release --target=thumbv7m-none-eabi -- -O binary keyboard.bin | |
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce | |
with: | |
name: keyboard-bin | |
path: keyboard.bin | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f | |
with: | |
toolchain: stable | |
target: thumbv7m-none-eabi | |
- name: Check fmt | |
run: find -name '*.rs' | xargs rustfmt --check --edition 2018 | |