Skip to content

Commit

Permalink
[CI] Update docker environment
Browse files Browse the repository at this point in the history
  • Loading branch information
0yi0 committed Dec 17, 2020
1 parent 71d420a commit 8563fdf
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/.autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
container:
image: secondstate/substrate-ssvm

strategy:
matrix:
toolchain: ['stable']

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand All @@ -31,4 +35,7 @@ jobs:
run: |
ln -sf /root/.rustup $HOME/
ln -sf /root/.cargo $HOME/
cargo build --release
rustup toolchain install ${{ matrix.toolchain }}
rustup target add wasm32-unknown-unknown --toolchain ${{ matrix.toolchain }}
rustup default ${{ matrix.toolchain }}
cargo build --release
25 changes: 18 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
FROM secondstate/ssvm:latest
ENV PATH="/root/.cargo/bin:${PATH}"

ARG DEBIAN_FRONTEND=noninteractive
ARG RUSTUP_TOOLCHAIN=nightly-2020-10-06
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH

# Install rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN rustup update nightly && rustup update stable
RUN rustup target add wasm32-unknown-unknown --toolchain nightly
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
&& cargo install cargo-wasi
RUN rustup toolchain install ${RUSTUP_TOOLCHAIN} \
&& rustup target add wasm32-unknown-unknown --toolchain ${RUSTUP_TOOLCHAIN} \
&& rustup target add wasm32-unknown-unknown --toolchain stable \
&& rustup default stable

# Install yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
RUN apt update && apt install -y yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
RUN apt update \
&& apt install -y yarn

RUN rm -rf /var/lib/apt/lists/*

0 comments on commit 8563fdf

Please sign in to comment.