Skip to content

Commit

Permalink
Merge pull request #19 from mobilecoinofficial/upstream-update-sdk
Browse files Browse the repository at this point in the history
Update to latest MobileCoin and Ledger SDKs (replaces #18)
  • Loading branch information
yogh333 authored Sep 2, 2024
2 parents 6e6b64d + a648e80 commit 4f6f9c8
Show file tree
Hide file tree
Showing 34 changed files with 17,326 additions and 721 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 }
28 changes: 14 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-11-10
target: ${{ matrix.target }}
override: true
components: rustfmt, clippy, rust-src
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-11-10
override: true

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

Expand Down Expand Up @@ -231,18 +231,21 @@ jobs:
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-11-10
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 @@ -255,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 @@ -270,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 @@ -279,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 @@ -296,7 +297,7 @@ jobs:
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-11-10
target: ${{ matrix.target }}
override: true

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

- name: Install libusb / hidapi / libudev
Expand Down Expand Up @@ -427,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 @@ -469,7 +469,7 @@ jobs:
- name: Fetch rust tooling
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-12-02
toolchain: nightly-2023-11-10
override: true

- name: Restore core cache
Expand Down
Loading

0 comments on commit 4f6f9c8

Please sign in to comment.