Skip to content

Commit a799c3e

Browse files
committed
CI: Skip half of RISC-V, Xtensa and Simulator targets when a Complex PR is created / updated
When we submit or update a Complex PR that affects All Architectures (Arm, RISC-V, Xtensa, etc): CI Workflow shall run only half the jobs for RISC-V, Xtensa and Simulator: - `risc-v-01` to `03` - `xtensa-01` - `sim-01` When the Complex PR is Merged: CI Workflow will still run all jobs for RISC-V, Xtensa and Simulator: - `risc-v-01` to `06` - `xtensa-01` to `02` - `sim-01` to `02` Simple PRs with One Single Arch / Board will build the same way as before: - `risc-v-01` to `06` - `xtensa-01` to `02` - `sim-01` to `02` We hope to lower drastically our usage of GitHub Runners before the ASF Deadline, as explained here: apache/nuttx#14376
1 parent 06181f0 commit a799c3e

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/arch.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,21 @@ jobs:
160160
161161
# If Not a Simple PR: Build all targets
162162
if [[ "$quit" == "1" ]]; then
163-
# If PR was Created or Modified: Exclude arm-08 to arm-14
163+
# If PR was Created or Modified: Exclude some boards
164164
pr=${{github.event.pull_request.number}}
165165
if [[ "$pr" != "" ]]; then
166-
echo "Excluding arm-08 to arm-14"
167-
boards=$(
166+
echo "Excluding arm-08..14, risc-v-04..06, sim-02, xtensa-02"
167+
boards=$(
168168
echo '${{ inputs.boards }}' |
169-
jq --compact-output 'map(select(test("arm-0[8-9]") == false and test("arm-1.+") == false))'
169+
jq --compact-output \
170+
'map(
171+
select(
172+
test("arm-0[8-9]") == false and test("arm-1.") == false and
173+
test("risc-v-0[4-9]") == false and
174+
test("sim-0[2-9]") == false and
175+
test("xtensa-0[2-9]") == false
176+
)
177+
)'
170178
)
171179
fi
172180
echo "selected_builds=$boards" | tee -a $GITHUB_OUTPUT

0 commit comments

Comments
 (0)