Skip to content

Commit 87ad066

Browse files
committed
Install Rust in Docker and CI
1 parent 81bc339 commit 87ad066

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.github/workflows/job-test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ jobs:
3939
with:
4040
ruby-version: "3.3.4"
4141

42+
43+
- name: Set up Rust
44+
uses: dtolnay/rust-toolchain@stable
45+
with:
46+
toolchain: "1.86.0"
47+
components: llvm-tools-preview
48+
49+
- name: Install Rust crates
50+
run: cargo install cargo-llvm-cov
51+
shell: bash
52+
4253
- name: Set up Git
4354
run: |
4455
git config --global user.name "GitHub Actions Bot"

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ RUN apt-get update && \
1414
apt-get install -y \
1515
--no-install-recommends \
1616
ca-certificates \
17+
curl \
1718
gcc \
1819
git \
1920
imagemagick \
@@ -97,6 +98,15 @@ ENV PATH="${PATH}:/app/.eval-dev-quality/go/bin"
9798
ENV GOROOT="/app/.eval-dev-quality/go"
9899
ENV PATH="${PATH}:/home/ubuntu/go/bin"
99100

101+
# Install Rust
102+
ENV RUSTUP_HOME="/app/.eval-dev-quality/rustup"
103+
ENV CARGO_HOME="/app/.eval-dev-quality/cargo"
104+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path && \
105+
/app/.eval-dev-quality/cargo/bin/rustup install 1.86.0 && \
106+
/app/.eval-dev-quality/cargo/bin/rustup component add llvm-tools-preview && \
107+
/app/.eval-dev-quality/cargo/bin/cargo install cargo-llvm-cov
108+
ENV PATH="${PATH}:/app/.eval-dev-quality/cargo/bin"
109+
100110
# Setup NPM global store in User space and install NPM packages.
101111
ENV NPM_CONFIG_PREFIX=/home/ubuntu/.npm-global
102112
ENV PATH="${PATH}:/home/ubuntu/.npm-global/bin"

0 commit comments

Comments
 (0)