Skip to content

Commit

Permalink
Merge pull request #99 from LedgerHQ/feat/update_rust_nightly_version
Browse files Browse the repository at this point in the history
update nightly from nightly-2022-12-02 to nightly-2023-11-10
  • Loading branch information
yogh333 authored Jan 19, 2024
2 parents 5f4f3ab + cdd84a2 commit 8d50c2b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.13.0] - 2024-01-18

### Changed
- [legacy] Install proper ARM toolchain with regards to current arch (amd64 or arm64)
- [full, legacy, dev-tools] Update Rust nightly in full and legacy containers

## [3.12.3] - 2024-01-15
- Update cargo-ledger to version 1.2.3
Expand Down
4 changes: 2 additions & 2 deletions full/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder-lite:latest

ARG RUST_STABLE_VERSION=1.72.0
ARG RUST_NIGHTLY_VERSION=nightly-2022-12-02
ARG RUST_STABLE_VERSION=1.75.0
ARG RUST_NIGHTLY_VERSION=nightly-2023-11-10

# Add curl for Rust buildchain
RUN apk add --update-cache --upgrade curl
Expand Down
3 changes: 0 additions & 3 deletions full/cargo_global_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
# see https://ledger.slack.com/archives/C04SY25SREX/p1698055418107969
host-config = true
target-applies-to-host = true
sparse-registry = true

[host]
rustflags = ["-Ctarget-feature=-crt-static"]

[registries.crates-io]
protocol = "sparse"
24 changes: 17 additions & 7 deletions legacy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ARG DEBIAN_FRONTEND=noninteractive

ARG LLVM_VERSION=12

ARG RUST_STABLE_VERSION=1.72.0
ARG RUST_NIGHTLY_VERSION=nightly-2022-12-02
ARG RUST_STABLE_VERSION=1.75.0
ARG RUST_NIGHTLY_VERSION=nightly-2023-11-10

RUN apt-get update && apt-get upgrade -qy
RUN apt-get install -qy \
Expand All @@ -35,15 +35,25 @@ RUN cd /usr/bin && \

# ARM Embedded Toolchain
# Integrity is checked using the MD5 checksum provided by ARM at https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads
RUN curl -sSfL -o arm-toolchain.tar.bz2 "https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2" && \
echo 2383e4eb4ea23f248d33adc70dc3227e arm-toolchain.tar.bz2 > /tmp/arm-toolchain.md5 && \
md5sum --check /tmp/arm-toolchain.md5 && rm /tmp/arm-toolchain.md5 && \
ENV TOOLCHAIN_VERSION 10.3-2021.10
RUN case $(uname -m) in \
x86_64 | amd64) \
ARCH=x86_64 \
MD5=2383e4eb4ea23f248d33adc70dc3227e;; \
aarch64 | arm64) \
ARCH=aarch64; \
MD5=3fe3d8bb693bd0a6e4615b6569443d0d;; \
*) echo "Unkown architecture" && exit 1;; \
esac && \
curl -sSfL -o arm-toolchain.tar.bz2 "https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/${TOOLCHAIN_VERSION}/gcc-arm-none-eabi-${TOOLCHAIN_VERSION}-${ARCH}-linux.tar.bz2" && \
echo ${MD5} arm-toolchain.tar.bz2 > /tmp/arm-toolchain.md5 && \
md5sum --check /tmp/arm-toolchain.md5 && rm /tmp/arm-toolchain.md5 && \
tar xf arm-toolchain.tar.bz2 -C /opt && \
rm arm-toolchain.tar.bz2

# Adding GCC to PATH and defining rustup/cargo home directories
ENV PATH=/opt/gcc-arm-none-eabi-10.3-2021.10/bin:$PATH \
RUSTUP_HOME=/opt/rustup \
ENV PATH=/opt/gcc-arm-none-eabi-${TOOLCHAIN_VERSION}/bin:$PATH \
RUSTUP_HOME=/opt/rustup \
CARGO_HOME=/opt/.cargo

# Adding cargo binaries to PATH
Expand Down

0 comments on commit 8d50c2b

Please sign in to comment.