ci: cut default PR runtime to build/security core checks (#669)
This commit is contained in:
parent
42f1d40f1f
commit
e9f619a83f
4 changed files with 20 additions and 37 deletions
2
.github/workflows/benchmarks.yml
vendored
2
.github/workflows/benchmarks.yml
vendored
|
|
@ -3,8 +3,6 @@ name: Performance Benchmarks
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
|
|
||||||
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
|
|
@ -43,7 +43,7 @@ jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint Gate (Format + Clippy)
|
name: Lint Gate (Format + Clippy)
|
||||||
needs: [changes]
|
needs: [changes]
|
||||||
if: needs.changes.outputs.rust_changed == 'true'
|
if: needs.changes.outputs.rust_changed == 'true' && (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:full'))
|
||||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -61,7 +61,7 @@ jobs:
|
||||||
lint-strict-delta:
|
lint-strict-delta:
|
||||||
name: Lint Gate (Strict Delta)
|
name: Lint Gate (Strict Delta)
|
||||||
needs: [changes]
|
needs: [changes]
|
||||||
if: needs.changes.outputs.rust_changed == 'true'
|
if: needs.changes.outputs.rust_changed == 'true' && (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:full'))
|
||||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||||
timeout-minutes: 25
|
timeout-minutes: 25
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -81,7 +81,7 @@ jobs:
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
needs: [changes, lint, lint-strict-delta]
|
needs: [changes, lint, lint-strict-delta]
|
||||||
if: needs.changes.outputs.rust_changed == 'true' && needs.lint.result == 'success' && needs.lint-strict-delta.result == 'success'
|
if: needs.changes.outputs.rust_changed == 'true' && (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:full')) && needs.lint.result == 'success' && needs.lint-strict-delta.result == 'success'
|
||||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -95,8 +95,8 @@ jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build (Smoke)
|
name: Build (Smoke)
|
||||||
needs: [changes, lint, lint-strict-delta]
|
needs: [changes]
|
||||||
if: needs.changes.outputs.rust_changed == 'true' && needs.lint.result == 'success' && needs.lint-strict-delta.result == 'success'
|
if: needs.changes.outputs.rust_changed == 'true'
|
||||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
|
|
||||||
|
|
@ -130,7 +130,7 @@ jobs:
|
||||||
docs-quality:
|
docs-quality:
|
||||||
name: Docs Quality
|
name: Docs Quality
|
||||||
needs: [changes]
|
needs: [changes]
|
||||||
if: needs.changes.outputs.docs_changed == 'true'
|
if: needs.changes.outputs.docs_changed == 'true' && (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:full'))
|
||||||
runs-on: blacksmith-2vcpu-ubuntu-2404
|
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -313,39 +313,28 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
docs_changed="${{ needs.changes.outputs.docs_changed }}"
|
event_name="${{ github.event_name }}"
|
||||||
rust_changed="${{ needs.changes.outputs.rust_changed }}"
|
rust_changed="${{ needs.changes.outputs.rust_changed }}"
|
||||||
workflow_changed="${{ needs.changes.outputs.workflow_changed }}"
|
workflow_changed="${{ needs.changes.outputs.workflow_changed }}"
|
||||||
docs_result="${{ needs.docs-quality.result }}"
|
|
||||||
workflow_owner_result="${{ needs.workflow-owner-approval.result }}"
|
workflow_owner_result="${{ needs.workflow-owner-approval.result }}"
|
||||||
|
|
||||||
if [ "${{ needs.changes.outputs.docs_only }}" = "true" ]; then
|
if [ "${{ needs.changes.outputs.docs_only }}" = "true" ]; then
|
||||||
echo "docs=${docs_result}"
|
|
||||||
echo "workflow_owner_approval=${workflow_owner_result}"
|
echo "workflow_owner_approval=${workflow_owner_result}"
|
||||||
if [ "$workflow_changed" = "true" ] && [ "$workflow_owner_result" != "success" ]; then
|
if [ "$workflow_changed" = "true" ] && [ "$workflow_owner_result" != "success" ]; then
|
||||||
echo "Workflow files changed but workflow owner approval gate did not pass."
|
echo "Workflow files changed but workflow owner approval gate did not pass."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "$docs_changed" = "true" ] && [ "$docs_result" != "success" ]; then
|
|
||||||
echo "Docs-only change touched markdown docs, but docs-quality did not pass."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Docs-only fast path passed."
|
echo "Docs-only fast path passed."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$rust_changed" != "true" ]; then
|
if [ "$rust_changed" != "true" ]; then
|
||||||
echo "rust_changed=false (non-rust fast path)"
|
echo "rust_changed=false (non-rust fast path)"
|
||||||
echo "docs=${docs_result}"
|
|
||||||
echo "workflow_owner_approval=${workflow_owner_result}"
|
echo "workflow_owner_approval=${workflow_owner_result}"
|
||||||
if [ "$workflow_changed" = "true" ] && [ "$workflow_owner_result" != "success" ]; then
|
if [ "$workflow_changed" = "true" ] && [ "$workflow_owner_result" != "success" ]; then
|
||||||
echo "Workflow files changed but workflow owner approval gate did not pass."
|
echo "Workflow files changed but workflow owner approval gate did not pass."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "$docs_changed" = "true" ] && [ "$docs_result" != "success" ]; then
|
|
||||||
echo "Docs changed but docs-quality did not pass."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Non-rust fast path passed."
|
echo "Non-rust fast path passed."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
@ -359,22 +348,25 @@ jobs:
|
||||||
echo "lint_strict_delta=${lint_strict_delta_result}"
|
echo "lint_strict_delta=${lint_strict_delta_result}"
|
||||||
echo "test=${test_result}"
|
echo "test=${test_result}"
|
||||||
echo "build=${build_result}"
|
echo "build=${build_result}"
|
||||||
echo "docs=${docs_result}"
|
|
||||||
echo "workflow_owner_approval=${workflow_owner_result}"
|
echo "workflow_owner_approval=${workflow_owner_result}"
|
||||||
|
|
||||||
if [ "$lint_result" != "success" ] || [ "$lint_strict_delta_result" != "success" ] || [ "$test_result" != "success" ] || [ "$build_result" != "success" ]; then
|
|
||||||
echo "Required CI jobs did not pass."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$workflow_changed" = "true" ] && [ "$workflow_owner_result" != "success" ]; then
|
if [ "$workflow_changed" = "true" ] && [ "$workflow_owner_result" != "success" ]; then
|
||||||
echo "Workflow files changed but workflow owner approval gate did not pass."
|
echo "Workflow files changed but workflow owner approval gate did not pass."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$docs_changed" = "true" ] && [ "$docs_result" != "success" ]; then
|
if [ "$event_name" = "pull_request" ]; then
|
||||||
echo "Docs changed but docs-quality did not pass."
|
if [ "$build_result" != "success" ]; then
|
||||||
|
echo "Required PR build job did not pass."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "PR required checks passed."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$lint_result" != "success" ] || [ "$lint_strict_delta_result" != "success" ] || [ "$test_result" != "success" ] || [ "$build_result" != "success" ]; then
|
||||||
|
echo "Required push CI jobs did not pass."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "All required CI jobs passed."
|
echo "Push required checks passed."
|
||||||
|
|
|
||||||
2
.github/workflows/e2e.yml
vendored
2
.github/workflows/e2e.yml
vendored
|
|
@ -3,8 +3,6 @@ name: Integration / E2E Tests
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
|
|
||||||
7
.github/workflows/feature-matrix.yml
vendored
7
.github/workflows/feature-matrix.yml
vendored
|
|
@ -7,14 +7,9 @@ on:
|
||||||
- "Cargo.toml"
|
- "Cargo.toml"
|
||||||
- "Cargo.lock"
|
- "Cargo.lock"
|
||||||
- "src/**"
|
- "src/**"
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
paths:
|
|
||||||
- "Cargo.toml"
|
|
||||||
- "Cargo.lock"
|
|
||||||
- "src/**"
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "30 4 * * 1" # Weekly Monday 4:30am UTC
|
- cron: "30 4 * * 1" # Weekly Monday 4:30am UTC
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: feature-matrix-${{ github.event.pull_request.number || github.sha }}
|
group: feature-matrix-${{ github.event.pull_request.number || github.sha }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue