Skip to content

Commit e1785c5

Browse files
committed
TEST1
1 parent 26e13cd commit e1785c5

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

.github/workflows/twister.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Twister
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
sdk-build-job-id:
7+
description: 'SDK Build Job ID'
8+
required: true
9+
sdk-bundle-basename:
10+
description: 'SDK Bundle Base Name'
11+
required: true
12+
default: 'zephyr-sdk-VER'
13+
sdk-toolchain:
14+
description: 'SDK Toolchain'
15+
type: choice
16+
required: true
17+
options:
18+
- gnu
19+
- llvm
20+
default: gnu
21+
zephyr-ref:
22+
description: 'Zephyr Ref (branch, tag, SHA ...)'
23+
required: true
24+
default: collab-sdk-dev
25+
host:
26+
description: 'Host'
27+
type: choice
28+
required: true
29+
options:
30+
- linux-x86_64
31+
- linux-aarch64
32+
- macos-x86_64
33+
- macos-aarch64
34+
- windows-x86_64
35+
default: linux-x86_64
36+
twister-mode:
37+
description: 'Twister Mode'
38+
type: choice
39+
required: true
40+
options:
41+
- integration
42+
- all
43+
default: integration
44+
twister-extra-args:
45+
description: 'Twister Extra Arguments'
46+
required: true
47+
default: '--build-only --show-footprint'
48+
subset-count:
49+
description: 'Subset Count'
50+
required: false
51+
52+
concurrency:
53+
group: ${{ github.run_id }}
54+
cancel-in-progress: false
55+
56+
jobs:
57+
prep:
58+
name: Prep
59+
runs-on: ubuntu-24.04
60+
61+
outputs:
62+
runner: ${{ steps.plan.outputs.runner }}
63+
subset: ${{ steps.plan.outputs.subset }}
64+
size: ${{ steps.plan.outputs.size }}
65+
66+
steps:
67+
- name: Plan
68+
id: plan
69+
run: |
70+
# Resolve runner type
71+
case "${{ github.event.inputs.host }}" in
72+
linux-x86_64) runner="zephyr-runner-v2-linux-x64-4xlarge";;
73+
linux-aarch64) runner="zephyr-runner-v2-linux-arm64-4xlarge";;
74+
macos-x86_64) runner="zephyr-runner-v2-macos-arm64-2xlarge";;
75+
macos-aarch64) runner="zephyr-runner-v2-macos-arm64-2xlarge";;
76+
windows-x86_64) runner="zephyr-runner-v2-windows-x64-2xlarge";;
77+
esac
78+
79+
# Resolve subset count
80+
if [ "${{ github.event.inputs.subset-count }}" != "" ]; then
81+
size="${{ github.event.inputs.subset_count }}"
82+
else
83+
case "${{ github.event.inputs.twister-mode }}" in
84+
integration) size="20";;
85+
all) size="200";;
86+
esac
87+
fi
88+
89+
subset="[ $(seq -s',' 1 ${size}) ]"
90+
91+
# Export output variables
92+
echo "runner=${runner}" >> $GITHUB_OUTPUT
93+
echo "subset=${subset}" >> $GITHUB_OUTPUT
94+
echo "size=${size}" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)