From eff8ce995b9f75c35e9ad335d813c2affc593aba Mon Sep 17 00:00:00 2001 From: sehnryr Date: Fri, 10 May 2024 02:15:48 +0200 Subject: [PATCH] ci: update cargo-component installation conditions --- .github/workflows/build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 49f5091..0f7d3de 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -15,6 +15,7 @@ concurrency: jobs: build: env: + CARGO_COMPONENT_VERSION: "0.11.0" SCCACHE_CACHE_SIZE: "2G" SCCACHE_VERSION: "0.8.0" RUSTC_WRAPPER: "/usr/local/bin/sccache" @@ -73,7 +74,10 @@ jobs: targets: wasm32-unknown-unknown - name: Install cargo-component - run: cargo install cargo-component --locked --version 0.11.0 + run: | + if ! command -v cargo-component || ! cargo-component --version | grep -q $CARGO_COMPONENT_VERSION; then + cargo install cargo-component --locked --version $CARGO_COMPONENT_VERSION --force + fi - name: Build extensions run: cargo component build --release --workspace --target wasm32-unknown-unknown