From 3b02aa6e9dad33eaabef3e8a3096421e6ad9ad93 Mon Sep 17 00:00:00 2001 From: Sebastian Goll <1277035+sgoll@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:50:19 +0100 Subject: [PATCH] Work around failing CI workflow on `cargo install` (#189) ## Description This PR adds a workaround for the invocation of `cargo install cargo-hack` in case it it fails when the CI runner image does not provide the necessary Rust version. See https://github.com/HMIProject/open62541/actions/runs/12414513710/job/34658803434?pr=188. --- .github/workflows/latest-dependencies.yaml | 4 +++- .github/workflows/test.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/latest-dependencies.yaml b/.github/workflows/latest-dependencies.yaml index 6c37e63..eb5014f 100644 --- a/.github/workflows/latest-dependencies.yaml +++ b/.github/workflows/latest-dependencies.yaml @@ -66,8 +66,10 @@ jobs: target: ${{ matrix.target }} - name: Install Cargo helpers + # Fall back to installing with locked dependencies when installed rustc + # is too old. run: >- - cargo install cargo-hack + cargo install cargo-hack || cargo install --locked cargo-hack # Check out the repository before the remaining steps that depend on it. # All preceding steps are independent of the repository contents. diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c531dd4..0a8f59c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -90,8 +90,10 @@ jobs: target: ${{ matrix.target }} - name: Install Cargo helpers + # Fall back to installing with locked dependencies when installed rustc + # is too old. run: >- - cargo install cargo-hack + cargo install cargo-hack || cargo install --locked cargo-hack # Check out the repository before the remaining steps that depend on it. # All preceding steps are independent of the repository contents.