mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-16 03:41:26 +00:00
Beta builds are now defined in board configuration - will be live and updated after few test runs. There was also few fixes for parallel building.
This commit is contained in:
parent
6552b76b0e
commit
f0d2425929
9 changed files with 74 additions and 21 deletions
65
build-all.sh
65
build-all.sh
|
@ -15,13 +15,6 @@ source $SRC/lib/general.sh
|
|||
# when we want to build from certain start
|
||||
from=0
|
||||
|
||||
free_cpu=$(grep -c 'processor' /proc/cpuinfo)
|
||||
free_cpu=$(($free_cpu + $free_cpu/2))
|
||||
|
||||
echo $MULTITHREAD
|
||||
free_cpu=1001
|
||||
[[ $MULTITHREAD != yes ]] && free_cpu=0
|
||||
|
||||
rm -rf /run/armbian
|
||||
mkdir -p /run/armbian
|
||||
|
||||
|
@ -37,10 +30,13 @@ fi
|
|||
|
||||
create_images_list()
|
||||
{
|
||||
#
|
||||
# if parameter is true, than we build beta list
|
||||
#
|
||||
for board in $SRC/lib/config/boards/*.conf; do
|
||||
BOARD=$(basename $board | cut -d'.' -f1)
|
||||
source $SRC/lib/config/boards/$BOARD.conf
|
||||
if [[ -n $CLI_TARGET ]]; then
|
||||
if [[ -n $CLI_TARGET && -z $1 ]]; then
|
||||
|
||||
# RELEASES : BRANCHES
|
||||
CLI_TARGET=($(tr ':' ' ' <<< "$CLI_TARGET"))
|
||||
|
@ -57,7 +53,7 @@ create_images_list()
|
|||
done
|
||||
done
|
||||
fi
|
||||
if [[ -n $DESKTOP_TARGET ]]; then
|
||||
if [[ -n $DESKTOP_TARGET && -z $1 ]]; then
|
||||
|
||||
# RELEASES : BRANCHES
|
||||
DESKTOP_TARGET=($(tr ':' ' ' <<< "$DESKTOP_TARGET"))
|
||||
|
@ -75,7 +71,43 @@ create_images_list()
|
|||
done
|
||||
|
||||
fi
|
||||
unset CLI_TARGET CLI_BRANCH DESKTOP_TARGET DESKTOP_BRANCH KERNEL_TARGET
|
||||
if [[ -n $CLI_BETA_TARGET && -n $1 ]]; then
|
||||
|
||||
# RELEASES : BRANCHES
|
||||
CLI_BETA_TARGET=($(tr ':' ' ' <<< "$CLI_BETA_TARGET"))
|
||||
|
||||
build_settings_target=($(tr ',' ' ' <<< "${CLI_BETA_TARGET[0]}"))
|
||||
build_settings_branch=($(tr ',' ' ' <<< "${CLI_BETA_TARGET[1]}"))
|
||||
|
||||
[[ ${build_settings_target[0]} == "%" ]] && build_settings_target[0]="${RELEASE_LIST[@]}"
|
||||
[[ ${build_settings_branch[0]} == "%" ]] && build_settings_branch[0]="${BRANCH_LIST[@]}"
|
||||
|
||||
for release in ${build_settings_target[@]}; do
|
||||
for kernel in ${build_settings_branch[@]}; do
|
||||
buildlist+=("$BOARD $kernel $release no")
|
||||
done
|
||||
done
|
||||
|
||||
fi
|
||||
if [[ -n $DESKTOP_BETA_TARGET && -n $1 ]]; then
|
||||
|
||||
# RELEASES : BRANCHES
|
||||
DESKTOP_BETA_TARGET=($(tr ':' ' ' <<< "$DESKTOP_BETA_TARGET"))
|
||||
|
||||
build_settings_target=($(tr ',' ' ' <<< "${DESKTOP_BETA_TARGET[0]}"))
|
||||
build_settings_branch=($(tr ',' ' ' <<< "${DESKTOP_BETA_TARGET[1]}"))
|
||||
|
||||
[[ ${build_settings_target[0]} == "%" ]] && build_settings_target[0]="${RELEASE_LIST[@]}"
|
||||
[[ ${build_settings_branch[0]} == "%" ]] && build_settings_branch[0]="${BRANCH_LIST[@]}"
|
||||
|
||||
for release in ${build_settings_target[@]}; do
|
||||
for kernel in ${build_settings_branch[@]}; do
|
||||
buildlist+=("$BOARD $kernel $release no")
|
||||
done
|
||||
done
|
||||
|
||||
fi
|
||||
unset CLI_TARGET CLI_BRANCH DESKTOP_TARGET DESKTOP_BRANCH KERNEL_TARGET CLI_BETA_TARGET DESKTOP_BETA_TARGET
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -99,7 +131,7 @@ if [[ $KERNEL_ONLY == yes ]]; then
|
|||
create_kernels_list
|
||||
printf "%-3s %-20s %-10s %-10s %-10s\n" \# BOARD BRANCH
|
||||
else
|
||||
create_images_list
|
||||
create_images_list $BETA
|
||||
printf "%-3s %-20s %-10s %-10s %-10s\n" \# BOARD BRANCH RELEASE DESKTOP
|
||||
fi
|
||||
|
||||
|
@ -126,18 +158,15 @@ for line in "${buildlist[@]}"; do
|
|||
|
||||
if [[ $from -le $n ]]; then
|
||||
|
||||
touch "/run/armbian/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid"
|
||||
jobs=$(ls /run/armbian | wc -l)
|
||||
if [[ $jobs -lt $free_cpu ]]; then
|
||||
if [[ $jobs -lt $MULTITHREAD ]]; then
|
||||
display_alert "Building in the back $n / ${#buildlist[@]}" "Board: $BOARD Kernel:$BRANCH${RELEASE:+ Release: $RELEASE}${BUILD_DESKTOP:+ Desktop: $BUILD_DESKTOP}" "ext"
|
||||
source $SRC/lib/main.sh >/dev/null & 2>&1
|
||||
(touch "/run/armbian/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid"; source $SRC/lib/main.sh; rm "/run/armbian/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid";) &
|
||||
else
|
||||
display_alert "Building $buildtext $n / ${#buildlist[@]}" "Board: $BOARD Kernel:$BRANCH${RELEASE:+ Release: $RELEASE}${BUILD_DESKTOP:+ Desktop: $BUILD_DESKTOP}" "ext"
|
||||
source $SRC/lib/main.sh
|
||||
(touch "/run/armbian/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid"; source $SRC/lib/main.sh; rm "/run/armbian/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid";)
|
||||
fi
|
||||
#
|
||||
# fake load
|
||||
#sleep $[ ( $RANDOM % 3 ) + 1 ]s
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ FORCE_CHECKOUT="yes" # ignore manual changes to source
|
|||
BUILD_ALL="no" # cycle through available boards and make images or kernel/u-boot packages.
|
||||
# set KERNEL_ONLY to "yes" or "no" to build all packages/all images
|
||||
|
||||
BETA="" # set yes to add subrevision with tomorrow's date. For internal use.
|
||||
MULTITHREAD="" # build n images at once. For internal use.
|
||||
|
||||
# build script version to use
|
||||
LIB_TAG="" # empty for latest version,
|
||||
# one of listed here: https://github.com/igorpecovnik/lib/tags for stable versions,
|
||||
|
@ -80,6 +83,9 @@ fi
|
|||
# source additional configuration file
|
||||
[[ -n $1 && -f $SRC/config-$1.conf ]] && source $SRC/config-$1.conf
|
||||
|
||||
# daily beta build contains date in subrevision
|
||||
if [[ $BETA == yes ]]; then SUBREVISION="."$(date --date="tomorrow" +"%y%m%d"); fi
|
||||
|
||||
if [[ $BUILD_ALL == yes || $BUILD_ALL == demo ]]; then
|
||||
source $SRC/lib/build-all.sh
|
||||
else
|
||||
|
@ -92,4 +98,4 @@ fi
|
|||
|
||||
# If you are committing new version of this file, increment VERSION
|
||||
# Only integers are supported
|
||||
# VERSION=24
|
||||
# VERSION=25
|
||||
|
|
|
@ -8,6 +8,9 @@ CLI_TARGET="jessie,xenial:default,next"
|
|||
DESKTOP_TARGET="xenial:default,next"
|
||||
KERNEL_TARGET="default,next,dev"
|
||||
#
|
||||
CLI_BETA_TARGET="xenial:dev"
|
||||
DESKTOP_BETA_TARGET=""
|
||||
#
|
||||
BOARDRATING=""
|
||||
CHIP="http://docs.armbian.com/Hardware_Allwinner-A20/"
|
||||
HARDWARE="https://linux-sunxi.org/Banana_Pi"
|
||||
|
|
|
@ -8,6 +8,9 @@ CLI_TARGET="jessie,xenial:default,next"
|
|||
DESKTOP_TARGET="xenial:default,next"
|
||||
KERNEL_TARGET="default,next,dev"
|
||||
#
|
||||
CLI_BETA_TARGET="xenial:dev"
|
||||
DESKTOP_BETA_TARGET=""
|
||||
#
|
||||
BOARDRATING=""
|
||||
CHIP="http://docs.armbian.com/Hardware_Allwinner-A20/"
|
||||
HARDWARE="https://linux-sunxi.org/Cubietruck"
|
||||
|
|
|
@ -7,3 +7,7 @@ MODULES_NEXT="bonding"
|
|||
CLI_TARGET=""
|
||||
DESKTOP_TARGET=""
|
||||
KERNEL_TARGET="default,next,dev"
|
||||
#
|
||||
CLI_BETA_TARGET="xenial:dev"
|
||||
DESKTOP_BETA_TARGET=""
|
||||
#
|
|
@ -10,6 +10,9 @@ CLI_TARGET="jessie,xenial:default"
|
|||
DESKTOP_TARGET="xenial:default"
|
||||
KERNEL_TARGET="default,dev"
|
||||
#
|
||||
CLI_BETA_TARGET=""
|
||||
DESKTOP_BETA_TARGET=""
|
||||
#
|
||||
BOARDRATING=""
|
||||
CHIP="http://docs.armbian.com/Hardware_Allwinner-H3/"
|
||||
HARDWARE="https://linux-sunxi.org/Orange_Pi_Plus_2E"
|
||||
|
|
|
@ -11,6 +11,9 @@ CLI_TARGET="jessie,xenial:default"
|
|||
DESKTOP_TARGET=""
|
||||
KERNEL_TARGET="default,dev"
|
||||
#
|
||||
CLI_BETA_TARGET="xenial:dev"
|
||||
DESKTOP_BETA_TARGET=""
|
||||
#
|
||||
BOARDRATING=""
|
||||
CHIP="http://docs.armbian.com/Hardware_Allwinner-H3/"
|
||||
HARDWARE="http://linux-sunxi.org/Xunlong_Orange_Pi_Zero"
|
||||
|
|
|
@ -8,6 +8,9 @@ MODULES_NEXT=""
|
|||
CLI_TARGET="jessie,xenial:default,dev"
|
||||
DESKTOP_TARGET="xenial:default"
|
||||
#
|
||||
CLI_BETA_TARGET="xenial:dev"
|
||||
DESKTOP_BETA_TARGET=""
|
||||
#
|
||||
BOARDRATING=""
|
||||
CHIP="http://docs.armbian.com/Hardware_Allwinner-H5-A64/"
|
||||
REVIEW="http://forum.armbian.com/index.php/topic/1917-armbian-running-on-pine64-and-other-a64h5-devices/#entry14642"
|
||||
|
|
3
main.sh
3
main.sh
|
@ -229,5 +229,4 @@ fi
|
|||
|
||||
end=`date +%s`
|
||||
runtime=$(((end-start)/60))
|
||||
display_alert "Runtime" "$runtime min" "info"
|
||||
rm -f "/run/armbian/Armbian_${BOARD^}_${BRANCH}_${RELEASE}_$BUILD_DESKTOP.pid"
|
||||
display_alert "Runtime" "$runtime min" "info"
|
Loading…
Add table
Reference in a new issue