Skip to content

Commit bdf87ab

Browse files
authored
Merge pull request #261 from LedgerHQ/y333/dev_container_setup
Y333/dev container setup
2 parents cc89f11 + 99b75d4 commit bdf87ab

File tree

22 files changed

+38
-1244
lines changed

22 files changed

+38
-1244
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[unstable]
2-
build-std = ["core"]
2+
build-std = ["core", "alloc"]
33
build-std-features = ["compiler-builtins-mem"]
44

55
[build]
6-
target = "nanosplus"
6+
target = "flex"

.github/workflows/build_with_current_nightly.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ jobs:
3232
BUILD_DEVICE_NAME="$(echo ${{ matrix.device }})"
3333
BIN_DIR_NAME="$(echo ${{ matrix.device }} | sed 's/nanosplus/nanos2/')"
3434
cd app-boilerplate
35-
RUST_NIGHTLY=nightly
3635
cargo ledger build ${{ matrix.device }}
3736
3837
#- name: Upload binary artifacts

.github/workflows/ci.yml

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,12 @@ jobs:
2424
target: ["nanox", "nanosplus", "stax", "flex"]
2525
package: [include_gif, testmacro, ledger_secure_sdk_sys, ledger_device_sdk]
2626
steps:
27-
- name: Print Environment variables
28-
run:
29-
echo "The value of RUST_NIGHTLY is $RUST_NIGHTLY"
3027
- name: Clone
3128
uses: actions/checkout@v4
3229
- name: Cargo clippy
3330
working-directory: ${{ matrix.package }}
3431
run: |
35-
cargo +$RUST_NIGHTLY clippy --target ${{ matrix.target }}
36-
37-
clippy-cargo-ledger:
38-
name: Run static analysis for cargo-ledger
39-
runs-on: ubuntu-latest
40-
container:
41-
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest
42-
steps:
43-
- name: Clone
44-
uses: actions/checkout@v4
45-
- name: Cargo clippy for cargo-ledger
46-
working-directory: cargo-ledger
47-
run: |
48-
cargo +$RUST_STABLE clippy --no-deps
32+
cargo clippy --target ${{ matrix.target }}
4933
5034
format:
5135
name: Check code formatting
@@ -57,7 +41,7 @@ jobs:
5741
uses: actions/checkout@v4
5842
- name: Run cargo fmt
5943
run: |
60-
cargo +$RUST_NIGHTLY fmt --all --check
44+
cargo fmt --all --check
6145
6246
build:
6347
name: Build SDK
@@ -73,20 +57,7 @@ jobs:
7357
- name: Cargo build
7458
working-directory: ledger_device_sdk
7559
run: |
76-
cargo +$RUST_NIGHTLY build --target ${{ matrix.target }}
77-
78-
build-cargo-ledger:
79-
name: Build SDK
80-
runs-on: ubuntu-latest
81-
container:
82-
image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest
83-
steps:
84-
- name: Clone
85-
uses: actions/checkout@v4
86-
- name: Cargo build
87-
working-directory: cargo-ledger
88-
run: |
89-
cargo +$RUST_STABLE build
60+
cargo build --target ${{ matrix.target }}
9061
9162
test:
9263
name: Run unit and integration tests
@@ -102,4 +73,4 @@ jobs:
10273
- name: Unit tests
10374
working-directory: ledger_device_sdk
10475
run: |
105-
cargo +$RUST_NIGHTLY test --target ${{ matrix.target }} --features speculos --tests
76+
cargo test --target ${{ matrix.target }} --features speculos --tests

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Test Dry-Run Publish for Each Package
2525
run: |
2626
# Iterate through package names retrieved
27-
PACKAGE_NAMES="testmacro include_gif ledger_secure_sdk_sys ledger_device_sdk cargo-ledger"
27+
PACKAGE_NAMES="testmacro include_gif ledger_secure_sdk_sys ledger_device_sdk"
2828
for PACKAGE_NAME in $PACKAGE_NAMES; do
2929
# Test a dry-run publish for each package within the workspace if required
3030
last_published_version=$(cargo search -q --limit 1 $PACKAGE_NAME | grep -oP '\d+\.\d+\.\d+')
@@ -60,7 +60,7 @@ jobs:
6060
- name: Publish Package on crates.io if required
6161
run: |
6262
# Iterate through package names retrieved
63-
PACKAGE_NAMES="testmacro include_gif ledger_secure_sdk_sys ledger_device_sdk cargo-ledger"
63+
PACKAGE_NAMES="testmacro include_gif ledger_secure_sdk_sys ledger_device_sdk"
6464
for PACKAGE_NAME in $PACKAGE_NAMES; do
6565
# Publish each package within the workspace if required
6666
last_published_version=$(cargo search -q --limit 1 $PACKAGE_NAME | grep -oP '\d+\.\d+\.\d+')

.github/workflows/reusable_build_all_apps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ jobs:
139139
build_directory=$(ledger-manifest --output-build-directory ledger_app.toml)
140140
cd $build_directory
141141
# Required as patch has a different version from what is locked in Cargo.lock
142-
cargo +$RUST_NIGHTLY update include_gif
143-
cargo +$RUST_NIGHTLY update ledger_secure_sdk_sys
144-
cargo +$RUST_NIGHTLY update ledger_device_sdk
142+
cargo update include_gif
143+
cargo update ledger_secure_sdk_sys
144+
cargo update ledger_device_sdk
145145
device=$(echo ${{ matrix.device }} | sed 's/+/plus/')
146146
echo "Build for "$device
147147
cargo ledger build $device

0 commit comments

Comments
 (0)