Commit 3ea0ea2bbe for openssl.org
commit 3ea0ea2bbe518499c17ee908c221f5266e8a9676
Author: Dmitry Misharov <dmitry@openssl.org>
Date: Tue Nov 24 09:30:12 2026 +0100
.github/workflows: share repeated job conditions via YAML anchors
Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Andrew Dinh <andrewd@openssl.org>
Reviewed-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Merge-date: Wed Nov 25 20:35:29 2026
Merged-from: https://github.com/openssl/openssl/pull/33945
diff --git a/.github/workflows/aarch64-more-cross-compiles.yml b/.github/workflows/aarch64-more-cross-compiles.yml
index 04ec3ba318..9cb5813b11 100644
--- a/.github/workflows/aarch64-more-cross-compiles.yml
+++ b/.github/workflows/aarch64-more-cross-compiles.yml
@@ -59,7 +59,7 @@ jobs:
# cron job
# manual dispatch
needs: [validate-dispatch-inputs]
- if: >-
+ if: &aarch64_requested >-
(contains(github.event.pull_request.title, 'aarch64') || contains(github.event.pull_request.title, 'AArch64') || contains(github.event.pull_request.title, 'arm64') || contains(github.event.pull_request.body, '[aarch64 ci]') || contains(github.event.head_commit.message, '[aarch64 ci]') || (github.event_name == 'schedule' && github.repository == 'openssl/openssl') || github.event_name == 'workflow_dispatch') &&
!cancelled() &&
(needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
@@ -250,10 +250,7 @@ jobs:
# cron job
# manual dispatch
needs: [validate-dispatch-inputs]
- if: >-
- (contains(github.event.pull_request.title, 'aarch64') || contains(github.event.pull_request.title, 'AArch64') || contains(github.event.pull_request.title, 'arm64') || contains(github.event.pull_request.body, '[aarch64 ci]') || contains(github.event.head_commit.message, '[aarch64 ci]') || (github.event_name == 'schedule' && github.repository == 'openssl/openssl') || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *aarch64_requested
runs-on: ubuntu-26.04-arm
steps:
- uses: actions/checkout@v6
diff --git a/.github/workflows/avx512-sde.yml b/.github/workflows/avx512-sde.yml
index 656568ccf2..0689cd8bb8 100644
--- a/.github/workflows/avx512-sde.yml
+++ b/.github/workflows/avx512-sde.yml
@@ -65,7 +65,7 @@ jobs:
linux:
needs: [validate-dispatch-inputs]
- if: |
+ if: &inputs_valid |
!cancelled() &&
(needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
runs-on: ubuntu-latest
@@ -115,9 +115,7 @@ jobs:
windows:
needs: [validate-dispatch-inputs]
- if: |
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *inputs_valid
runs-on: windows-2022
env:
VCVARS: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat
diff --git a/.github/workflows/compiler-zoo.yml b/.github/workflows/compiler-zoo.yml
index 6c759a0142..15d307ae97 100644
--- a/.github/workflows/compiler-zoo.yml
+++ b/.github/workflows/compiler-zoo.yml
@@ -51,7 +51,7 @@ jobs:
gcc:
needs: [validate-dispatch-inputs]
- if: |
+ if: &no_fork_schedule |
(github.event_name != 'schedule' || github.repository == 'openssl/openssl') &&
!cancelled() &&
(needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
@@ -87,10 +87,7 @@ jobs:
vs2013:
needs: [validate-dispatch-inputs]
- if: |
- (github.event_name != 'schedule' || github.repository == 'openssl/openssl') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *no_fork_schedule
strategy:
fail-fast: false
matrix:
@@ -148,10 +145,7 @@ jobs:
clang:
needs: [validate-dispatch-inputs]
- if: |
- (github.event_name != 'schedule' || github.repository == 'openssl/openssl') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *no_fork_schedule
strategy:
fail-fast: false
matrix:
diff --git a/.github/workflows/run-checker-daily.yml b/.github/workflows/run-checker-daily.yml
index 52ab8cd3c4..3a1cf9b4b9 100644
--- a/.github/workflows/run-checker-daily.yml
+++ b/.github/workflows/run-checker-daily.yml
@@ -51,7 +51,7 @@ jobs:
run-checker:
needs: [validate-dispatch-inputs]
- if: |
+ if: &upstream_or_dispatch |
(github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
!cancelled() &&
(needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
@@ -196,10 +196,7 @@ jobs:
run-checker-sctp:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@@ -243,10 +240,7 @@ jobs:
enable_brotli_dynamic:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
runs-on: ubuntu-latest
steps:
- name: install brotli
@@ -273,10 +267,7 @@ jobs:
enable_zstd_dynamic:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
runs-on: ubuntu-latest
steps:
- name: install zstd
@@ -303,10 +294,7 @@ jobs:
enable_brotli_and_zstd_dynamic:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
runs-on: ubuntu-latest
steps:
- name: install brotli and zstd
@@ -334,10 +322,7 @@ jobs:
malloc_failure_testing:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
runs-on: ubuntu-latest
steps:
- name: checkout openssl
@@ -364,10 +349,7 @@ jobs:
enable_brotli_and_asan_ubsan:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
runs-on: ubuntu-latest
steps:
- name: install brotli
@@ -398,10 +380,7 @@ jobs:
enable_zstd_and_asan_ubsan:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
runs-on: ubuntu-latest
steps:
- name: install zstd
@@ -432,10 +411,7 @@ jobs:
enable_tfo:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
strategy:
matrix:
os: [ubuntu-latest, macos-15, macos-15-intel]
@@ -458,10 +434,7 @@ jobs:
enable_buildtest:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@@ -483,10 +456,7 @@ jobs:
memory_sanitizer_slh_dsa:
needs: [validate-dispatch-inputs]
- if: |
- (github.repository == 'openssl/openssl' || github.event_name == 'workflow_dispatch') &&
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *upstream_or_dispatch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
@@ -513,7 +483,7 @@ jobs:
bn_debug:
needs: [validate-dispatch-inputs]
- if: |
+ if: &inputs_valid |
!cancelled() &&
(needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
runs-on: ubuntu-latest
@@ -541,9 +511,7 @@ jobs:
fuzz_tests_mfail_deep:
needs: [validate-dispatch-inputs]
- if: |
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *inputs_valid
runs-on: ubuntu-latest
timeout-minutes: 300
steps:
diff --git a/.github/workflows/run-checker-merge.yml b/.github/workflows/run-checker-merge.yml
index 6aa95cc83e..e4ceff97de 100644
--- a/.github/workflows/run-checker-merge.yml
+++ b/.github/workflows/run-checker-merge.yml
@@ -51,7 +51,7 @@ jobs:
run-checker:
needs: [validate-dispatch-inputs]
- if: |
+ if: &inputs_valid |
!cancelled() &&
(needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
strategy:
@@ -101,9 +101,7 @@ jobs:
jitter:
needs: [validate-dispatch-inputs]
- if: |
- !cancelled() &&
- (needs.validate-dispatch-inputs.result == 'success' || needs.validate-dispatch-inputs.result == 'skipped')
+ if: *inputs_valid
runs-on: ubuntu-latest
steps:
- name: checkout openssl