diff options
-rw-r--r-- | files/alpine/abuild.conf | 2 | ||||
-rw-r--r-- | nodes/heavy.conf | 2 | ||||
-rw-r--r-- | scripts/turris-common.sh | 6 | ||||
-rwxr-xr-x | templates/turris.run | 9 | ||||
-rwxr-xr-x | templates/turris3x.run | 9 |
5 files changed, 12 insertions, 16 deletions
diff --git a/files/alpine/abuild.conf b/files/alpine/abuild.conf index 7846d73..8842e9d 100644 --- a/files/alpine/abuild.conf +++ b/files/alpine/abuild.conf @@ -4,7 +4,7 @@ export CXXFLAGS="\$CFLAGS" export CPPFLAGS="\$CFLAGS" export LDFLAGS="-Wl,--as-needed" -export JOBS=4 +export JOBS=8 export MAKEFLAGS=-j\$JOBS USE_COLORS=1 diff --git a/nodes/heavy.conf b/nodes/heavy.conf index db1bd7e..d53e4ac 100644 --- a/nodes/heavy.conf +++ b/nodes/heavy.conf @@ -1,2 +1,2 @@ -EXECUTORS=2 +EXECUTORS=1 TAGS=heavy diff --git a/scripts/turris-common.sh b/scripts/turris-common.sh new file mode 100644 index 0000000..8a4e4e6 --- /dev/null +++ b/scripts/turris-common.sh @@ -0,0 +1,6 @@ +parallel=-j8 +make="make -j8 IS_TTY=1 BUILD_LOG=1" +if [ "$V" -ge 1 ]; then + parallel=-j1 + make="make -j1 IS_TTY=1 BUILD_LOG=1 V=99" +fi diff --git a/templates/turris.run b/templates/turris.run index 6686131..c77ae74 100755 --- a/templates/turris.run +++ b/templates/turris.run @@ -1,12 +1,7 @@ #!/bin/sh # vim: ft=sh . "$(dirname "$(readlink -f "$0")")/../job.common" - -if [ "$V" -ge 1 ]; then - make="make -j1 IS_TTY=1 BUILD_LOG=1 V=99" -else - make="make -j4 IS_TTY=1 BUILD_LOG=1" -fi +. turris-common.sh curl "https://repo.turris.cz/$ANIMAL/packages/$BOARD/git-hash" > git-hash cat git-hash @@ -30,7 +25,7 @@ DL_MIRROR="$TWORKSPACE/openwrt-dl-mirror" CCACHE_HOST_DIR="$TWORKSPACE/ccache-host" CCACHE_TARGET_DIR="$WORKSPACE/ccache-target" EOF - ../turris-build/compile_pkgs -e -t "$BOARD" -p "$ANIMAL" repo_prepare autopkg + ../turris-build/compile_pkgs -e -t "$BOARD" -p "$ANIMAL" $parallel repo_prepare autopkg $make toolchain/compile target/compile package/usign/host/compile ) tar -czf openwrt.tar.gz openwrt diff --git a/templates/turris3x.run b/templates/turris3x.run index c354b50..dfd85d9 100755 --- a/templates/turris3x.run +++ b/templates/turris3x.run @@ -1,12 +1,7 @@ #!/bin/sh # vim: ft=sh . "$(dirname "$(readlink -f "$0")")/../job.common" - -if [ "$V" -ge 1 ]; then - MAKE="make -j1 IS_TTY=1 BUILD_LOG=1 V=99" -else - MAKE="make -j4 IS_TTY=1 BUILD_LOG=1" -fi +. turris-common.sh echo_stage "Get packages" git_clone "git@cynerd.cz:openwrt-personal-pkgs" pkgs turris3x @@ -28,7 +23,7 @@ echo_stage "Copy packages" cp -r ../pkgs/* package/ echo_stage "Build" -$MAKE +$make echo_stage "Sign" ./staging_dir/host/bin/usign -S -s ~/openwrt-repo.key -m "bin/$ARCH/packages/base/Packages" |