diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 91c8ad4..f8411d4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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 diff --git a/Cargo.toml b/Cargo.toml index 619e363..0cf5956 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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]