Skip to content

Commit db1a994

Browse files
committed
[CI] Update docker environment
1 parent 71d420a commit db1a994

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

.github/workflows/.autobuild.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ jobs:
2121
container:
2222
image: secondstate/substrate-ssvm
2323

24+
strategy:
25+
matrix:
26+
toolchain: ['stable']
27+
2428
# Steps represent a sequence of tasks that will be executed as part of the job
2529
steps:
2630
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -31,4 +35,7 @@ jobs:
3135
run: |
3236
ln -sf /root/.rustup $HOME/
3337
ln -sf /root/.cargo $HOME/
34-
cargo build --release
38+
rustup toolchain install ${{ matrix.toolchain }}
39+
rustup target add wasm32-unknown-unknown --toolchain ${{ matrix.toolchain }}
40+
rustup default ${{ matrix.toolchain }}
41+
cargo build --release

Dockerfile

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
FROM secondstate/ssvm:latest
2-
ENV PATH="/root/.cargo/bin:${PATH}"
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
ENV RUSTUP_HOME=/usr/local/rustup \
5+
CARGO_HOME=/usr/local/cargo \
6+
PATH=/usr/local/cargo/bin:$PATH
37

48
# Install rust
5-
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
6-
RUN rustup update nightly && rustup update stable
7-
RUN rustup target add wasm32-unknown-unknown --toolchain nightly
9+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
10+
&& cargo install cargo-wasi
11+
RUN rustup toolchain install nightly \
12+
&& rustup target add wasm32-unknown-unknown --toolchain nightly \
13+
&& rustup target add wasm32-unknown-unknown --toolchain stable \
14+
&& rustup default stable
815

916
# Install yarn
10-
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
11-
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
12-
RUN apt update && apt install -y yarn
17+
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
18+
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
19+
RUN apt update \
20+
&& apt install -y yarn
21+
22+
RUN rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)