File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 1313 required : false
1414 default : true
1515 type : boolean
16-
16+ parallell :
17+ description : ' Massive parallel build of each image'
18+ required : false
19+ default : true
20+ type : boolean
1721jobs :
1822 build :
1923 name : Build Infix ${{ matrix.target }}
7175 echo "tgz=infix-$target.tar.gz" >> $GITHUB_OUTPUT
7276 echo "flv=$flavor" >> $GITHUB_OUTPUT
7377 echo "Building target ${target}${flavor}_defconfig"
78+
7479 - name : Restore Cache of dl/
7580 uses : actions/cache@v4
7681 with :
@@ -96,10 +101,24 @@ jobs:
96101 run : |
97102 make test-unit
98103
104+ - name : Prepare parallel build
105+ id : parallel
106+ run : |
107+
108+ if [ "${{ ((github.event.inputs.parallel == 'true' && github.event_name == 'workflow_dispatch') || (github.ref_name != 'main' && github.event_name != 'workflow_dispatch')) }}" == "true" ]; then
109+ echo "BR2_PER_PACKAGE_DIRECTORIES=y" >> output/.config
110+ MAKE="make -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))"
111+ echo "Building in parallel with -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))"
112+ else
113+ echo "Disabling parallel build"
114+ MAKE="make"
115+ fi
116+ echo "MAKE=$MAKE" >> $GITHUB_OUTPUT
117+
99118 - name : Build ${{ matrix.target }}${{ steps.vars.outputs.flv }}
100119 run : |
101120 echo "Building ${{ matrix.target }}${{ steps.vars.outputs.flv }}_defconfig ..."
102- make
121+ eval "${{ steps.parallel.outputs.MAKE }}"
103122
104123 - name : Check SBOM from Build
105124 run : |
You can’t perform that action at this time.
0 commit comments