mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-25 01:05:08 +03:00
Add opentx os x build vm and allow more cores to be used for fast mac… (#3947)
* Add opentx os x build vm and allow more cores to be used for fast machines.
This commit is contained in:
parent
73a7027eb9
commit
e580927fc1
3 changed files with 44 additions and 20 deletions
|
@ -4,11 +4,28 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
JOBS=2
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
--jobs=*)
|
||||
JOBS="${1#*=}";;
|
||||
-j*)
|
||||
JOBS="${1#*j}";;
|
||||
-*)
|
||||
echo >&2 "usage: $0 [-j<jobs>|--jobs=<jobs>] SRCDIR OUTDIR VERSION_SUFFIX"
|
||||
exit 1;;
|
||||
*)
|
||||
break;; # terminate while loop
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
SRCDIR=$1
|
||||
OUTDIR=$2
|
||||
|
||||
COMMON_OPTIONS="-DALLOW_NIGHTLY_BUILDS=YES -DVERSION_SUFFIX=$3 -DGVARS=YES -DHELI=YES"
|
||||
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_PREFIX_PATH=~/Qt/5.7/clang_64/ -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'"
|
||||
fi
|
||||
|
@ -20,42 +37,41 @@ if [ "$3" == "" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
cmake ${COMMON_OPTIONS} -DPCB=9X ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${COMMON_OPTIONS} -DPCB=GRUVIN9X ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${COMMON_OPTIONS} -DPCB=MEGA2560 ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${COMMON_OPTIONS} -DPCB=SKY9X ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${COMMON_OPTIONS} -DPCB=9XRPRO ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake -DALLOW_NIGHTLY_BUILDS=YES -DVERSION_SUFFIX=$3 -DGVARS=NO -DHELI=YES -DPCB=X7D ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${STM32_OPTIONS} -DPCB=X9D ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${STM32_OPTIONS} -DPCB=X9D+ ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${STM32_OPTIONS} -DPCB=X9E ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${STM32_OPTIONS} -DPCB=HORUS ${SRCDIR}
|
||||
make -j2 libsimulator
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
make -j2 package
|
||||
make -j${JOBS} package
|
||||
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
cp *.dmg ${OUTDIR}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Stops on first error, echo on
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# Allow variable core usage, default uses two cores, to set 8 cores for example : commit-tests.sh -j8
|
||||
CORES=2
|
||||
for i in "$@"
|
||||
|
@ -16,9 +20,6 @@ case $i in
|
|||
esac
|
||||
done
|
||||
|
||||
# Stops on first error, echo on
|
||||
set -e
|
||||
set -x
|
||||
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
SCRIPT=$(python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0")
|
||||
|
|
|
@ -6,7 +6,7 @@ branch=next
|
|||
docker=nightly22
|
||||
workdir=/home/opentx/nightly22
|
||||
output=/var/www/html/2.2/nightly
|
||||
|
||||
version=2.2.0
|
||||
|
||||
# Incrementnightly index
|
||||
index=`cat index.txt`
|
||||
|
@ -35,7 +35,7 @@ docker exec companion rm -rf build
|
|||
docker exec companion /opentx/nightly22/code/tools/build-companion.sh /opentx/nightly22/code /opentx/binaries/ $suffix
|
||||
docker stop companion
|
||||
docker rm companion
|
||||
cp binaries/*.deb $output/companion/linux/opentx-companion-linux-2.2.0$suffix_amd64.deb
|
||||
cp binaries/*.deb $output/companion/linux/opentx-companion-linux-${version}$suffix_amd64.deb
|
||||
|
||||
# Clean binaries It will be hosting built on demand firmware
|
||||
rm -rf binaries/*
|
||||
|
@ -44,10 +44,17 @@ rm -rf binaries/.lock
|
|||
# Request companion compilation on Windows
|
||||
cd $output/companion/windows
|
||||
wget -qO- http://winbox.open-tx.org/companion-builds/compile22.php?branch=$branch\&suffix=$suffix
|
||||
wget -O opentx-companion-windows-2.2.0$suffix.exe http://winbox.open-tx.org/companion-builds/companion-windows-2.2.0$suffix.exe
|
||||
chmod -Rf g+w companion-windows-2.2.0$suffix.exe
|
||||
wget -O opentx-companion-windows-${version}$suffix.exe http://winbox.open-tx.org/companion-builds/companion-windows-${version}$suffix.exe
|
||||
chmod -Rf g+w companion-windows-${version}$suffix.exe
|
||||
|
||||
# Update windows stamp
|
||||
rm -f companion-windows.stamp
|
||||
echo "#define VERSION "'"2.2.0'$suffix'"' >> companion-windows.stamp
|
||||
cp $output/companion/windows/companion-windows.stamp $output/companion/linux/companion-windows.stamp
|
||||
|
||||
# Request companion compilation on Mac OS X
|
||||
cd $output/companion/macosx
|
||||
wget -qO- http://opentx.blinkt.de:8080/~opentx/build-opentx.py?branch=${branch}\&suffix=${suffix}
|
||||
wget -O opentx-companion-${version}${suffix}.dmg http://opentx.blinkt.de:8080/~opentx/builds/opentx-companion-${version}${suffix}.dmg
|
||||
chmod -Rf g+w opentx-companion-${version}${suffix}.dmg
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue