Skip to content
Draft
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
95 changes: 95 additions & 0 deletions .github/actions/wait-for-smoke/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: 'Wait for Smoke Test'
description: 'Polls the Smoke Test workflow for the current commit and fails if it failed.'

# Designed to be the leading job in pull_request-triggered workflows so that
# expensive integration CI does not run unless the smoke build passes.
#
# Push events bypass the wait entirely (we still get smoke results for those
# pushes, but other CI is not gated on push). For drafts, callers should
# skip dependent jobs via `if: github.event.pull_request.draft == false` -
# this action will still pass through if smoke is skipped or absent.

inputs:
workflow:
description: 'Name of the smoke workflow file to wait on'
required: false
default: 'smoke-test.yml'
timeout-seconds:
description: 'Maximum time to wait for smoke to complete'
required: false
default: '1800'
poll-seconds:
description: 'Polling interval'
required: false
default: '20'
github-token:
description: 'GITHUB_TOKEN with actions:read permission'
required: true

runs:
using: 'composite'
steps:
- name: Wait for smoke
shell: bash
env:
GH_TOKEN: ${{ inputs.github-token }}
SMOKE_WORKFLOW: ${{ inputs.workflow }}
TIMEOUT: ${{ inputs.timeout-seconds }}
POLL: ${{ inputs.poll-seconds }}
REPO: ${{ github.repository }}
run: |
set -u
# Only gate pull_request events. Push events are not gated.
if [ "${{ github.event_name }}" != "pull_request" ]; then
echo "Not a pull_request event - skipping smoke gate."
exit 0
fi

HEAD_SHA="${{ github.event.pull_request.head.sha }}"
echo "Waiting for $SMOKE_WORKFLOW on $HEAD_SHA (timeout ${TIMEOUT}s)"

START=$(date +%s)
while :; do
NOW=$(date +%s)
ELAPSED=$((NOW - START))
if [ "$ELAPSED" -ge "$TIMEOUT" ]; then
echo "::error::Timed out after ${TIMEOUT}s waiting for $SMOKE_WORKFLOW on $HEAD_SHA"
exit 1
fi

# Look up the latest run for this workflow + head SHA.
RUN_JSON=$(gh api \
"repos/${REPO}/actions/workflows/${SMOKE_WORKFLOW}/runs?head_sha=${HEAD_SHA}&per_page=1" \
2>/dev/null || echo '{}')

STATUS=$(echo "$RUN_JSON" | jq -r '.workflow_runs[0].status // "missing"')
CONCLUSION=$(echo "$RUN_JSON" | jq -r '.workflow_runs[0].conclusion // ""')
RUN_URL=$(echo "$RUN_JSON" | jq -r '.workflow_runs[0].html_url // ""')

case "$STATUS" in
completed)
case "$CONCLUSION" in
success)
echo "Smoke test passed: $RUN_URL"
exit 0
;;
skipped|neutral)
echo "Smoke test was $CONCLUSION - treating as pass: $RUN_URL"
exit 0
;;
*)
echo "::error::Smoke test concluded as '$CONCLUSION': $RUN_URL"
exit 1
;;
esac
;;
missing)
echo "[$ELAPSED s] No smoke run yet for $HEAD_SHA"
;;
*)
echo "[$ELAPSED s] Smoke status=$STATUS ($RUN_URL)"
;;
esac

sleep "$POLL"
done
3 changes: 3 additions & 0 deletions .github/workflows/bind9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -28,6 +30,7 @@ jobs:
replace_default: [ true ]

test_bind:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
needs: build_wolfprovider
container:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cjose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -28,6 +30,7 @@ jobs:
replace_default: [ true ]

test_cjose:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
needs: build_wolfprovider
# Run inside Debian Bookworm to match packaging environment
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cmdline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
cmdtest_test:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
name: Command line test
runs-on: ubuntu-22.04
timeout-minutes: 20
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
codespell:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
name: Check for spelling errors
runs-on: ubuntu-22.04
timeout-minutes: 5
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -28,6 +30,7 @@ jobs:
replace_default: [ true ]

test_curl:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
needs: build_wolfprovider
container:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/debian-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -28,6 +30,7 @@ jobs:
replace_default: [ true, false ]

libwolfprov-replace-default:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
name: libwolfprov ${{ matrix.replace_default && 'replace-default' || 'standalone' }} ${{ matrix.fips_ref }}
runs-on: ubuntu-22.04
needs: build_wolfprovider
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/fips-ready.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
fips_ready_test:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
name: FIPS Ready Bundle Test
runs-on: ubuntu-22.04
timeout-minutes: 20
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/git-ssh-dr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -26,6 +28,7 @@ jobs:
replace_default: [ true ]

git-ssh-default-replace-test:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
container:
image: debian:bookworm
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -28,6 +30,7 @@ jobs:
replace_default: [ true ]

test_grpc:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
needs: build_wolfprovider
container:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/hostap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**']
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -28,6 +30,7 @@ jobs:
replace_default: [ true ]

test_hostap:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
needs: build_wolfprovider
# Run inside Debian Bookworm with privileged access for UML
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/iperf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -28,6 +30,7 @@ jobs:
replace_default: [ true ]

test_iperf:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
needs: build_wolfprovider
container:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/krb5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -28,6 +30,7 @@ jobs:
replace_default: [ true ]

test_krb5:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
needs: build_wolfprovider
container:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/libcryptsetup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -14,6 +15,7 @@ concurrency:

jobs:
build_wolfprovider:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
uses: ./.github/workflows/build-wolfprovider.yml
with:
wolfssl_ref: ${{ matrix.wolfssl_ref }}
Expand All @@ -28,6 +30,7 @@ jobs:
replace_default: [ true ]

test_cryptsetup:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-22.04
needs: build_wolfprovider
container:
Expand Down
Loading
Loading