Skip to content

Commit

Permalink
Update mobilecoin core + ledger SDK for OS 1.1.2 (#83)
Browse files Browse the repository at this point in the history
* add Pending Review

* rust.yml: update ci

* Remove pending review banner and disable pre-release feature.

* [clean] Moving to new manifest format

* [auto]: add PR template

* use last Ledger Rust SDK published on crates.io

* update Rust SDK version

* update API level for Nano S+

* update nightly toolchain

* uprev dependencies for mobilecoin core v6

* update ci to rust nightly-2023-10-01

* Makefile fix

* Bump SDK version

* Revert "update nightly toolchain"

* Only Nano S+ is currently supported

* submodule latest mobilecoin release/v6.0 commit

* [auto] Update screenshot

* submodule mobilecoin.git branch for ledger-nano with v6.0.1 updates

* Add include_gif has a dependency (mandatory to manage properly Rust SDK update)

* uprev mobilecoin to v6.0.2 + serialization for TxoUnsync.subaddress

* first pass of updating sdk versions

* add block version 4 test vector

* update metadata for cargo-ledger

* cleanup build tooling

* fix ci, hopefully

* add llvm-tools to firmware build

* fix package files

* set nextest timeout

---------

Co-authored-by: Sarah GLINER <[email protected]>
Co-authored-by: Sarah Gliner <[email protected]>
Co-authored-by: Alexis Grojean <[email protected]>
Co-authored-by: Alexis Grojean <[email protected]>
Co-authored-by: Lucas PASCAL <[email protected]>
Co-authored-by: lpascal-ledger <[email protected]>
Co-authored-by: GroM <[email protected]>
Co-authored-by: GroM <[email protected]>
Co-authored-by: Henry Holtzman <[email protected]>
  • Loading branch information
10 people authored Aug 9, 2024
1 parent 4100eec commit 73fcf57
Show file tree
Hide file tree
Showing 48 changed files with 17,501 additions and 763 deletions.
2 changes: 2 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[profile.default]
slow-timeout = { period = "20s", terminate-after = 3 }
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Checklist
<!-- Put an `x` in each box when you have completed the items. -->
- [ ] App update process has been followed <!-- See comment below -->
- [ ] Target branch is `develop` <!-- unless you have a very good reason -->
- [ ] Application version has been bumped <!-- required if your changes are to be deployed -->

<!-- Make sure you followed the process described in https://developers.ledger.com/docs/device-app/deliver/maintenance before opening your Pull Request.
Don't hesitate to contact us directly on Discord if you have any questions ! https://developers.ledger.com/discord -->
36 changes: 20 additions & 16 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: Rust

on:
push:
branches: [ main ]
branches:
- main
- develop
tags: [ 'v*' ]
pull_request:
branches: [ main ]
branches:
- main
- develop

env:
CARGO_TERM_COLOR: always
Expand All @@ -26,7 +30,7 @@ jobs:
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-10-01
target: ${{ matrix.target }}
override: true
components: rustfmt, clippy, rust-src
Expand Down Expand Up @@ -65,7 +69,7 @@ jobs:
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-10-01
override: true

- name: Install protobuf tools
Expand Down Expand Up @@ -126,7 +130,7 @@ jobs:
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-10-01
target: ${{ matrix.target }}
override: true

Expand Down Expand Up @@ -227,18 +231,21 @@ jobs:
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-10-01
target: ${{ matrix.target }}
override: true
components: rust-src
components: rust-src, llvm-tools

- name: Install cross toolchain
run: sudo apt update && sudo apt install gcc-arm-none-eabi gcc-multilib protobuf-compiler protobuf-c-compiler

- name: Install cargo-ledger
run: cargo install cargo-ledger && cargo ledger setup

- name: Load ${{ matrix.platform }} FW cache
uses: actions/cache/restore@v3
with:
key: fw-${{ matrix.platform }}-${{ matrix.target }}
key: fw-${{ matrix.platform }}
path: |
~/.cargo
./fw/target
Expand All @@ -251,13 +258,13 @@ jobs:

- name: Build FW
run: |
cd fw && cargo build --target ./${{ matrix.platform }}.json --release
make ${{ matrix.platform }}
- name: Update ${{ matrix.platform }} FW cache
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/cache/save@v3
with:
key: fw-${{ matrix.platform }}-${{ matrix.target }}-${{ github.run_id }}
key: fw-${{ matrix.platform }}-${{ github.run_id }}
path: |
~/.cargo
./fw/target
Expand All @@ -266,7 +273,6 @@ jobs:
run: |
cp fw/target/${{ matrix.platform }}/release/ledger-mob-fw ledger-mob-fw-${{ matrix.platform }}-${{ env.VERSION }}
arm-none-eabi-objcopy -O ihex fw/target/${{ matrix.platform }}/release/ledger-mob-fw ledger-mob-fw-${{ matrix.platform }}-${{ env.VERSION }}.hex
cp fw/target/${{ matrix.platform }}/release/app_${{ matrix.platform}}.json app_${{ matrix.platform }}.json
- name: Upload firmware binary artifact
uses: actions/upload-artifact@v3
Expand All @@ -275,7 +281,6 @@ jobs:
path: |
ledger-mob-fw-${{ matrix.platform }}-${{ env.VERSION }}
ledger-mob-fw-${{ matrix.platform }}-${{ env.VERSION }}.hex
app_${{ matrix.platform }}.json
# Build simulator tests
build-sim:
Expand All @@ -292,7 +297,7 @@ jobs:
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-10-01
target: ${{ matrix.target }}
override: true

Expand Down Expand Up @@ -352,7 +357,7 @@ jobs:
- name: Configure rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-10-01
override: true

- name: Install libusb / hidapi / libudev
Expand Down Expand Up @@ -423,7 +428,6 @@ jobs:
run: |
mkdir -p ledger-mob-fw-${{ matrix.platform }}-${{ env.VERSION }}
cp bin/ledger-mob-fw-${{ matrix.platform }}-${{ env.VERSION }}.hex ledger-mob-fw-${{ matrix.platform }}-${{ env.VERSION }}/ledger-mob-fw.hex
cp bin/app_${{ matrix.platform }}.json ledger-mob-fw-${{ matrix.platform }}-${{ env.VERSION }}/
cp fw/assets/mob14x14i.gif ledger-mob-fw-${{ matrix.platform }}-${{ env.VERSION }}/
- name: Build firmware archive
Expand Down Expand Up @@ -465,7 +469,7 @@ jobs:
- name: Fetch rust tooling
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-10-01
override: true

- name: Restore core cache
Expand Down
Loading

0 comments on commit 73fcf57

Please sign in to comment.