Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraccaman committed Sep 10, 2024
1 parent 8f19a62 commit aceec53
Showing 1 changed file with 12 additions and 71 deletions.
83 changes: 12 additions & 71 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ namada:
RUN apt-get install -y pkg-config
RUN apt-get install -y gcc
RUN apt-get install -y parallel

# needed for speculos
RUN apt install -y \
git python3-pip pipx cmake gcc-arm-linux-gnueabihf libc6-dev-armhf-cross gdb-multiarch \
python3-pyqt5 python3-construct python3-flask-restful python3-jsonschema \
python3-mnemonic python3-pil python3-pyelftools python3-requests \
qemu-user-static libvncserver-dev

RUN pipx install speculos

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
Expand Down Expand Up @@ -82,6 +91,8 @@ namada:
RUN mv wasm-opt /usr/local/bin
RUN chmod +x /usr/local/bin/wasm-opt

RUN pip install speculos

Check failure on line 94 in Earthfile

View workflow job for this annotation

GitHub Actions / build (namada)

Error

The command RUN pip install speculos did not complete successfully. Exit code 1

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

wasm:
Expand Down Expand Up @@ -112,74 +123,4 @@ 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

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 curl -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 -s -- -y
RUN $HOME/.cargo/env

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
SAVE IMAGE --push ghcr.io/heliaxdev/namada-ci:wasm-latest ghcr.io/heliaxdev/namada-ci:wasm-main

0 comments on commit aceec53

Please sign in to comment.