Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistently use same Rust nightly across CI and Docker images #1099

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Consistently use same Rust nightly across CI and Docker images
This should fix the nightly `crux-mir` Docker job. While I was in town, I made
sure to leave breadcrumbs to the reader such that if they ever update the Rust
nightly in one spot, they will remember to update it in the other spot.
  • Loading branch information
RyanGlScott committed Jul 15, 2023
commit b87f3fef554d1b91d8a670a21f68f9e0359aa4b2
14 changes: 10 additions & 4 deletions .github/Dockerfile-crux-mir
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# If you update this, make sure to also update RUST_TOOLCHAIN in
# .github/workflows/crux-mir-build.yml
ARG RUST_TOOLCHAIN="nightly-2023-01-23"

FROM rust:1.46.0 AS mir_json
ARG RUST_TOOLCHAIN

ADD dependencies/mir-json /mir-json
WORKDIR /mir-json
RUN rustup toolchain install nightly-2020-03-22 --force
RUN rustup component add --toolchain nightly-2020-03-22 rustc-dev
RUN rustup default nightly-2020-03-22
RUN rustup toolchain install ${RUST_TOOLCHAIN} --force
RUN rustup component add --toolchain ${RUST_TOOLCHAIN} rustc-dev
RUN rustup default ${RUST_TOOLCHAIN}
RUN cargo install --locked

FROM ubuntu:22.04 AS build
ARG RUST_TOOLCHAIN

RUN apt-get update && \
apt-get install -y \
Expand Down Expand Up @@ -58,7 +64,7 @@ RUN cabal v2-build --only-dependencies crux-mir
RUN cabal v2-build crux-mir
RUN cp `cabal v2-exec which crux-mir` /usr/local/bin
RUN cp /usr/local/cargo/bin/* /usr/local/bin/
RUN rustup default nightly-2020-03-22
RUN rustup default ${RUST_TOOLCHAIN}
WORKDIR ${DIR}/build/crux-mir
RUN ./translate_libs.sh
WORKDIR ${DIR}/build
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/crux-mir-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ env:
# (symptom: "No suitable image found ... unknown file type, first
# eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00")
CACHE_VERSION: 4
# If you update this, make sure to also update RUST_TOOLCHAIN in
# .github/Dockerfile-crux-mir
RUST_TOOLCHAIN: "nightly-2023-01-23"

jobs:
config:
Expand Down Expand Up @@ -101,7 +104,7 @@ jobs:
- name: Install latest Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-01-23
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustc-dev

Expand Down
Loading