From 617970967ac9f7713db693ffc9a5a8a0ba26b212 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Thu, 11 Jul 2024 19:00:38 +0200 Subject: [PATCH] initial commit --- .github/workflows/docker.yml | 4 +++- Earthfile | 23 ++++++++++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 769e215..e1b7919 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -35,4 +35,6 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Run build - run: earthly +build \ No newline at end of file + run: earthly +build + env: + EARTHLY_PUSH: ${{ github.ref == 'refs/heads/main' }} \ No newline at end of file diff --git a/Earthfile b/Earthfile index 926661e..63503d1 100644 --- a/Earthfile +++ b/Earthfile @@ -67,5 +67,26 @@ namada: RUN tar --strip-components 2 -xvzf binaryen.tar.gz binaryen-version_${wasm_opt_version}/bin/wasm-opt RUN mv wasm-opt /usr/local/bin +wasm: + FROM rust:1.78.0-bookworm + + ARG wasm_opt_version=118 + + WORKDIR /__w/namada/namada + + RUN apt-get update -y + RUN apt-get install -y protobuf-compiler + RUN apt-get install -y libudev-dev + RUN apt-get install -y parallel + + RUN rustup toolchain install 1.78.0 --profile minimal + RUN rustup target add wasm32-unknown-unknown + + # download wasm-opt + RUN curl -o binaryen.tar.gz -LO https://github.com/WebAssembly/binaryen/releases/download/version_${wasm_opt_version}/binaryen-version_${wasm_opt_version}-x86_64-linux.tar.gz + RUN tar --strip-components 2 -xvzf binaryen.tar.gz binaryen-version_${wasm_opt_version}/bin/wasm-opt + RUN mv wasm-opt /usr/local/bin + build: - BUILD +namada \ No newline at end of file + BUILD +namada + BUILD +wasm \ No newline at end of file