Skip to content

Commit

Permalink
speculos
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Sep 9, 2024
1 parent 108f84a commit 0b5dd85
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
command: [namada, wasm]
command: [namada, wasm, speculos]

env:
FORCE_COLOR: 1
Expand Down
69 changes: 68 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,71 @@ wasm:
RUN mv wasm-opt /usr/local/bin
RUN chmod +x /usr/local/bin/wasm-opt

SAVE IMAGE --push ghcr.io/heliaxdev/namada-ci:wasm-latest ghcr.io/heliaxdev/namada-ci:wasm-main
SAVE IMAGE --push ghcr.io/heliaxdev/namada-ci:wasm-latest ghcr.io/heliaxdev/namada-ci:wasm-main

speculos:
FROM ghcr.io/ledgerhq/speculos

WORKDIR /__w/namada/namada

ARG toolchain=1.78.0
ARG nightly_toolchain=nightly-2024-05-15
ARG rocksdb_version=8.10.0
ARG gaia_version=15.2.0
ARG cometbft_version=0.37.9

RUN apt-get update -y
RUN apt-get install -y protobuf-compiler
RUN apt-get install -y build-essential
RUN apt-get install -y clang-tools clang
RUN apt-get install -y libudev-dev
RUN apt-get install -y libssl-dev
RUN apt-get install -y pkg-config
RUN apt-get install -y gcc
RUN apt-get install -y parallel

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
RUN rustup toolchain install $toolchain-x86_64-unknown-linux-gnu --no-self-update --component clippy,rustfmt,rls,rust-analysis,rust-docs,rust-src,llvm-tools-preview
RUN rustup target add wasm32-unknown-unknown
RUN rustup toolchain install $nightly_toolchain-x86_64-unknown-linux-gnu --no-self-update --component clippy,rustfmt,rls,rust-analysis,rust-docs,rust-src,llvm-tools-preview,rustc-codegen-cranelift-preview
RUN rustup target add --toolchain $nightly_toolchain wasm32-unknown-unknown
RUN rustup default $toolchain-x86_64-unknown-linux-gnu

# download masp artifacts
RUN mkdir -p /masp/.masp-params
RUN curl -o /masp/.masp-params/masp-spend.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-spend.params\?raw\=true
RUN curl -o /masp/.masp-params/masp-output.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-output.params?raw=true
RUN curl -o /masp/.masp-params/masp-convert.params -L https://github.com/anoma/masp-mpc/releases/download/namada-trusted-setup/masp-convert.params?raw=true

# install cargo binstall
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash

# install cargo nextest
RUN cargo binstall cargo-nextest --no-confirm

# install sccache
RUN cargo binstall sccache --no-confirm

# install cargo cache
RUN cargo binstall cargo-cache --no-confirm

# download mold
RUN curl -o mold.tar.gz -LO https://github.com/rui314/mold/releases/download/v2.32.1/mold-2.32.1-x86_64-linux.tar.gz
RUN tar --strip-components 2 -xvzf mold.tar.gz mold-2.32.1-x86_64-linux/bin/mold
RUN mv mold /usr/local/bin
RUN chmod +x /usr/local/bin/mold

# download gaia
RUN curl -o gaiad -LO https://github.com/cosmos/gaia/releases/download/v${gaia_version}/gaiad-v${gaia_version}-linux-amd64
RUN mv gaiad /usr/local/bin
RUN chmod +x /usr/local/bin/gaiad

# download cometbft
RUN curl -o cometbft.tar.gz -LO https://github.com/cometbft/cometbft/releases/download/v${cometbft_version}/cometbft_${cometbft_version}_linux_amd64.tar.gz
RUN tar -xvzf cometbft.tar.gz
RUN mv cometbft /usr/local/bin
RUN chmod +x /usr/local/bin/cometbft

COPY ./artifacts/app_s2.elf .

SAVE IMAGE --push ghcr.io/heliaxdev/namada-ci:speculos-latest ghcr.io/heliaxdev/namada-ci:speculos-main
Binary file added artifacts/app_s2.elf
Binary file not shown.

0 comments on commit 0b5dd85

Please sign in to comment.