mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-06 19:06:58 +00:00
ci: reduce repeated Windows and fuzz tests on pull requests (#10043)
* ci: reduce repeated Windows and fuzz tests on pull requests Signed-off-by: WenyXu <wenymedia@gmail.com> * ci: use the nightly merge label as the enqueue opt-in Signed-off-by: WenyXu <wenymedia@gmail.com> * ci: log nightly merge decisions for dry-run verification Signed-off-by: WenyXu <wenymedia@gmail.com> * ci: gate expensive jobs on GitHub script tests Signed-off-by: WenyXu <wenymedia@gmail.com> * ci: grant pull request write permission for nightly label sync Signed-off-by: WenyXu <wenymedia@gmail.com> * ci: run platform checks on schedule or manual dispatch Signed-off-by: WenyXu <wenymedia@gmail.com> * test(ci): update PR gate count for scheduled platform checks Signed-off-by: WenyXu <wenymedia@gmail.com> --------- Signed-off-by: WenyXu <wenymedia@gmail.com>
This commit is contained in:
@@ -71,43 +71,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
- name: Run Node GitHub script tests
|
||||
run: node --test .github/scripts/query-regression-comment.test.cjs .github/scripts/tests/nightly-merge.test.cjs
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
version: "latest"
|
||||
- name: Run check-version script tests
|
||||
run: uv run --no-project python .github/scripts/check-version-test.py
|
||||
- name: Run release Linux architecture tests
|
||||
run: python3 .github/scripts/release-linux-architectures-test.py
|
||||
- name: Run previous-release-tag script tests
|
||||
run: python3 .github/scripts/previous-release-tag-test.py
|
||||
- name: Run enterprise license check tests
|
||||
run: python3 scripts/check-enterprise-license-test.py
|
||||
- name: Run fuzz orchestration script tests
|
||||
run: .github/scripts/run-fuzz-targets-test.sh
|
||||
- name: Run CI comment-command tests
|
||||
run: python3 .github/scripts/tests/test_ci_slash.py
|
||||
- name: Run CI scope gate tests
|
||||
run: python3 .github/ci/tests/test_ci_scope.py
|
||||
- name: Run metric snapshot benchmark tests
|
||||
run: python3 -m unittest discover -s .github/scripts/tests -p 'test_metric_snapshot*.py'
|
||||
- name: Run query-regression Python tooling tests
|
||||
run: |
|
||||
python3 tests/perf/test_query_regression_runner_compaction_toctou.py
|
||||
python3 tests/perf/test_query_regression_runner_otlp_trace_load.py
|
||||
python3 tests/perf/test_query_regression_summary_otlp.py
|
||||
python3 tests/perf/test_query_regression_case_selection.py
|
||||
python3 tests/perf/test_query_regression_nightly_refs.py
|
||||
python3 tests/perf/test_query_regression_slash.py
|
||||
python3 tests/perf/test_aliyun_ecs_runner_scripts.py
|
||||
python3 tests/perf/test_ci_runner_scripts.py
|
||||
python3 tests/perf/test_agent_observability_summary.py
|
||||
python3 tests/perf/test_tracesbench_summary.py
|
||||
- uses: ./.github/actions/github-script-tests
|
||||
|
||||
scope-rules:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
@@ -127,7 +91,8 @@ jobs:
|
||||
run: python3 .github/ci/ci_scope_rules.py --check-paths
|
||||
|
||||
check:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
needs: [github-script-tests]
|
||||
name: Check
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
||||
@@ -21,7 +21,7 @@ on:
|
||||
default: false
|
||||
type: boolean
|
||||
fuzz_profile:
|
||||
description: Fuzz profile selected by /ci fuzz
|
||||
description: Fuzz profile for a manual run or /ci fuzz
|
||||
required: false
|
||||
default: none
|
||||
type: choice
|
||||
@@ -42,6 +42,17 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
github-script-tests:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
name: GitHub Script Tests (Integration CI)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: ./.github/actions/github-script-tests
|
||||
|
||||
# Which jobs this gate skips, and why: .github/ci/README.md.
|
||||
scope:
|
||||
name: CI Scope
|
||||
@@ -94,7 +105,8 @@ jobs:
|
||||
python3 .github/ci/ci_scope.py "${args[@]}"
|
||||
|
||||
build:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
needs: [github-script-tests]
|
||||
name: Build GreptimeDB binaries
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
@@ -155,9 +167,9 @@ jobs:
|
||||
version: current
|
||||
|
||||
sqlness:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
name: Sqlness Test (${{ matrix.mode.name }})
|
||||
needs: build
|
||||
needs: [github-script-tests, build]
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -213,9 +225,9 @@ jobs:
|
||||
# required checks, so they are the only ones this gate may skip. They run
|
||||
# the same cases as the `Basic` leg, so the diff only matters when it can
|
||||
# reach the backend itself; the merge queue runs them regardless.
|
||||
if: ${{ !cancelled() && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) && needs.build.result == 'success' && needs.scope.outputs.sqlness_kvbackend != 'false' }}
|
||||
if: ${{ !cancelled() && needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) && needs.build.result == 'success' && needs.scope.outputs.sqlness_kvbackend != 'false' }}
|
||||
name: Sqlness Test (${{ matrix.mode.name }})
|
||||
needs: [scope, build]
|
||||
needs: [github-script-tests, scope, build]
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -267,9 +279,9 @@ jobs:
|
||||
retention-days: 3
|
||||
|
||||
export-import-v2-e2e:
|
||||
if: ${{ !cancelled() && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) && needs.build.result == 'success' && needs.scope.outputs.export_import_v2 != 'false' }}
|
||||
if: ${{ !cancelled() && needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) && needs.build.result == 'success' && needs.scope.outputs.export_import_v2 != 'false' }}
|
||||
name: Export/Import V2 E2E Test
|
||||
needs: [scope, build]
|
||||
needs: [github-script-tests, scope, build]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
@@ -337,9 +349,9 @@ jobs:
|
||||
retention-days: 3
|
||||
|
||||
run-multi-lang-tests:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
name: Run Multi-language SDK Tests
|
||||
needs: build
|
||||
needs: [github-script-tests, build]
|
||||
uses: ./.github/workflows/run-multi-lang-tests.yml
|
||||
with:
|
||||
artifact-name: bins
|
||||
@@ -362,9 +374,9 @@ jobs:
|
||||
run: python3 .github/scripts/update-compat-versions.py --check --published-only --check-anchors
|
||||
|
||||
compat:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || (github.event_name == 'pull_request' && (github.event.action == 'ready_for_review' || (github.event.action == 'opened' && github.event.pull_request.draft == false)))) }}
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || (github.event_name == 'pull_request' && (github.event.action == 'ready_for_review' || (github.event.action == 'opened' && github.event.pull_request.draft == false)))) }}
|
||||
name: Compatibility Test (recent releases)
|
||||
needs: build
|
||||
needs: [github-script-tests, build]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
@@ -401,10 +413,12 @@ jobs:
|
||||
path: /tmp/sqlness-compat*
|
||||
retention-days: 3
|
||||
|
||||
# Fuzz runs on opening a ready PR, marking it ready, manual dispatch, and
|
||||
# the scheduled main run. Synchronize events keep the core integration tests.
|
||||
prepare-fuzz-targets:
|
||||
if: ${{ !cancelled() && github.repository == 'GreptimeTeam/greptimedb' && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch' && inputs.ci_command) || github.event_name == 'merge_group') && (github.event_name == 'pull_request' || github.event_name == 'merge_group' || inputs.fuzz_profile != 'none') && needs.scope.outputs.any_fuzz != 'false' }}
|
||||
if: ${{ !cancelled() && needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && (github.event.action == 'opened' || github.event.action == 'ready_for_review')) || (github.event_name == 'workflow_dispatch' && (inputs.fuzz_profile != 'none'))) && needs.scope.outputs.any_fuzz != 'false' }}
|
||||
name: Prepare Fuzz Targets
|
||||
needs: [scope]
|
||||
needs: [github-script-tests, scope]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
@@ -517,9 +531,9 @@ jobs:
|
||||
if-no-files-found: error
|
||||
|
||||
fuzztest:
|
||||
if: ${{ !cancelled() && github.repository == 'GreptimeTeam/greptimedb' && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch' && inputs.ci_command) || github.event_name == 'merge_group') && (github.event_name == 'pull_request' || github.event_name == 'merge_group' || inputs.fuzz_profile == 'standalone' || inputs.fuzz_profile == 'all') && needs.build.result == 'success' && needs['prepare-fuzz-targets'].result == 'success' && needs.scope.outputs.fuzz_standalone != 'false' }}
|
||||
if: ${{ !cancelled() && needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && (github.event.action == 'opened' || github.event.action == 'ready_for_review')) || (github.event_name == 'workflow_dispatch' && (inputs.fuzz_profile == 'standalone' || inputs.fuzz_profile == 'all'))) && needs.build.result == 'success' && needs['prepare-fuzz-targets'].result == 'success' && needs.scope.outputs.fuzz_standalone != 'false' }}
|
||||
name: Fuzz Test (Standalone, ${{ matrix.group.name }})
|
||||
needs: [build, prepare-fuzz-targets, scope]
|
||||
needs: [github-script-tests, build, prepare-fuzz-targets, scope]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
@@ -598,9 +612,9 @@ jobs:
|
||||
artifact-name: fuzz-standalone-${{ matrix.group.id }}
|
||||
|
||||
unstable-fuzztest:
|
||||
if: ${{ !cancelled() && github.repository == 'GreptimeTeam/greptimedb' && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch' && inputs.ci_command) || github.event_name == 'merge_group') && (github.event_name == 'pull_request' || github.event_name == 'merge_group' || inputs.fuzz_profile == 'standalone' || inputs.fuzz_profile == 'all') && needs['build-greptime-ci'].result == 'success' && needs['prepare-fuzz-targets'].result == 'success' && needs.scope.outputs.fuzz_unstable != 'false' }}
|
||||
if: ${{ !cancelled() && needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && (github.event.action == 'opened' || github.event.action == 'ready_for_review')) || (github.event_name == 'workflow_dispatch' && (inputs.fuzz_profile == 'standalone' || inputs.fuzz_profile == 'all'))) && needs['build-greptime-ci'].result == 'success' && needs['prepare-fuzz-targets'].result == 'success' && needs.scope.outputs.fuzz_unstable != 'false' }}
|
||||
name: Unstable Fuzz Test
|
||||
needs: [build-greptime-ci, prepare-fuzz-targets, scope]
|
||||
needs: [github-script-tests, build-greptime-ci, prepare-fuzz-targets, scope]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
@@ -658,9 +672,9 @@ jobs:
|
||||
artifact-name: fuzz-unstable-standalone
|
||||
|
||||
build-greptime-ci:
|
||||
if: ${{ !cancelled() && github.repository == 'GreptimeTeam/greptimedb' && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch' && inputs.ci_command && inputs.fuzz_profile != 'none') || github.event_name == 'merge_group') && needs.scope.outputs.build_ci_needed != 'false' }}
|
||||
if: ${{ !cancelled() && needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && (github.event.action == 'opened' || github.event.action == 'ready_for_review')) || (github.event_name == 'workflow_dispatch' && (inputs.fuzz_profile != 'none'))) && needs.scope.outputs.build_ci_needed != 'false' }}
|
||||
name: Build GreptimeDB binary (profile-CI)
|
||||
needs: [scope]
|
||||
needs: [github-script-tests, scope]
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -719,10 +733,10 @@ jobs:
|
||||
version: current
|
||||
|
||||
distributed-fuzztest:
|
||||
if: ${{ !cancelled() && github.repository == 'GreptimeTeam/greptimedb' && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch' && inputs.ci_command) || github.event_name == 'merge_group') && (github.event_name == 'pull_request' || github.event_name == 'merge_group' || inputs.fuzz_profile == 'distributed' || inputs.fuzz_profile == 'all') && needs['build-greptime-ci'].result == 'success' && needs['prepare-fuzz-targets'].result == 'success' && needs.scope.outputs.fuzz_distributed != 'false' }}
|
||||
if: ${{ !cancelled() && needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && (github.event.action == 'opened' || github.event.action == 'ready_for_review')) || (github.event_name == 'workflow_dispatch' && (inputs.fuzz_profile == 'distributed' || inputs.fuzz_profile == 'all'))) && needs['build-greptime-ci'].result == 'success' && needs['prepare-fuzz-targets'].result == 'success' && needs.scope.outputs.fuzz_distributed != 'false' }}
|
||||
name: Fuzz Test (Distributed, ${{ matrix.mode.name }}, ${{ matrix.group.name }})
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-greptime-ci, prepare-fuzz-targets, scope]
|
||||
needs: [github-script-tests, build-greptime-ci, prepare-fuzz-targets, scope]
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -958,10 +972,10 @@ jobs:
|
||||
docker system prune -f
|
||||
|
||||
distributed-fuzztest-with-chaos:
|
||||
if: ${{ !cancelled() && github.repository == 'GreptimeTeam/greptimedb' && ((github.event_name == 'pull_request' && github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch' && inputs.ci_command) || github.event_name == 'merge_group') && (github.event_name == 'pull_request' || github.event_name == 'merge_group' || inputs.fuzz_profile == 'chaos' || inputs.fuzz_profile == 'all') && needs['build-greptime-ci'].result == 'success' && needs['prepare-fuzz-targets'].result == 'success' && needs.scope.outputs.fuzz_chaos != 'false' }}
|
||||
if: ${{ !cancelled() && needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false && (github.event.action == 'opened' || github.event.action == 'ready_for_review')) || (github.event_name == 'workflow_dispatch' && (inputs.fuzz_profile == 'chaos' || inputs.fuzz_profile == 'all'))) && needs['build-greptime-ci'].result == 'success' && needs['prepare-fuzz-targets'].result == 'success' && needs.scope.outputs.fuzz_chaos != 'false' }}
|
||||
name: Fuzz Test with Chaos (Distributed, ${{ matrix.mode.name }}, ${{ matrix.group.name }})
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-greptime-ci, prepare-fuzz-targets, scope]
|
||||
needs: [github-script-tests, build-greptime-ci, prepare-fuzz-targets, scope]
|
||||
timeout-minutes: 60
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
@@ -23,7 +23,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
permissions:
|
||||
pull-requests: read
|
||||
# PR label mutations require pull-request write permission.
|
||||
pull-requests: write
|
||||
issues: write
|
||||
concurrency:
|
||||
group: nightly-merge-label-${{ github.event.pull_request.number }}
|
||||
@@ -36,7 +37,10 @@ jobs:
|
||||
const { owner, repo } = context.repo;
|
||||
const issue_number = context.payload.pull_request.number;
|
||||
const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number: issue_number });
|
||||
const selected = /^- \[[xX]\] Merge during the nightly window <!-- nightly-merge -->\s*$/m.test(pr.body || '');
|
||||
const checkbox = /^- \[([ xX])\] Merge during the nightly window <!-- nightly-merge -->\s*$/m.exec(pr.body || '');
|
||||
// PRs without the template manage their opt-in through the label.
|
||||
if (!checkbox) return;
|
||||
const selected = checkbox[1].toLowerCase() === 'x';
|
||||
const label = 'merge nightly';
|
||||
const labeled = pr.labels.some(item => item.name === label);
|
||||
if (selected && !labeled) {
|
||||
@@ -73,11 +77,10 @@ jobs:
|
||||
if (!candidate.pull_request || enqueued >= 5) continue;
|
||||
const number = candidate.number;
|
||||
try {
|
||||
// Fetch current body/labels, not the earlier list snapshot.
|
||||
// Fetch current labels and PR state, not the earlier list snapshot.
|
||||
const { data: current } = await github.rest.pulls.get({ owner, repo, pull_number: number });
|
||||
if (current.state !== 'open' || current.draft || current.base.ref !== 'main' ||
|
||||
!current.labels.some(label => label.name === 'merge nightly') ||
|
||||
!/^- \[[xX]\] Merge during the nightly window <!-- nightly-merge -->\s*$/m.test(current.body || '')) {
|
||||
!current.labels.some(label => label.name === 'merge nightly')) {
|
||||
rows.push([String(number), 'Skipped: not opted in, draft, closed, or not targeting main']);
|
||||
continue;
|
||||
}
|
||||
@@ -134,5 +137,6 @@ jobs:
|
||||
core.setFailed('Some PRs could not be processed; see workflow logs.');
|
||||
}
|
||||
}
|
||||
for (const [number, result] of rows) core.info(`PR #${number}: ${result}`);
|
||||
await core.summary.addHeading(dryRun ? 'Nightly merge (dry run)' : 'Nightly merge')
|
||||
.addTable([['PR', 'Result'], ...rows]).write();
|
||||
|
||||
+23
-48
@@ -31,6 +31,17 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
github-script-tests:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
name: GitHub Script Tests (Rust CI)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: ./.github/actions/github-script-tests
|
||||
|
||||
fmt:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
name: Rustfmt
|
||||
@@ -50,7 +61,8 @@ jobs:
|
||||
run: make fmt-check
|
||||
|
||||
clippy:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
needs: [github-script-tests]
|
||||
name: Clippy
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 60
|
||||
@@ -94,7 +106,9 @@ jobs:
|
||||
run: make check-udeps
|
||||
|
||||
check-riscv64:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
# Keep platform coverage on the weekday schedule and allow manual checks.
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
|
||||
needs: [github-script-tests]
|
||||
name: Check riscv64 build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
@@ -120,7 +134,9 @@ jobs:
|
||||
run: cargo check --locked --workspace --all-targets --features servers/dashboard --target riscv64gc-unknown-linux-gnu
|
||||
|
||||
check-windows:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
# Keep platform coverage on the weekday schedule and allow manual checks.
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }}
|
||||
needs: [github-script-tests]
|
||||
name: Check Windows build
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 60
|
||||
@@ -148,48 +164,6 @@ jobs:
|
||||
env:
|
||||
RUSTFLAGS: "-D warnings"
|
||||
|
||||
test-windows:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }}
|
||||
name: Test Windows
|
||||
runs-on: windows-2022
|
||||
timeout-minutes: 90
|
||||
env:
|
||||
CARGO_INCREMENTAL: 0
|
||||
CARGO_PROFILE_DEV_DEBUG: 0
|
||||
CARGO_PROFILE_TEST_DEBUG: 0
|
||||
RUSTFLAGS: "-D warnings -C linker=lld-link"
|
||||
RUST_BACKTRACE: 1
|
||||
RUST_MIN_STACK: 8388608 # 8MB
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: ./.github/actions/setup-cyborg
|
||||
- uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: protoc@3.23.4
|
||||
- uses: KyleMayes/install-llvm-action@v1
|
||||
with:
|
||||
version: "14.0"
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
cache: false
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
shared-key: "test-windows"
|
||||
cache-all-crates: "true"
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: Install Cargo Nextest
|
||||
uses: taiki-e/install-action@nextest
|
||||
- name: Install WSL distribution
|
||||
uses: Vampire/setup-wsl@v2
|
||||
with:
|
||||
distribution: Ubuntu-22.04
|
||||
- name: Run Windows tests
|
||||
run: cargo nextest run --locked --workspace -F dashboard --no-fail-fast
|
||||
|
||||
conflict-check:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
name: Check for conflict
|
||||
@@ -202,10 +176,10 @@ jobs:
|
||||
uses: olivernybroe/action-conflict-finder@v4.0
|
||||
|
||||
test:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && github.event_name != 'merge_group' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && github.event_name != 'merge_group' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false || github.run_attempt > 1) }}
|
||||
runs-on: ubuntu-22.04-arm
|
||||
timeout-minutes: 60
|
||||
needs: [conflict-check, clippy, fmt, check-udeps]
|
||||
needs: [github-script-tests, conflict-check, clippy, fmt, check-udeps]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -258,7 +232,8 @@ jobs:
|
||||
UNITTEST_LOG_DIR: "__unittest_logs"
|
||||
|
||||
coverage:
|
||||
if: ${{ github.repository == 'GreptimeTeam/greptimedb' && github.event_name == 'merge_group' }}
|
||||
if: ${{ needs['github-script-tests'].result == 'success' && github.repository == 'GreptimeTeam/greptimedb' && github.event_name == 'merge_group' }}
|
||||
needs: [github-script-tests]
|
||||
runs-on: ubuntu-22.04-8-cores
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
|
||||
Reference in New Issue
Block a user