Skip to content

Commit 1f24db8

Browse files
ehildenbrv-auditor
andauthored
Move Rust setup into Dockerfile (#543)
As part of #542, we noticed that the `Dockerfile` does not install Rust, and we need it for integration tests run there. This PR makes sure `rustc` and `cargo` are available to run in the docker image for CI: - The `rustup` install step is moved to inside the docker image. - The steps for building KMir in the tests "Integration with stable-mir-json" are all moved to being in the docker image. --------- Co-authored-by: devops <devops@runtimeverification.com>
1 parent 45e9c00 commit 1f24db8

5 files changed

Lines changed: 10 additions & 24 deletions

File tree

.github/workflows/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ ARG GROUP_ID=1000
1313
RUN groupadd -g ${GROUP_ID} ${GROUP} && useradd -m -u ${USER_ID} -s /bin/sh -g ${GROUP} ${USER}
1414
USER ${USER}:${GROUP}
1515

16+
ENV PATH="/home/${USER}/.cargo/bin:${PATH}"
17+
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
18+
RUN rustup toolchain install nightly-2024-11-29 --component llvm-tools --component rustc-dev --component rust-src
19+
RUN rustup default nightly-2024-11-29-x86_64-unknown-linux-gnu
20+
1621
RUN mkdir /home/${USER}/workspace
1722
WORKDIR /home/${USER}/workspace
1823

.github/workflows/test.yml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,35 +87,16 @@ jobs:
8787
with:
8888
token: ${{ secrets.JENKINS_GITHUB_PAT }}
8989
submodules: recursive
90-
91-
- name: "Set up nightly Rust" # https://github.com/rust-lang/rustup/issues/3409
92-
uses: dtolnay/rust-toolchain@master
93-
with:
94-
toolchain: nightly-2024-11-29 # Hardcoded version, same as stable-mir-json
95-
96-
- name: 'remove override'
97-
run: |
98-
cd deps/stable-mir-json
99-
rustup override unset
100-
rustup override unset --nonexistent
101-
rustup toolchain uninstall stable-mir-json | echo "rustup toolchain uninstall stable-mir-json: FAILED"
102-
rustup toolchain remove stable-mir-json | echo "rustup toolchain remove stable-mir-json: FAILED"
103-
104-
- name: 'Build stable-mir-json'
105-
run: |
106-
make stable-mir-json
107-
10890
- name: 'Set up Docker'
10991
uses: ./.github/actions/with-docker
11092
with:
11193
container-name: mir-smir-ci-${{ github.sha }}
112-
94+
- name: 'Build stable-mir-json'
95+
run: docker exec --user github-user mir-smir-ci-${GITHUB_SHA} make stable-mir-json
11396
- name: 'Build kmir (within docker)'
11497
run: docker exec --user github-user mir-smir-ci-${GITHUB_SHA} make build
115-
11698
- name: 'Run parser tests (within docker)'
11799
run: docker exec --user github-user mir-smir-ci-${GITHUB_SHA} make smir-parse-tests
118-
119100
- name: 'Tear down Docker'
120101
if: always()
121102
run: docker stop --time 0 mir-smir-ci-${GITHUB_SHA}

kmir/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "kmir"
7-
version = "0.3.126"
7+
version = "0.3.127"
88
description = ""
99
requires-python = "~=3.10"
1010
dependencies = [

kmir/src/kmir/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from typing import Final
22

3-
VERSION: Final = '0.3.126'
3+
VERSION: Final = '0.3.127'

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.126
1+
0.3.127

0 commit comments

Comments
 (0)