diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 52633ba..779d621 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - command: [namada, wasm] + command: [namada, wasm, speculos] env: FORCE_COLOR: 1 diff --git a/Earthfile b/Earthfile index 655352e..233cadc 100644 --- a/Earthfile +++ b/Earthfile @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/artifacts/app_s2.elf b/artifacts/app_s2.elf new file mode 100644 index 0000000..d6f42cc Binary files /dev/null and b/artifacts/app_s2.elf differ