Skip to content

Commit b9b038f

Browse files
authored
Merge pull request #180 from LedgerHQ/y333/rust_build_override_nightly
Y333/rust build override nightly
2 parents 6e77282 + 513d40a commit b9b038f

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.github/workflows/reusable_build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ jobs:
148148
then
149149
BUILD_DEVICE_NAME="$(echo "${{ matrix.device }}" | sed 's/nanosp/nanosplus/')"
150150
# Update the Rust SDK crate
151-
cargo update ledger_device_sdk
151+
cargo +$RUST_NIGHTLY update ledger_device_sdk
152152
# Build application
153-
cargo ledger build "${BUILD_DEVICE_NAME}" -- ${CARGO_LEDGER_BUILD_ARGS}
154-
binary_path=$(cargo metadata --no-deps --format-version 1 | jq -r '.target_directory')
153+
cargo +$RUST_NIGHTLY ledger build "${BUILD_DEVICE_NAME}" -- ${CARGO_LEDGER_BUILD_ARGS}
154+
binary_path=$(cargo +$RUST_NIGHTLY metadata --no-deps --format-version 1 | jq -r '.target_directory')
155155
echo "binary_path=${binary_path}" >> "${GITHUB_OUTPUT}"
156156
else
157157
echo "Using BOLOS_SDK: ${BOLOS_SDK}"
@@ -181,7 +181,7 @@ jobs:
181181
echo "C_DEVICE_NAME=$C_DEVICE_NAME"
182182
RUST_DEVICE_NAME="$(echo "${{ matrix.device }}" | sed 's/sp/splus/')"
183183
echo "RUST_DEVICE_NAME=$RUST_DEVICE_NAME"
184-
ELF_NAME=$(cargo metadata --manifest-path ${{ needs.call_get_app_metadata.outputs.build_directory }}/Cargo.toml --no-deps --format-version 1 | jq -r '.packages[] | select(.metadata.ledger != null) | .name')
184+
ELF_NAME=$(cargo +$RUST_NIGHTLY metadata --manifest-path ${{ needs.call_get_app_metadata.outputs.build_directory }}/Cargo.toml --no-deps --format-version 1 | jq -r '.packages[] | select(.metadata.ledger != null) | .name')
185185
echo "ELF_NAME=$ELF_NAME"
186186
mv "${{ steps.build.outputs.binary_path }}/${RUST_DEVICE_NAME}/release/${ELF_NAME}" "${{ steps.build.outputs.binary_path }}/${UPLOAD_AS_LIB_ARTIFACT}_${C_DEVICE_NAME}.elf"
187187
rm -rf "${{ steps.build.outputs.binary_path }}/${RUST_DEVICE_NAME}"

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.91.1] - 2026-01-08
9+
10+
### Fixed
11+
12+
- Override nightly version when building Rust apps
13+
814
## [1.91.0] - 2026-01-07
915

1016
### Added

scripts/cargo_metadata_dump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
def save_app_params(device: str, app_build_path: Path, json_path: Path) -> None:
10-
metadata = run_cmd("cargo metadata --no-deps --format-version 1 --offline -q",
10+
metadata = run_cmd("cargo +$RUST_NIGHTLY metadata --no-deps --format-version 1 --offline -q",
1111
cwd=app_build_path)
1212
metadata = json.loads(metadata)
1313

scripts/check_all.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ call_step() {
216216
log_bold "********* Processing target: ${TARGET}"
217217
eval BOLOS_SDK="$(echo "\$${TARGET}" | sed 's/[2+]/p/' | tr '[:lower:]' '[:upper:]')_SDK"
218218
if [[ "${IS_RUST}" == true ]]; then
219-
COMMAND="(cd ${APP_DIR}/${BUILD_DIR} && cargo clippy --target ${TARGET/nanosp/nanosplus} -- -Dwarnings)"
219+
COMMAND="(cd ${APP_DIR}/${BUILD_DIR} && cargo +$RUST_NIGHTLY clippy --target ${TARGET/nanosp/nanosplus} -- -Dwarnings)"
220220
else
221221
COMMAND="make ${make_option[*]} ENABLE_SDK_WERROR=1 scan-build"
222222
fi
@@ -228,7 +228,7 @@ call_step() {
228228
log_bold "********* Processing target: ${tgt}"
229229
eval BOLOS_SDK="$(echo "\$${tgt}" | tr '[:lower:]' '[:upper:]')_SDK"
230230
if [[ "${IS_RUST}" == true ]]; then
231-
COMMAND="(cd ${APP_DIR}/${BUILD_DIR} && cargo clippy --target ${tgt/nanosp/nanosplus} -- -Dwarnings)"
231+
COMMAND="(cd ${APP_DIR}/${BUILD_DIR} && cargo +$RUST_NIGHTLY clippy --target ${tgt/nanosp/nanosplus} -- -Dwarnings)"
232232
else
233233
COMMAND="make ${make_option[*]} ENABLE_SDK_WERROR=1 scan-build"
234234
fi

0 commit comments

Comments
 (0)