fix: manage rust toolchain version with vars (#834)

release-fix-intellij-update-support-version-range
Meng Zhang 2023-11-18 16:06:56 -08:00 committed by GitHub
parent a12f741565
commit ad9dbd55e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -35,7 +35,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.73.0
toolchain: ${{ vars.RUST_TOOLCHAIN }}
- name: Sccache cache
uses: mozilla-actions/sccache-action@v0.0.3
@ -86,7 +86,7 @@ jobs:
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: ${{ vars.RUST_TOOLCHAIN }}
target: ${{ matrix.target }}
components: clippy

View File

@ -101,6 +101,8 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: ${{ steps.cache.outputs.cache-from }}
cache-to: ${{ steps.cache.outputs.cache-to }}
build-args: |
RUST_TOOLCHAIN=${{ vars.RUST_TOOLCHAIN }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3

View File

@ -5,6 +5,8 @@ ARG CUDA_VERSION=11.7.1
ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
# Target the CUDA runtime image
ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
# Rust toolchain version
ARG RUST_TOOLCHAIN stable
FROM ${BASE_CUDA_DEV_CONTAINER} as build
@ -22,7 +24,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*
# setup rust.
RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain 1.73.0 -y
RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain ${RUST_TOOLCHAIN} -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /root/workspace