From 3dc801e1e0439c1cc5181ea2a7a624f3cb97b821 Mon Sep 17 00:00:00 2001 From: Lup Yuen Lee Date: Tue, 1 Oct 2024 20:52:18 +0800 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28cb33e07627d..c4a445df088e9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -177,27 +177,27 @@ jobs: fi ## We consider only cases where numlabels=2 and labels include size + if [ $numlabels -ne 2 ] || [ $labels_contain_size -ne 1 ]; then + exit + fi + ## If "Arch: arm / arm64" is the only non-size label, then build other, arm-01, arm-02, ... - if [ $numlabels -eq 2 ] && [ $labels_contain_size -eq 1 ]; then - if [ $arch_contains_arm_arm64 -eq 1 ]; then - if [[ "${{matrix.boards}}" == *"arm"* ]] || [[ "${{matrix.boards}}" == *"other"* ]]; then - echo Allow build: ${{matrix.boards}} - else - echo Skip build: ${{matrix.boards}} - echo "skip_build=1" >> $GITHUB_OUTPUT - fi + if [ $arch_contains_arm_arm64 -eq 1 ]; then + if [[ "${{matrix.boards}}" == *"arm"* ]] || [[ "${{matrix.boards}}" == *"other"* ]]; then + echo Allow build: ${{matrix.boards}} + else + echo Skip build: ${{matrix.boards}} + echo "skip_build=1" >> $GITHUB_OUTPUT fi fi ## If "Arch: risc-v" is the only non-size label, then build risc-v-01, risc-v-02 - if [ $numlabels -eq 2 ] && [ $labels_contain_size -eq 1 ]; then - if [ $arch_contains_riscv -eq 1 ]; then - if [[ "${{matrix.boards}}" == *"risc-v"* ]]; then - echo Allow build: ${{matrix.boards}} - else - echo Skip build: ${{matrix.boards}} - echo "skip_build=1" >> $GITHUB_OUTPUT - fi + if [ $arch_contains_riscv -eq 1 ]; then + if [[ "${{matrix.boards}}" == *"risc-v"* ]]; then + echo Allow build: ${{matrix.boards}} + else + echo Skip build: ${{matrix.boards}} + echo "skip_build=1" >> $GITHUB_OUTPUT fi fi @@ -216,6 +216,7 @@ jobs: skip_build=${{ steps.get-arch.outputs.skip_build }} echo skip_build=$skip_build if [ $skip_build -eq 1 ]; then + echo Skip build: ${{matrix.boards}} exit fi #### End Test