Actions: Run --level pr on merge_group (for now) (#11186)
Other branches aren't set up for this (yet?) so go back to the old behaviour for now.
This commit is contained in:
@@ -3,31 +3,31 @@ concurrency:
|
|||||||
group: ci-${{ github.head_ref || github.run_id }}
|
group: ci-${{ github.head_ref || github.run_id }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
on:
|
on:
|
||||||
# Full CI now runs in the merge queue instead of on post-merge push. PRs build a
|
# The merge queue is the pre-merge gate for the protected branches (master,
|
||||||
# narrowed board subset (--level pr) for fast feedback; the merge queue rebuilds
|
# develop): a merge_group run validates the merged result before code lands. For
|
||||||
# the full release matrix against the merged result before it lands. Because the
|
# now PRs and merge_group runs build the same narrowed board subset (--level pr);
|
||||||
# merge_group run is the gate, there is nothing left to rebuild after the merge
|
# see the setup job. push still runs the full matrix on master/develop (post-merge)
|
||||||
# commit reaches the protected branch - so the old `push` trigger is dropped.
|
# as well as on the event/* and feature/* branches, which have no merge queue.
|
||||||
#
|
|
||||||
# merge_group events have an empty github.head_ref, so the existing setup job
|
|
||||||
# (which keys off GITHUB_HEAD_REF) produces the full matrix automatically.
|
|
||||||
# Note: merge_group does not support paths/paths-ignore filters - it always runs
|
|
||||||
# the full required checks, which is what a merge queue needs (branch protection
|
|
||||||
# cannot skip a required check).
|
|
||||||
merge_group:
|
merge_group:
|
||||||
types: [checks_requested]
|
types: [checks_requested]
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
- pioarduino # Remove when merged // use `feature/` in the future.
|
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
- event/*
|
- event/*
|
||||||
- feature/*
|
- feature/*
|
||||||
|
paths-ignore:
|
||||||
|
- "**.md"
|
||||||
|
- version.properties
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
- pioarduino # Remove when merged // use `feature/` in the future.
|
|
||||||
- event/*
|
- event/*
|
||||||
- feature/*
|
- feature/*
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
@@ -36,9 +36,9 @@ on:
|
|||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
# Nightly develop build, published to meshtastic.github.io firmware-nightly/ (no GitHub release).
|
# Nightly develop build, published to meshtastic.github.io firmware-nightly/ (no GitHub release).
|
||||||
# Scheduled runs execute on the default branch (develop). 09:00 UTC avoids the 00:00 tests
|
# Scheduled runs execute on the default branch (develop). 07:00 UTC avoids the 00:00 tests
|
||||||
# and 02:00 daily_packaging crons.
|
# and 02:00 daily_packaging crons.
|
||||||
- cron: 0 9 * * * # Nightly develop build/publish (default branch is develop)
|
- cron: 0 7 * * * # Nightly develop build/publish (default branch is develop)
|
||||||
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -69,10 +69,12 @@ jobs:
|
|||||||
- name: Generate matrix
|
- name: Generate matrix
|
||||||
id: jsonStep
|
id: jsonStep
|
||||||
run: |
|
run: |
|
||||||
if [[ "$GITHUB_HEAD_REF" == "" ]]; then
|
# PRs and (for now) merge_group builds use the narrowed --level pr board
|
||||||
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}})
|
# subset. Full-matrix builds run on push / schedule / workflow_dispatch.
|
||||||
else
|
if [[ "$GITHUB_EVENT_NAME" == "pull_request" || "$GITHUB_EVENT_NAME" == "merge_group" ]]; then
|
||||||
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} --level pr)
|
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} --level pr)
|
||||||
|
else
|
||||||
|
TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}})
|
||||||
fi
|
fi
|
||||||
echo "Name: $GITHUB_REF_NAME Base: $GITHUB_BASE_REF Ref: $GITHUB_REF"
|
echo "Name: $GITHUB_REF_NAME Base: $GITHUB_BASE_REF Ref: $GITHUB_REF"
|
||||||
echo "${{matrix.arch}}=$TARGETS" >> $GITHUB_OUTPUT
|
echo "${{matrix.arch}}=$TARGETS" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user