@@ -2,6 +2,10 @@ name: Armbian
22on :
33 workflow_dispatch :
44 inputs :
5+ all :
6+ description : ' Build ALL assets?'
7+ type : boolean
8+ default : false
59 asset :
610 description : ' Asset'
711 type : choice
1620 required : true
1721 board :
1822 description : ' Board'
23+ default : rock64
1924 required : true
2025 gitbranch :
2126 description : ' Override Git branch of Armbian repo'
@@ -37,10 +42,147 @@ concurrency:
3742permissions : {}
3843
3944jobs :
45+ prep :
46+ runs-on : ubuntu-24.04
47+ outputs :
48+ assets : ${{ steps.assets.outputs.assets }}
49+ steps :
50+ - name : Generate build matrix
51+ id : assets
52+ run : |
53+ if [ '${{ github.event.inputs.all }}' == 'true' ]
54+ then
55+ echo assets=[\
56+ '"firmware rock64 current",'\
57+ '"kernel meson current",'\
58+ '"kernel meson64 current",'\
59+ '"kernel rockchip current",'\
60+ '"kernel rockchip64 current",'\
61+ '"kernel rockchip64 edge",'\
62+ '"kernel rockchip64 vendor",'\
63+ '"kernel rockchip64 vendor true",'\
64+ '"kernel sunxi current",'\
65+ '"kernel sunxi64 current",'\
66+ '"kernel odroidxu4 current",'\
67+ '"uboot nanopct4 current",'\
68+ '"uboot nanopct6 current",'\
69+ '"uboot nanopct6 edge",'\
70+ '"uboot nanopct6 vendor",'\
71+ '"uboot nanopi-m5 edge",'\
72+ '"uboot nanopi-m5 vendor",'\
73+ '"uboot nanopi-m6 current",'\
74+ '"uboot nanopi-m6 edge",'\
75+ '"uboot nanopi-m6 vendor",'\
76+ '"uboot nanopi-r1 current",'\
77+ '"uboot nanopi-r2s current",'\
78+ '"uboot nanopi-r3s current",'\
79+ '"uboot nanopi-r3s current",'\
80+ '"uboot nanopi-r4s current",'\
81+ '"uboot nanopi-r4s edge",'\
82+ '"uboot nanopi-r5c current",'\
83+ '"uboot nanopi-r5s current",'\
84+ '"uboot nanopi-r6c current",'\
85+ '"uboot nanopi-r6c edge",'\
86+ '"uboot nanopi-r6c vendor",'\
87+ '"uboot nanopi-r6s current",'\
88+ '"uboot nanopi-r6s edge",'\
89+ '"uboot nanopi-r6s vendor",'\
90+ '"uboot nanopi-r76s edge",'\
91+ '"uboot nanopi-r76s vendor",'\
92+ '"uboot nanopiair current",'\
93+ '"uboot nanopik1plus current",'\
94+ '"uboot nanopik2-s905 current",'\
95+ '"uboot nanopim1 current",'\
96+ '"uboot nanopim1plus current",'\
97+ '"uboot nanopim4 current",'\
98+ '"uboot nanopim4v2 current",'\
99+ '"uboot nanopineo current",'\
100+ '"uboot nanopineo2 current",'\
101+ '"uboot nanopineo2black current",'\
102+ '"uboot nanopineo3 current",'\
103+ '"uboot nanopineo4 current",'\
104+ '"uboot nanopineoplus2 current",'\
105+ '"uboot odroidc1 current",'\
106+ '"uboot odroidc2 current",'\
107+ '"uboot odroidc4 current",'\
108+ '"uboot odroidhc4 current",'\
109+ '"uboot odroidhc4 edge",'\
110+ '"uboot odroidn2 current",'\
111+ '"uboot odroidxu4 current",'\
112+ '"uboot orangepi3 current",'\
113+ '"uboot orangepi3-lts current",'\
114+ '"uboot orangepi3b current",'\
115+ '"uboot orangepi3b edge",'\
116+ '"uboot orangepi5 current",'\
117+ '"uboot orangepi5 edge",'\
118+ '"uboot orangepi5 vendor",'\
119+ '"uboot orangepi5-max edge",'\
120+ '"uboot orangepi5-max vendor",'\
121+ '"uboot orangepi5-plus current",'\
122+ '"uboot orangepi5-plus edge",'\
123+ '"uboot orangepi5-plus vendor",'\
124+ '"uboot orangepi5-ultra current",'\
125+ '"uboot orangepi5-ultra edge",'\
126+ '"uboot orangepi5-ultra vendor",'\
127+ '"uboot orangepi5pro edge",'\
128+ '"uboot orangepi5pro vendor",'\
129+ '"uboot orangepicm5 vendor",'\
130+ '"uboot orangepizero2w current",'\
131+ '"uboot orangepizero3 current",'\
132+ '"uboot pine64 current",'\
133+ '"uboot pinebook-a64 current",'\
134+ '"uboot pinebook-pro current",'\
135+ '"uboot pineh64-b current",'\
136+ '"uboot radxa-zero current",'\
137+ '"uboot radxa-zero3 current",'\
138+ '"uboot radxa-zero3 edge",'\
139+ '"uboot radxa-zero3 vendor",'\
140+ '"uboot rock-3a current",'\
141+ '"uboot rock-4se current",'\
142+ '"uboot rock-5a current",'\
143+ '"uboot rock-5a edge",'\
144+ '"uboot rock-5a vendor",'\
145+ '"uboot rock-5b current",'\
146+ '"uboot rock-5b edge",'\
147+ '"uboot rock-5b vendor",'\
148+ '"uboot rock64 current",'\
149+ '"uboot rock64 edge",'\
150+ '"uboot rockpi-4b current",'\
151+ '"uboot rockpi-4cplus current",'\
152+ '"uboot rockpi-s current",'\
153+ '"uboot rockpro64 current",'\
154+ '"uboot rockpro64 edge",'\
155+ '"uboot tinkerboard-2 current",'\
156+ '"uboot tinkerboard current",'\
157+ '"uboot zeropi current"'\
158+ ] >> "$GITHUB_OUTPUT"
159+ else
160+ echo assets='["${{ github.event.inputs.asset }} ${{ github.event.inputs.board }} ${{ github.event.inputs.branch }} ${{ github.event.inputs.bcmdhd-sdio }}"]' >> "$GITHUB_OUTPUT"
161+ fi
40162 build :
41- name : " ${{ github.event.inputs.asset }} - ${{ github.event.inputs.branch }} - ${{ github.event.inputs.board }}"
163+ needs : prep
164+ strategy :
165+ matrix :
166+ assets : ${{ fromJson(needs.prep.outputs.assets) }}
167+ fail-fast : false
168+ name : ${{ matrix.assets }}
42169 runs-on : ubuntu-24.04-arm
43170 steps :
171+ - name : Create build variables
172+ run : |
173+ read -r ASSET BOARD BRANCH BCMDHD_SDIO <<< '${{ matrix.assets }}'
174+ echo "ASSET=$ASSET" >> "$GITHUB_ENV"
175+ case $BOARD in
176+ 'meson') BOARD='odroidc1';;
177+ 'meson64') BOARD='odroidn2';;
178+ 'rockchip') BOARD='tinkerboard';;
179+ 'rockchip64') BOARD='nanopi-m6';;
180+ 'sunxi') BOARD='nanopim1';;
181+ 'sunxi64') BOARD='orangepizero3';;
182+ esac
183+ echo "BOARD=$BOARD" >> "$GITHUB_ENV"
184+ echo "BRANCH=$BRANCH" >> "$GITHUB_ENV"
185+ echo "BCMDHD_SDIO=$BCMDHD_SDIO" >> "$GITHUB_ENV"
44186 - name : Clone Armbian repo
45187 run : |
46188 owner='${{ github.event.inputs.gitowner }}'
@@ -73,30 +215,30 @@ jobs:
73215 git rebase origin/main
74216 fi
75217 # Cherry-pick commit to switch bcmdhd WiFi driver to SDIO mode
76- if [ '${{ github.event.inputs.bcmdhd-sdio }}' = 'true' ] && [ '${{ github.event.inputs.asset }}' = 'kernel' ] && [ '${{ github.event.inputs.branch }}' = 'vendor' ]
218+ if [ "$BCMDHD_SDIO" = 'true' ] && [ "$ASSET" = 'kernel' ] && [ "$BRANCH" = 'vendor' ]
77219 then
78220 git cherry-pick origin/bcmdhd-sdio || git cherry-pick dietpi/bcmdhd-sdio
79221 fi
80222 - name : Obtain version suffix
81223 run : |
82224 cd build
83225 read -r version < VERSION
84- case '${{ github.event.inputs.asset }}' in
226+ case $ASSET in
85227 firmware) package='armbian-firmware';;
86- uboot) package=' linux-u-boot-${{ github.event.inputs.board }}-${{ github.event.inputs.branch }}' ;;
228+ uboot) package=" linux-u-boot-$BOARD-$BRANCH" ;;
87229 kernel)
88- family=$(. ' config/boards/${{ github.event.inputs.board }}.' * > /dev/null; echo "$BOARDFAMILY")
230+ family=$(. " config/boards/$BOARD." * > /dev/null; echo "$BOARDFAMILY")
89231 echo "Board family is: $family"
90- family=$(BRANCH='${{ github.event.inputs.branch }}'; . "config/sources/families/$family.conf" > /dev/null; echo "${LINUXFAMILY:-$family}")
232+ family=$(. "config/sources/families/$family.conf" > /dev/null; echo "${LINUXFAMILY:-$family}")
91233 echo "Linux family is: $family"
92- package="linux-dtb-${{ github.event.inputs.branch }} -$family"
234+ package="linux-dtb-$BRANCH -$family"
93235 # Dedicated kernel packages with bcmdhd driver in SDIO mode
94- if [ '${{ github.event.inputs.bcmdhd-sdio }}' = 'true' ] && [ '${{ github.event.inputs.branch }}' = 'vendor' ]
236+ if [ "$BCMDHD_SDIO" = 'true' ] && [ "$BRANCH" = 'vendor' ]
95237 then
96238 package="${package}_bcmdhd-sdio"
97239 fi
98240 ;;
99- *) echo ' ERROR: Invalid asset "${{ github.event.inputs.asset }}"' ; exit 1;;
241+ *) echo " ERROR: Invalid asset \"$ASSET\"" ; exit 1;;
100242 esac
101243 if curl -fO "https://dietpi.com/downloads/binaries/$package.deb"
102244 then
@@ -112,7 +254,7 @@ jobs:
112254 - name : Build asset
113255 run : |
114256 cd build
115- ./compile.sh '${{ github.event.inputs.asset }}' BRANCH='${{ github.event.inputs.branch }}' BOARD='${{ github.event.inputs.board }}'
257+ ./compile.sh "$ASSET" " BRANCH=$BRANCH" " BOARD=$BOARD"
116258 - name : Upload
117259 run : |
118260 # SSH server and client keys
@@ -128,7 +270,7 @@ jobs:
128270 for i in *.deb
129271 do
130272 # Dedicated kernel packages with bcmdhd driver in SDIO mode
131- if [ '${{ github.event.inputs.bcmdhd-sdio }}' = 'true' ] && [ '${{ github.event.inputs.asset }}' = 'kernel' ] && [ '${{ github.event.inputs.branch }}' = 'vendor' ]
273+ if [ "$BCMDHD_SDIO" = 'true' ] && [ "$ASSET" = 'kernel' ] && [ "$BRANCH" = 'vendor' ]
132274 then
133275 mv -v "$i" "${i%%_*}_bcmdhd-sdio.deb"
134276 i="${i%%_*}_bcmdhd-sdio.deb"
0 commit comments