chore: Run CI on PRs that are Ready or have the "DraftRunCI" label (#5400)

- Avoids costly overhead for idle PRs where the CI results don't add any
  value.
This commit is contained in:
Ed Hennis
2025-04-11 18:20:59 -04:00
committed by GitHub
parent cba512068b
commit 405f4613d8
6 changed files with 19 additions and 2 deletions

View File

@@ -1,9 +1,13 @@
name: clang-format name: clang-format
on: [push, pull_request] on:
push:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs: jobs:
check: check:
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
env: env:
CLANG_VERSION: 18 CLANG_VERSION: 18

View File

@@ -1,9 +1,13 @@
name: levelization name: levelization
on: [push, pull_request] on:
push:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs: jobs:
check: check:
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
CLANG_VERSION: 10 CLANG_VERSION: 10

View File

@@ -8,12 +8,14 @@ on:
paths: paths:
- 'src/libxrpl/protocol/BuildInfo.cpp' - 'src/libxrpl/protocol/BuildInfo.cpp'
- '.github/workflows/libxrpl.yml' - '.github/workflows/libxrpl.yml'
types: [opened, reopened, synchronize, ready_for_review]
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
publish: publish:
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
name: Publish libXRPL name: Publish libXRPL
outputs: outputs:
outcome: ${{ steps.upload.outputs.outcome }} outcome: ${{ steps.upload.outputs.outcome }}

View File

@@ -1,6 +1,7 @@
name: macos name: macos
on: on:
pull_request: pull_request:
types: [opened, reopened, synchronize, ready_for_review]
push: push:
# If the branches list is ever changed, be sure to change it on all # If the branches list is ever changed, be sure to change it on all
# build/test jobs (nix, macos, windows, instrumentation) # build/test jobs (nix, macos, windows, instrumentation)
@@ -18,6 +19,7 @@ concurrency:
jobs: jobs:
test: test:
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
strategy: strategy:
matrix: matrix:
platform: platform:

View File

@@ -1,6 +1,7 @@
name: nix name: nix
on: on:
pull_request: pull_request:
types: [opened, reopened, synchronize, ready_for_review]
push: push:
# If the branches list is ever changed, be sure to change it on all # If the branches list is ever changed, be sure to change it on all
# build/test jobs (nix, macos, windows) # build/test jobs (nix, macos, windows)
@@ -39,6 +40,7 @@ concurrency:
jobs: jobs:
dependencies: dependencies:
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -358,6 +360,7 @@ jobs:
# later # later
instrumentation-build: instrumentation-build:
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
env: env:
CLANG_RELEASE: 16 CLANG_RELEASE: 16
strategy: strategy:

View File

@@ -2,6 +2,7 @@ name: windows
on: on:
pull_request: pull_request:
types: [opened, reopened, synchronize, ready_for_review]
push: push:
# If the branches list is ever changed, be sure to change it on all # If the branches list is ever changed, be sure to change it on all
# build/test jobs (nix, macos, windows, instrumentation) # build/test jobs (nix, macos, windows, instrumentation)
@@ -21,6 +22,7 @@ concurrency:
jobs: jobs:
test: test:
if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix: