From 16b882be79dd29623b0257294e15d0dde5276827 Mon Sep 17 00:00:00 2001 From: Pranav Gaddamadugu <23022326+d0cd@users.noreply.github.com> Date: Tue, 19 Nov 2024 08:18:06 -0800 Subject: [PATCH] Minor tweaks --- .circleci/config.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c03de60d48..82451ff6cf 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,23 +36,27 @@ executors: resource_class: xlarge commands: - install-rust: + install-rust-macos: description: "Install Rust (Linux/macOS)" steps: - run: name: Install Rust command: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source "$HOME/.cargo/env" - rustup install 1.82.0 - rustup override set 1.82.0 - cargo --version --verbose - rustc --version + # If Rust is not installed on the machine, install it + if ! command -v rustc &> /dev/null; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source "$HOME/.cargo/env" + rustup install 1.82.0 + rustup override set 1.82.0 + cargo --version --verbose + rustc --version + fi if [ ! -f "Cargo.lock" ]; then cargo generate-lockfile fi cargo install cargo-mtime + install-rust-windows: description: "Install Rust (Windows)" @@ -148,6 +152,7 @@ jobs: - cargo-v1-{{ arch }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }} - cargo-v1-{{ arch }}-{{ checksum "Cargo.toml" }} - cargo-v1-{{ arch }} + - install-rust - run: name: Update Submodules command: git submodule update --init --recursive