|
42 | 42 | description: 'Build R2C' |
43 | 43 | type: boolean |
44 | 44 | default: false |
| 45 | + build_mini: |
| 46 | + description: 'Build mini seed' |
| 47 | + type: boolean |
| 48 | + default: false |
| 49 | + build_full: |
| 50 | + description: 'Build full seed' |
| 51 | + type: boolean |
| 52 | + default: true |
45 | 53 | jobs: |
46 | 54 | init: |
47 | 55 | runs-on: ubuntu-22.04 |
|
92 | 100 | echo "RELTAG=${{ needs.init.outputs.release_tag }}" >> $GITHUB_ENV |
93 | 101 | echo "OPENWRT_BRANCH=${{ github.event.inputs.openwrt_branch }}" >> $GITHUB_ENV |
94 | 102 | echo "NANOPI_MODEL=${{ matrix.nanopi_model }}" >> $GITHUB_ENV |
| 103 | + echo "BUILD_MINI=${{ github.event.inputs.build_mini }}" >> $GITHUB_ENV |
| 104 | + echo "BUILD_FULL=${{ github.event.inputs.build_full }}" >> $GITHUB_ENV |
95 | 105 |
|
96 | 106 | - name: Show GITHUB_ENV |
97 | 107 | run: echo $GITHUB_ENV |
@@ -136,137 +146,68 @@ jobs: |
136 | 146 | echo '================================================================' |
137 | 147 | cd build/openwrt && make toolchain/install -j1 V=s |
138 | 148 | |
139 | | -# - name: Try cleaning build_dir before packing |
140 | | -# run: | |
141 | | -# cd build/openwrt |
142 | | -# make clean |
143 | | -# #ls -l build_dir/ |
144 | | -# #rm -rf build_dir/host build_dir/toolchain* |
145 | | -# |
146 | | -# - name: Pack toolchain |
147 | | -# run: | |
148 | | -# pwd |
149 | | -# cd ~/work/OpenWrt-NanoPi-R2S-R4S-Builds |
150 | | -# pwd |
151 | | -# tar --posix -cf ../toolchain_built.tar OpenWrt-NanoPi-R2S-R4S-Builds |
152 | | -# |
153 | | -# - name: Upload artifact |
154 | | -# uses: actions/upload-artifact@v2 |
155 | | -# with: |
156 | | -# name: toolchain_built |
157 | | -# path: ~/work/toolchain_built.tar |
158 | | -# |
159 | | -# build: |
160 | | -# needs: [init, toolchain] |
161 | | -# runs-on: ubuntu-20.04 |
162 | | -# steps: |
163 | 149 | - name: Dump github context |
164 | 150 | run: echo "$GITHUB_CONTEXT" |
165 | 151 | shell: bash |
166 | 152 | env: |
167 | 153 | GITHUB_CONTEXT: ${{ toJson(github) }} |
168 | | -# |
169 | | -# - name: Retrieve toolchain artifact |
170 | | -# uses: actions/download-artifact@v2 |
171 | | -# with: |
172 | | -# name: toolchain_built |
173 | | -# path: ~/work/ |
174 | | -# |
175 | | -# - name: Unpack and clean toolchain artifact |
176 | | -# run: | |
177 | | -# cd ~/work/OpenWrt-NanoPi-R2S-R4S-Builds |
178 | | -# tar xf ../toolchain_built.tar |
179 | | -# rm ../toolchain_built.tar |
180 | | -# pwd |
181 | | -# ls -l |
182 | | -# |
183 | | -# - name: list files (debug) |
184 | | -# run: ls -l |
185 | | -# |
186 | | -# - name: fix timestamps |
187 | | -# run: | |
188 | | -# cd build/openwrt |
189 | | -# #find build_dir/{host*,toolchain-*} -name .built\* -exec touch {} \; |
190 | | -# touch staging_dir/{host*,toolchain-*}/stamp/.* |
191 | | -# |
192 | | -# - name: Free space |
193 | | -# run: | |
194 | | -# /bin/bash ./workflow-scripts/free_disk_space.sh |
195 | | -# df -h |
196 | | -# |
197 | | -# - name: Prepare Build deps |
198 | | -# uses: ./.github/actions/setup-devenv |
199 | | -# |
200 | | -# - name: Set env |
201 | | -# run: | |
202 | | -# #echo "SSH_ACTIONS=false" >> $GITHUB_ENV |
203 | | -# #echo "UPLOAD_BIN_DIR=false" >> $GITHUB_ENV |
204 | | -# #echo "UPLOAD_FIRMWARE=true" >> $GITHUB_ENV |
205 | | -# #echo "UPLOAD_RELEASE=true" >> $GITHUB_ENV |
206 | | -# echo "TZ=Europe/Paris" >> $GITHUB_ENV |
207 | | -# echo "BUILD_STRING=${{ needs.init.outputs.build_string }}" >> $GITHUB_ENV |
208 | | -# echo "RELTAG=${{ needs.init.outputs.release_tag }}" >> $GITHUB_ENV |
209 | | -# echo "OPENWRT_BRANCH=${{ github.event.inputs.openwrt_branch }}" >> $GITHUB_ENV |
210 | | -# echo "NANOPI_MODEL=${{ github.event.inputs.nanopi_model }}" >> $GITHUB_ENV |
211 | 154 |
|
212 | 155 | - name: Load AO seed (mini) |
| 156 | + if: github.event.inputs.build_mini == 'true' |
213 | 157 | run: ./openwrt-$OPENWRT_BRANCH/steps/06-create_config_from_seed.sh $NANOPI_MODEL mini |
214 | 158 |
|
215 | | -# - name: Download package |
216 | | -# run: | |
217 | | -# cd build/openwrt |
218 | | -# make defconfig |
219 | | -# make download -j10 |
220 | | -# find dl -size -1024c -exec ls -l {} \; |
221 | | -# find dl -size -1024c -exec rm -f {} \; |
| 159 | + - name: Build kmods (mini) |
| 160 | + if: github.event.inputs.build_mini == 'true' |
| 161 | + run: ./openwrt-$OPENWRT_BRANCH/steps/07-all_kmods.sh |
222 | 162 |
|
223 | 163 | - name: Compile OpenWRT (mini) |
224 | 164 | id: compileopenwrtmini |
| 165 | + if: github.event.inputs.build_mini == 'true' |
225 | 166 | continue-on-error: true |
226 | 167 | run: | |
227 | 168 | cd build/openwrt |
228 | 169 | let make_process=$(nproc)+1 |
229 | 170 | make -j${make_process} || make -j${make_process} |
230 | 171 | |
231 | 172 | - name: If compile openwrt Error |
232 | | - if: steps.compileopenwrtmini.outcome == 'failure' |
| 173 | + if: github.event.inputs.build_mini == 'true' && steps.compileopenwrtmini.outcome == 'failure' |
233 | 174 | run: | |
234 | 175 | cat build/openwrt/.config |
235 | 176 | echo '================================================================' |
236 | 177 | cd build/openwrt && make -j1 V=s |
237 | 178 | |
238 | 179 | - name: Organize files (mini) |
239 | 180 | id: organizemini |
| 181 | + if: github.event.inputs.build_mini == 'true' |
240 | 182 | run: ./openwrt-$OPENWRT_BRANCH/steps/organize_files.sh $NANOPI_MODEL mini $OPENWRT_BRANCH $RELTAG |
241 | 183 |
|
242 | 184 | - name: Load AO seed (full) |
| 185 | + if: github.event.inputs.build_full == 'true' |
243 | 186 | run: ./openwrt-$OPENWRT_BRANCH/steps/06-create_config_from_seed.sh $NANOPI_MODEL full |
244 | 187 |
|
245 | | -# - name: Download package |
246 | | -# run: | |
247 | | -# cd build/openwrt |
248 | | -# make defconfig |
249 | | -# make download -j10 |
250 | | -# find dl -size -1024c -exec ls -l {} \; |
251 | | -# find dl -size -1024c -exec rm -f {} \; |
| 188 | + - name: Build kmods (full) |
| 189 | + if: github.event.inputs.build_full == 'true' |
| 190 | + run: ./openwrt-$OPENWRT_BRANCH/steps/07-all_kmods.sh |
252 | 191 |
|
253 | 192 | - name: Compile OpenWRT (full) |
254 | 193 | id: compileopenwrtfull |
| 194 | + if: github.event.inputs.build_full == 'true' |
255 | 195 | continue-on-error: true |
256 | 196 | run: | |
257 | 197 | cd build/openwrt |
258 | 198 | let make_process=$(nproc)+1 |
259 | 199 | make -j${make_process} || make -j${make_process} |
260 | 200 | |
261 | 201 | - name: If compile openwrt Error |
262 | | - if: steps.compileopenwrtfull.outcome == 'failure' |
| 202 | + if: github.event.inputs.build_full == 'true' && steps.compileopenwrtfull.outcome == 'failure' |
263 | 203 | run: | |
264 | 204 | cat build/openwrt/.config |
265 | 205 | echo '================================================================' |
266 | 206 | cd build/openwrt && make -j1 V=s |
267 | 207 | |
268 | 208 | - name: Organize files (full) |
269 | 209 | id: organizefull |
| 210 | + if: github.event.inputs.build_full == 'true' |
270 | 211 | run: ./openwrt-$OPENWRT_BRANCH/steps/organize_files.sh $NANOPI_MODEL full $OPENWRT_BRANCH $RELTAG |
271 | 212 |
|
272 | 213 | - name: Create release |
|
0 commit comments