Skip to content

Commit

Permalink
[ci] run specific step in docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianmarco Fraccaroli committed Jul 29, 2022
1 parent c53f269 commit 9d327b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ jobs:
build-wasm:
timeout-minutes: 30
runs-on: ${{ matrix.os }}
container:
container:
image: ghcr.io/anoma/namada:wasm-0.6.1
options: -v /home/runner/work/namada":"/usr/local/rust/wasm
strategy:
fail-fast: false
matrix:
Expand All @@ -35,10 +36,11 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Show rust toolchain info
run: rustup show
- name: Duplicate checksums file
run: cp wasm/checksums.json wasm/original-checksums.json
- name: Build WASM
run: cp wasm/checksums.json wasm/original-checksums.json && make build-wasm-scripts
run: |
make build-wasm-scripts
- name: Upload wasm artifacts
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -96,7 +98,7 @@ jobs:
cache_key: anoma
cache_version: v1
wait_for: anoma-release (ubuntu-latest, ABCI Release build, anoma-e2e-release, v1)
tendermint_artifact: tendermint-unreleased-29e5fbcc648510e4763bd0af0b461aed92c21f30
tendermint_artifact: tendermint-unreleased-559fb33ff9b27503ce7ac1c7d8589fe1d8b3e900

env:
CARGO_INCREMENTAL: 0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ build-wasm-image-docker:
docker build -t namada-wasm - < docker/namada-wasm/Dockerfile

build-wasm-scripts-docker: build-wasm-image-docker
docker run --rm -v ${PWD}:/usr/local/rust/wasm namada-wasm make build-wasm-scripts
docker run --rm -v ${PWD}:/__w/namada/namada namada-wasm make build-wasm-scripts

# Build the validity predicate, transactions, matchmaker and matchmaker filter wasm
build-wasm-scripts:
Expand Down
10 changes: 4 additions & 6 deletions docker/namada-wasm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# This docker is used for deterministic wasm builds

# The version should be matching the version set in wasm/rust-toolchain.toml
FROM rust:1.61.0
FROM rust:1.61

WORKDIR /usr/local/rust/wasm
WORKDIR /__w/namada/namada

# The version should be matching the version set above
RUN rustup toolchain install 1.61.0 --component rustc cargo rust-std rust-docs rls rust-analysis rustfmt
RUN rustup toolchain install 1.61.0 --profile minimal
RUN rustup target add wasm32-unknown-unknown

# Download binaryen and verify checksum
# Download binaryen and extract wasm-opt
ADD https://github.com/WebAssembly/binaryen/releases/download/version_109/binaryen-version_109-x86_64-linux.tar.gz /tmp/binaryen.tar.gz

# Extract and install wasm-opt
RUN tar -xf /tmp/binaryen.tar.gz
RUN mv binaryen-version_*/bin/wasm-opt /usr/local/bin
RUN rm -rf binaryen-version_*/ /tmp/binaryen.tar.gz

0 comments on commit 9d327b5

Please sign in to comment.