Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,21 @@ merge. Dispatch this workflow once to seed ghcr.

### Running a nightly job on a PR (label toggles)

`pr-osp-select.yml` lets you pull any nightly job into a PR on demand —
to fix or validate it before it has to wait for the next nightly. You
toggle jobs with **labels**, not code edits; `nightly-osp.yml` and the
per-app workflows stay untouched.
The `pr-osp-select-*.yml` workflows let you pull any nightly job into a
PR on demand — to fix or validate it before it has to wait for the next
nightly. You toggle jobs with **labels**, not code edits;
`nightly-osp.yml` and the per-app workflows stay untouched.

GitHub limits one workflow file to 50 referenced workflows, nested calls
included, so the jobs are split across three files by their section in
[What runs in the nightly fan-out](#what-runs-in-the-nightly-fan-out).
Every label triggers all three files.

| File | Sections |
|------|----------|
| `pr-osp-select-network.yml` | Networking, VPN, file transfer; Web, messaging, libraries; Wireless |
| `pr-osp-select-auth-crypto.yml` | Auth, identity, PKI, smart cards; TPM, disk crypto, hashing |
| `pr-osp-select-validation.yml` | Internal validations + sweeps, and every job outside those tables (`multi-compiler`, `musl`, `perf`, `libacvp-pqc`) |

| Label | Effect |
|-------|--------|
Expand All @@ -96,13 +107,15 @@ drop the labels — nothing to revert in the tree.
Off-PR equivalent (runs against a branch, no labels):

```bash
gh workflow run pr-osp-select.yml --ref <branch> -f jobs="hostap curl"
gh workflow run pr-osp-select.yml --ref <branch> -f jobs="all"
gh workflow run pr-osp-select-network.yml --ref <branch> -f jobs="hostap curl"
for f in network auth-crypto validation; do
gh workflow run pr-osp-select-$f.yml --ref <branch> -f jobs="all"
done
```

> Adding a brand-new OSP workflow? Append a matching label block to
> `pr-osp-select.yml` (same `needs: select` + `if:` pattern) so it's
> reachable via `ci:<name>`.
> the `pr-osp-select-*.yml` file for its README section (same
> `needs: select` + `if:` pattern) so it's reachable via `ci:<name>`.

### What runs in the nightly fan-out

Expand Down Expand Up @@ -341,7 +354,7 @@ FIPS CAST code is compiled out of non-FIPS builds, so only the FIPS row
exercises the DH-derive CAST that originally regressed.

It runs nightly on its own cron, and can be pulled into a PR on demand by
adding the `ci:perf` label (via `pr-osp-select.yml`, same as the OSP jobs).
adding the `ci:perf` label (via `pr-osp-select-validation.yml`, same as the OSP jobs).

Run it locally:

Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/pr-osp-retry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ name: PR OSP retry

on:
workflow_run:
workflows: ["PR OSP (label-selected)"]
workflows:
- "PR OSP (label-selected, network)"
- "PR OSP (label-selected, auth-crypto)"
- "PR OSP (label-selected, validation)"
types: [completed]

permissions:
Expand All @@ -28,10 +31,12 @@ jobs:
WF_PATH: ${{ github.event.workflow_run.path }}
run: |
# A fork controls both the workflow name and a new file's path, so pin the path.
if [ "$WF_PATH" != ".github/workflows/pr-osp-select.yml" ]; then
echo "::error::untrusted triggering workflow: $WF_PATH"
exit 1
fi
case "$WF_PATH" in
.github/workflows/pr-osp-select-network.yml) ;;
.github/workflows/pr-osp-select-auth-crypto.yml) ;;
.github/workflows/pr-osp-select-validation.yml) ;;
*) echo "::error::untrusted triggering workflow: $WF_PATH"; exit 1 ;;
esac
# Distinguish "not a collaborator" (404) from an API failure; never conflate them.
if ! body=$(gh api "/repos/$REPO/collaborators/$ACTOR/permission" 2>&1); then
case "$body" in
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/pr-osp-select-auth-crypto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: PR OSP (label-selected, auth-crypto)

# Run any nightly OSP / sweep job on a PR by adding a label. Add
# `ci:<name>` (e.g. ci:hostap) to run that job, or `ci:all` for the
# whole set. Add several at once and they run in ONE run per file:
# the burst of label events collapses (cancel-in-progress) to a single
# run whose select reads every current ci:* label. Re-add a label to
# re-run after a push. workflow_dispatch `jobs` input is the off-PR
# equivalent (space list, or "all").
#
# GitHub caps one workflow file at 50 referenced workflows, nested calls
# included, so the jobs are split across pr-osp-select-network.yml,
# pr-osp-select-auth-crypto.yml and pr-osp-select-validation.yml, by
# their section in .github/workflows/README.md. Every label triggers
# all three files.

on:
pull_request:
types: [labeled]
workflow_dispatch:
inputs:
jobs:
description: "space-separated job names, or 'all'"
required: false
default: ""

permissions:
contents: read
packages: write
actions: read

concurrency:
group: pr-osp-select-auth-crypto-${{ github.ref }}
cancel-in-progress: true

jobs:
select:
runs-on: ubuntu-latest
outputs:
run: ${{ steps.p.outputs.run }}
steps:
- id: p
env:
LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
DISPATCH: ${{ github.event.inputs.jobs }}
run: |
sel=""
for l in $LABELS; do
case "$l" in
ci:*) sel="$sel ${l#ci:}" ;;
esac
done
[ -n "$DISPATCH" ] && sel="$sel $DISPATCH"
echo "run= $sel " >> "$GITHUB_OUTPUT"

git-ssh-dr:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' git-ssh-dr ')
uses: ./.github/workflows/git-ssh-dr.yml
krb5:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' krb5 ')
uses: ./.github/workflows/krb5.yml
libcryptsetup:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libcryptsetup ')
uses: ./.github/workflows/libcryptsetup.yml
libfido2:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libfido2 ')
uses: ./.github/workflows/libfido2.yml
libhashkit2:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libhashkit2 ')
uses: ./.github/workflows/libhashkit2.yml
libtss2:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libtss2 ')
uses: ./.github/workflows/libtss2.yml
openldap:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' openldap ')
uses: ./.github/workflows/openldap.yml
opensc:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' opensc ')
uses: ./.github/workflows/opensc.yml
pam-pkcs11:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' pam-pkcs11 ')
uses: ./.github/workflows/pam-pkcs11.yml
sscep:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' sscep ')
uses: ./.github/workflows/sscep.yml
sssd:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' sssd ')
uses: ./.github/workflows/sssd.yml
tpm2-tools:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' tpm2-tools ')
uses: ./.github/workflows/tpm2-tools.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: PR OSP (label-selected)
name: PR OSP (label-selected, network)

# Run any nightly OSP / sweep job on a PR by adding a label. Add
# `ci:<name>` (e.g. ci:hostap) to run that job, or `ci:all` for the
# whole set. Add several at once and they all run in ONE workflow run:
# whole set. Add several at once and they run in ONE run per file:
# the burst of label events collapses (cancel-in-progress) to a single
# run whose select reads every current ci:* label. Re-add a label to
# re-run after a push. workflow_dispatch `jobs` input is the off-PR
# equivalent (space list, or "all").
#
# GitHub caps one workflow file at 50 referenced workflows, nested calls
# included, so the jobs are split across pr-osp-select-network.yml,
# pr-osp-select-auth-crypto.yml and pr-osp-select-validation.yml, by
# their section in .github/workflows/README.md. Every label triggers
# all three files.

on:
pull_request:
Expand All @@ -24,7 +30,7 @@ permissions:
actions: read

concurrency:
group: pr-osp-select-${{ github.ref }}
group: pr-osp-select-network-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -59,14 +65,6 @@ jobs:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' curl ')
uses: ./.github/workflows/curl.yml
debian-package:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' debian-package ')
uses: ./.github/workflows/debian-package.yml
git-ssh-dr:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' git-ssh-dr ')
uses: ./.github/workflows/git-ssh-dr.yml
grpc:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' grpc ')
Expand All @@ -79,30 +77,10 @@ jobs:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' iperf ')
uses: ./.github/workflows/iperf.yml
krb5:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' krb5 ')
uses: ./.github/workflows/krb5.yml
libacvp-pqc:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libacvp-pqc ')
uses: ./.github/workflows/libacvp-pqc.yml
libcryptsetup:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libcryptsetup ')
uses: ./.github/workflows/libcryptsetup.yml
libeac3:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libeac3 ')
uses: ./.github/workflows/libeac3.yml
libfido2:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libfido2 ')
uses: ./.github/workflows/libfido2.yml
libhashkit2:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libhashkit2 ')
uses: ./.github/workflows/libhashkit2.yml
libnice:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libnice ')
Expand All @@ -119,10 +97,6 @@ jobs:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libssh2 ')
uses: ./.github/workflows/libssh2.yml
libtss2:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libtss2 ')
uses: ./.github/workflows/libtss2.yml
libwebsockets:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' libwebsockets ')
Expand All @@ -143,30 +117,14 @@ jobs:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' nginx-pqc ')
uses: ./.github/workflows/nginx-pqc.yml
openldap:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' openldap ')
uses: ./.github/workflows/openldap.yml
opensc:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' opensc ')
uses: ./.github/workflows/opensc.yml
openssh:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' openssh ')
uses: ./.github/workflows/openssh.yml
openssl-version:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' openssl-version ')
uses: ./.github/workflows/openssl-version.yml
openvpn:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' openvpn ')
uses: ./.github/workflows/openvpn.yml
pam-pkcs11:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' pam-pkcs11 ')
uses: ./.github/workflows/pam-pkcs11.yml
ppp:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' ppp ')
Expand All @@ -187,18 +145,6 @@ jobs:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' socat ')
uses: ./.github/workflows/socat.yml
sscep:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' sscep ')
uses: ./.github/workflows/sscep.yml
sssd:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' sssd ')
uses: ./.github/workflows/sssd.yml
static-analysis:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' static-analysis ')
uses: ./.github/workflows/static-analysis.yml
stunnel:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' stunnel ')
Expand All @@ -215,10 +161,6 @@ jobs:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' tnftp ')
uses: ./.github/workflows/tnftp.yml
tpm2-tools:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' tpm2-tools ')
uses: ./.github/workflows/tpm2-tools.yml
x11vnc:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' x11vnc ')
Expand All @@ -227,19 +169,3 @@ jobs:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' xmlsec ')
uses: ./.github/workflows/xmlsec.yml
multi-compiler:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' multi-compiler ')
uses: ./.github/workflows/nightly-multi-compiler.yml
musl:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' musl ')
uses: ./.github/workflows/musl.yml
fips-ready:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' fips-ready ')
uses: ./.github/workflows/nightly-fips-ready.yml
perf:
needs: select
if: contains(needs.select.outputs.run, ' all ') || contains(needs.select.outputs.run, ' perf ')
uses: ./.github/workflows/perf-regression.yml
Loading
Loading