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 4853a7b commit adc766e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,23 @@ jobs:
run: |
pr=${{github.event.pull_request.number}}
echo pr=$pr
numlabels=$(gh pr view $pr --repo $GITHUB_REPOSITORY --json labels --jq '.[] | length')
echo numlabels=$numlabels
labels=$(gh pr view $pr --repo $GITHUB_REPOSITORY --json labels --jq '.labels[] | .name')
echo labels=$labels
if [[ "$labels" == *"Size: "* ]]; then
echo Labels contains size
fi
if [[ "$labels" == *"Arch: arm"* ]]; then
echo arch=arm_or_arm64
echo Arch contains arm or arm64
fi
if [[ "$labels" == *"Arch: risc-v"* ]]; then
echo arch=risc-v
echo Arch contains risc-v
fi
## TODO: If "Arch: arm / arm64" is the only non-size label, then build other, arm-01, arm-02, ...
## TODO: If "Arch: risc-v" is the only non-size label, then build risc-v-01, risc-v-02
## TODO:
## We consider only cases where numlabels=2 and labels include size
## If "Arch: arm / arm64" is the only non-size label, then build other, arm-01, arm-02, ...
## If "Arch: risc-v" is the only non-size label, then build risc-v-01, risc-v-02
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#### End Test
Expand Down

0 comments on commit adc766e

Please sign in to comment.