fix: manage rust toolchain version with vars (#834)
parent
a12f741565
commit
ad9dbd55e8
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue