Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen authored Oct 1, 2024
1 parent bb5ea86 commit 3dc801e
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3dc801e

Please sign in to comment.