Skip to content

Commit

Permalink
Added caching and artifacts to workflow (#2)
Browse files Browse the repository at this point in the history
* Added caching and artifacts to workflow
  • Loading branch information
zarath committed Sep 5, 2023
1 parent 147c452 commit 6364c24
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,25 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Cache Rust packages
uses: actions/cache@v3
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
path: |
~/.cargo
- name: Build
run: cargo build --verbose --release
- name: Install elf2uf2-rs
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev
cargo install elf2uf2-rs
- name: Generate uf2 file
run: elf2uf2-rs -v target/thumbv6m-none-eabi/release/subtone
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: firmware-binaries
path: |
target/thumbv6m-none-eabi/release/subtone
target/thumbv6m-none-eabi/release/subtone.uf2
5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ incremental = false
lto = 'fat'
opt-level = 's'
overflow-checks = false

[profile.release-no-debug]
inherits = "release"
debug=false
strip = 'debuginfo'

# do not optimize proc-macro crates = faster builds from scratch
[profile.dev.build-override]
Expand Down

0 comments on commit 6364c24

Please sign in to comment.