From fc3c000de69442bac8330046d47c1a3ead4bf331 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Fri, 15 May 2026 18:13:30 +0200 Subject: [PATCH 1/2] Improved pipeline (#763) --- .github/workflows/build-and-release.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 2fe8cc6d..dc639073 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -12,6 +12,10 @@ on: - synchronize - reopened +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && (github.event.action != 'labeled' || github.event.label.name == 'run-pipeline') && github.event.pull_request.number || github.run_id }} + cancel-in-progress: ${{ github.event_name == 'pull_request' && (github.event.action != 'labeled' || github.event.label.name == 'run-pipeline') }} + env: RETENTION_INTERMEDIATE_ASSETS: 1 RETENTION_RELEASE_ASSETS: 30 @@ -37,6 +41,8 @@ jobs: id: determine env: EVENT_NAME: ${{ github.event_name }} + PR_ACTION: ${{ github.event.action }} + ACTION_LABEL_NAME: ${{ github.event.label.name }} REF: ${{ github.ref }} PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }} PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }} @@ -55,6 +61,11 @@ jobs: is_internal_pr=true fi + has_run_pipeline_label=false + if [[ " $PR_LABELS " == *" run-pipeline "* ]]; then + has_run_pipeline_label=true + fi + if [[ "$REF" == refs/tags/v* ]]; then is_release=true build_enabled=true @@ -65,13 +76,21 @@ jobs: build_enabled=true artifact_retention_days=7 skip_reason="" - elif [[ "$EVENT_NAME" == "pull_request" && " $PR_LABELS " == *" run-pipeline "* ]]; then + elif [[ "$EVENT_NAME" == "pull_request" && "$PR_ACTION" == "labeled" && "$ACTION_LABEL_NAME" == "run-pipeline" ]]; then is_labeled_pr=true is_pr_build=true build_enabled=true artifact_retention_days=3 skip_reason="" - elif [[ "$EVENT_NAME" == "pull_request" && " $PR_LABELS " != *" run-pipeline "* ]]; then + elif [[ "$EVENT_NAME" == "pull_request" && "$PR_ACTION" != "labeled" && "$has_run_pipeline_label" == "true" ]]; then + is_labeled_pr=true + is_pr_build=true + build_enabled=true + artifact_retention_days=3 + skip_reason="" + elif [[ "$EVENT_NAME" == "pull_request" && "$PR_ACTION" == "labeled" ]]; then + skip_reason="Build disabled: label '${ACTION_LABEL_NAME}' is not 'run-pipeline'." + elif [[ "$EVENT_NAME" == "pull_request" && "$has_run_pipeline_label" != "true" ]]; then skip_reason="Build disabled: PR does not have the required 'run-pipeline' label." fi @@ -685,11 +704,9 @@ jobs: uses: actions/cache@v4 with: path: | - ~/.cargo/bin ~/.cargo/git/db/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ - ~/.rustup/toolchains runtime/target key: target-${{ matrix.dotnet_runtime }}-rust-${{ env.RUST_VERSION }} From 8f0effd25bb8a6f16dc6ce679b87230096d2f8e3 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sat, 16 May 2026 17:38:38 +0200 Subject: [PATCH 2/2] Added dedicated Tauri tool cache (#764) --- .github/workflows/build-and-release.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index dc639073..b290ba11 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -716,6 +716,12 @@ jobs: with: toolchain: ${{ env.RUST_VERSION }} targets: ${{ matrix.rust_target }} + + - name: Cache Tauri CLI + uses: actions/cache@v4 + with: + path: ~/.cargo-tauri-cli + key: tauri-cli-v2-${{ runner.os }}-${{ runner.arch }} - name: Setup dependencies (Ubuntu-specific, x86) if: matrix.platform == 'ubuntu-22.04' && contains(matrix.rust_target, 'x86_64') @@ -732,8 +738,11 @@ jobs: - name: Setup Tauri (Unix) if: matrix.platform != 'windows-latest' run: | + echo "$HOME/.cargo-tauri-cli/bin" >> "$GITHUB_PATH" + export PATH="$HOME/.cargo-tauri-cli/bin:$PATH" + if ! cargo tauri --version 2>/dev/null | grep -Eq '^tauri-cli 2\.'; then - cargo install tauri-cli --version "^2.11.0" --locked --force + cargo install tauri-cli --version "^2.11.0" --locked --force --root "$HOME/.cargo-tauri-cli" else echo "Tauri CLI v2 is already installed" fi @@ -741,9 +750,12 @@ jobs: - name: Setup Tauri (Windows) if: matrix.platform == 'windows-latest' run: | + "$env:USERPROFILE\.cargo-tauri-cli\bin" >> $env:GITHUB_PATH + $env:PATH = "$env:USERPROFILE\.cargo-tauri-cli\bin;$env:PATH" + $tauriVersion = cargo tauri --version 2>$null if (-not $tauriVersion -or $tauriVersion -notmatch '^tauri-cli 2\.') { - cargo install tauri-cli --version "^2.11.0" --locked --force + cargo install tauri-cli --version "^2.11.0" --locked --force --root "$env:USERPROFILE\.cargo-tauri-cli" } else { Write-Output "Tauri CLI v2 is already installed" }