From 54e8fad959d6a6e53e08c62ac3a3c4d4bdc6c957 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 19 Dec 2025 02:23:29 +0000 Subject: [PATCH] Ignore merge commits on bootstrap testing PRs (#25884) --- .github/workflows/bootstrap_testing.yml | 37 ++++++++++++++++++++++--- util/env-bootstrap.sh | 2 +- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.github/workflows/bootstrap_testing.yml b/.github/workflows/bootstrap_testing.yml index c80d89a218..16abaee66d 100644 --- a/.github/workflows/bootstrap_testing.yml +++ b/.github/workflows/bootstrap_testing.yml @@ -4,20 +4,42 @@ on: push: branches: [master, develop, xap] paths: - - "util/env-bootstrap.sh" - - ".github/workflows/bootstrap_testing.yml" + - 'util/env-bootstrap.sh' + - '.github/workflows/bootstrap_testing.yml' pull_request: paths: - - "util/env-bootstrap.sh" - - ".github/workflows/bootstrap_testing.yml" + - 'util/env-bootstrap.sh' + - '.github/workflows/bootstrap_testing.yml' workflow_dispatch: permissions: contents: read jobs: + prep: + runs-on: ubuntu-latest + + if: ${{ github.event_name == 'pull_request' }} + + outputs: + any_changed: ${{ steps.file_changes.outputs.any_changed }} + + steps: + - name: Get changed files + id: file_changes + uses: tj-actions/changed-files@v47 + with: + use_rest_api: true + files: | + util/env-bootstrap.sh + .github/workflows/bootstrap_testing.yml + bootstrap-test-linux: name: Bootstrap (Linux) + + needs: prep + if: ${{ github.event_name != 'pull_request' || needs.prep.outputs.any_changed == 'true' }} + runs-on: ubuntu-latest strategy: @@ -163,6 +185,10 @@ jobs: bootstrap-test-macos: name: Bootstrap (macOS) + + needs: prep + if: ${{ github.event_name != 'pull_request' || needs.prep.outputs.any_changed == 'true' }} + strategy: fail-fast: false matrix: @@ -208,6 +234,9 @@ jobs: bootstrap-test-windows: name: Bootstrap (Windows) + needs: prep + if: ${{ github.event_name != 'pull_request' || needs.prep.outputs.any_changed == 'true' }} + strategy: fail-fast: false matrix: diff --git a/util/env-bootstrap.sh b/util/env-bootstrap.sh index 6b0497ffae..07020ea371 100755 --- a/util/env-bootstrap.sh +++ b/util/env-bootstrap.sh @@ -230,7 +230,7 @@ __EOT__ *debian* | *ubuntu*) echo "zstd build-essential clang-format diffutils wget unzip zip libhidapi-hidraw0 dos2unix git" ;; *fedora*) echo "zstd clang diffutils which gcc git wget unzip zip hidapi dos2unix libusb-devel libusb1-devel libusb-compat-0.1-devel libusb0-devel git epel-release" ;; *suse*) echo "zstd clang diffutils wget unzip zip libhidapi-hidraw0 dos2unix git libusb-1_0-devel gzip which" ;; - *gentoo*) echo "zstd diffutils wget unzip zip dev-libs/hidapi dos2unix dev-vcs/git dev-libs/libusb app-arch/gzip which" ;; + *gentoo*) echo "zstd sys-apps/diffutils wget unzip zip dev-libs/hidapi dos2unix dev-vcs/git dev-libs/libusb app-arch/gzip which" ;; *) echo >&2 echo "Sorry, we don't recognize your distribution." >&2