Add capability to build more firmwares than scheduled for tests (#510)
* Add capability to build more firmwares than scheduled for tests * Fixed casing for tx16s-fs target * Fixed target names in YAML & added new ones to fw.json * Remove unsupported "autoupdate" * Update nightly targets
This commit is contained in:
@@ -3,23 +3,22 @@ name: Run tests and package firmware
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '2.4'
|
- '2.4'
|
||||||
- 'main'
|
- 'main'
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
- '.github/ISSUE_TEMPLATE/**'
|
|
||||||
- 'companion/**'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- '2.4'
|
|
||||||
- 'main'
|
|
||||||
paths-ignore:
|
|
||||||
- '**.md'
|
|
||||||
- '.github/ISSUE_TEMPLATE/**'
|
|
||||||
- 'companion/**'
|
|
||||||
create:
|
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- '.github/ISSUE_TEMPLATE/**'
|
||||||
|
- 'companion/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '2.4'
|
||||||
|
- 'main'
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- '.github/ISSUE_TEMPLATE/**'
|
||||||
|
- 'companion/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -28,24 +27,24 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
target:
|
||||||
- NV14
|
- nv14
|
||||||
- T12
|
- t12
|
||||||
- T16
|
- t16
|
||||||
- T18
|
- t18
|
||||||
- T8
|
- t8
|
||||||
- TLITE
|
- tlite
|
||||||
- TX12
|
- tx12
|
||||||
- TX16S
|
- tx16s
|
||||||
- X10
|
- x10
|
||||||
- X12S
|
- x12s
|
||||||
- X7
|
- x7
|
||||||
- X9D
|
- x9d
|
||||||
- X9DP
|
- x9dp
|
||||||
- X9DP2019
|
- x9dp2019
|
||||||
- X9LITE
|
- x9lite
|
||||||
- X9LITES
|
- x9lites
|
||||||
- XLITE
|
- xlite
|
||||||
- XLITES
|
- xlites
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/edgetx/edgetx-commit-tests
|
image: ghcr.io/edgetx/edgetx-commit-tests
|
||||||
volumes:
|
volumes:
|
||||||
@@ -64,6 +63,38 @@ jobs:
|
|||||||
echo "Running commit tests"
|
echo "Running commit tests"
|
||||||
./tools/commit-tests.sh
|
./tools/commit-tests.sh
|
||||||
|
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: Run builds
|
||||||
|
needs: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target:
|
||||||
|
- nv14
|
||||||
|
- t12
|
||||||
|
- t16
|
||||||
|
- t18
|
||||||
|
- t8
|
||||||
|
- tlite
|
||||||
|
- tx12
|
||||||
|
- tx16s
|
||||||
|
- x10;x10-access
|
||||||
|
- x12s
|
||||||
|
- x7;x7-access
|
||||||
|
- x9d;x9dp;x9dp2019
|
||||||
|
- x9lite;x9lites
|
||||||
|
- xlite;xlites
|
||||||
|
container:
|
||||||
|
image: ghcr.io/edgetx/edgetx-commit-tests
|
||||||
|
volumes:
|
||||||
|
- ${{ github.workspace }}:/src
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Build ${{ matrix.target }}
|
- name: Build ${{ matrix.target }}
|
||||||
env:
|
env:
|
||||||
FLAVOR: ${{ matrix.target }}
|
FLAVOR: ${{ matrix.target }}
|
||||||
|
|||||||
@@ -18,24 +18,20 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target:
|
target:
|
||||||
- NV14
|
- nv14
|
||||||
- T12
|
- t12
|
||||||
- T16
|
- t16
|
||||||
- T18
|
- t18
|
||||||
- T8
|
- t8
|
||||||
- TLITE
|
- tlite
|
||||||
- TX12
|
- tx12
|
||||||
- TX16S
|
- tx16s
|
||||||
- X10
|
- x10;x10-access
|
||||||
- X12S
|
- x12s
|
||||||
- X7
|
- x7;x7-access
|
||||||
- X9D
|
- x9d;x9dp;x9dp2019
|
||||||
- X9DP
|
- x9lite;x9lites
|
||||||
- X9DP2019
|
- xlite;xlites
|
||||||
- X9LITE
|
|
||||||
- X9LITES
|
|
||||||
- XLITE
|
|
||||||
- XLITES
|
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/edgetx/edgetx-commit-tests
|
image: ghcr.io/edgetx/edgetx-commit-tests
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
"targets": [
|
"targets": [
|
||||||
["Flysky NV14", "nv14-"],
|
["Flysky NV14", "nv14-"],
|
||||||
["Frsky Horus X10", "x10-"],
|
["Frsky Horus X10", "x10-"],
|
||||||
|
["Frsky Horus X10 Access", "x10-access"],
|
||||||
["Frsky Horus X12s", "x12s-"],
|
["Frsky Horus X12s", "x12s-"],
|
||||||
["Frsky QX7", "x7-"],
|
["Frsky QX7", "x7-"],
|
||||||
|
["Frsky QX7 Access", "x7-access"],
|
||||||
["Frsky X9D", "x9d-"],
|
["Frsky X9D", "x9d-"],
|
||||||
["Frsky X9D Plus", "x9dp-"],
|
["Frsky X9D Plus", "x9dp-"],
|
||||||
["Frsky X9D Plus 2019", "x9dp2019-"],
|
["Frsky X9D Plus 2019", "x9dp2019-"],
|
||||||
|
|||||||
+105
-99
@@ -4,13 +4,20 @@
|
|||||||
set -e
|
set -e
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
# Allow variable core usage, default uses all cpu cores, to set 8 cores for example : commit-tests.sh -j8
|
# Allow variable core usage
|
||||||
num_cpus=$(nproc)
|
# default uses all cpu cores
|
||||||
|
#
|
||||||
|
if [ -f /usr/bin/nproc ]; then
|
||||||
|
num_cpus=$(nproc)
|
||||||
|
elif [ -f /usr/sbin/sysctl ]; then
|
||||||
|
num_cpus=$(sysctl -n hw.logicalcpu)
|
||||||
|
else
|
||||||
|
num_cpus=2
|
||||||
|
fi
|
||||||
: "${CORES:=$num_cpus}"
|
: "${CORES:=$num_cpus}"
|
||||||
# Default build treats warnings as errors, set -Wno-error to override, e.g.: commit-tests.sh -Wno-error
|
|
||||||
#: "${WERROR:=1}"
|
# If no build target, exit
|
||||||
# A board name to build for, or ALL
|
#: "${FLAVOR:=ALL}"
|
||||||
: "${FLAVOR:=ALL}"
|
|
||||||
|
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
do
|
do
|
||||||
@@ -34,115 +41,114 @@ case $i in
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
# Add GCC_ARM to PATH
|
||||||
SCRIPT=$(python -c 'import os,sys;print(os.path.realpath(sys.argv[1]))' "$0")
|
|
||||||
else
|
|
||||||
SCRIPT=$(readlink -f "$0")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n ${GCC_ARM} ]] ; then
|
if [[ -n ${GCC_ARM} ]] ; then
|
||||||
export PATH=${GCC_ARM}:$PATH
|
export PATH=${GCC_ARM}:$PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
: ${SRCDIR:=$(dirname "$SCRIPT")/..}
|
: ${SRCDIR:=$(dirname $(pwd)/"$0")/..}
|
||||||
|
|
||||||
: ${COMMON_OPTIONS:="-DCMAKE_BUILD_TYPE=Debug -DTRACE_SIMPGMSPACE=NO -DVERBOSE_CMAKELISTS=YES -DCMAKE_RULE_MESSAGES=OFF -Wno-dev "}
|
|
||||||
if (( $WERROR )); then COMMON_OPTIONS+=" -DWARNINGS_AS_ERRORS=YES -DMULTIMODULE=YES"; fi
|
|
||||||
|
|
||||||
|
: ${BUILD_TYPE:=Release}
|
||||||
|
: ${COMMON_OPTIONS:="-DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_RULE_MESSAGES=OFF -DDISABLE_COMPANION=YES -Wno-dev "}
|
||||||
: ${EXTRA_OPTIONS:="$EXTRA_OPTIONS"}
|
: ${EXTRA_OPTIONS:="$EXTRA_OPTIONS"}
|
||||||
|
|
||||||
COMMON_OPTIONS+=${EXTRA_OPTIONS}
|
COMMON_OPTIONS+=${EXTRA_OPTIONS}
|
||||||
|
|
||||||
: ${FIRMARE_TARGET:="firmware-size"}
|
: ${FIRMARE_TARGET:="firmware-size"}
|
||||||
|
|
||||||
mkdir build || true
|
# wipe build directory clean
|
||||||
cd build
|
rm -rf build && mkdir -p build && cd build
|
||||||
|
|
||||||
# wipe clean in case of serial builds in the same dir
|
GIT_SHA_SHORT=$(git rev-parse --short HEAD)
|
||||||
rm -rf ./* || true
|
|
||||||
|
|
||||||
BUILD_OPTIONS=${COMMON_OPTIONS}
|
|
||||||
|
|
||||||
GIT_SHA_SHORT=`git rev-parse --short HEAD`
|
|
||||||
#GIT_TAG=`git describe --tags`
|
#GIT_TAG=`git describe --tags`
|
||||||
|
|
||||||
target_name=`echo "$FLAVOR" | tr '[:upper:]' '[:lower:]'`
|
target_names=$(echo "$FLAVOR" | tr '[:upper:]' '[:lower:]' | tr ';' '\n')
|
||||||
fw_name="${target_name}-${GIT_SHA_SHORT}.bin"
|
|
||||||
|
|
||||||
echo "Building ${fw_name}"
|
for target_name in $target_names
|
||||||
|
do
|
||||||
|
fw_name="${target_name}-${GIT_SHA_SHORT}.bin"
|
||||||
|
BUILD_OPTIONS=${COMMON_OPTIONS}
|
||||||
|
|
||||||
case $FLAVOR in
|
echo "Building ${fw_name}"
|
||||||
|
case $target_name in
|
||||||
|
|
||||||
X9LITE)
|
x9lite)
|
||||||
BUILD_OPTIONS+="-DPCB=X9LITE"
|
BUILD_OPTIONS+="-DPCB=X9LITE"
|
||||||
;;
|
;;
|
||||||
X9LITES)
|
x9lites)
|
||||||
BUILD_OPTIONS+="-DPCB=X9LITES"
|
BUILD_OPTIONS+="-DPCB=X9LITES"
|
||||||
;;
|
;;
|
||||||
X7)
|
x7)
|
||||||
BUILD_OPTIONS+="-DPCB=X7"
|
BUILD_OPTIONS+="-DPCB=X7"
|
||||||
;;
|
;;
|
||||||
T12)
|
x7-access)
|
||||||
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=T12 -DINTERNAL_MODULE_MULTI=ON"
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=ACCESS -DPXX1=YES"
|
||||||
;;
|
;;
|
||||||
TX12)
|
t12)
|
||||||
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TX12"
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=T12 -DINTERNAL_MODULE_MULTI=ON"
|
||||||
;;
|
;;
|
||||||
T8)
|
tx12)
|
||||||
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=T8"
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TX12"
|
||||||
;;
|
;;
|
||||||
TLITE)
|
t8)
|
||||||
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITE"
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=T8"
|
||||||
;;
|
;;
|
||||||
XLITE)
|
tlite)
|
||||||
BUILD_OPTIONS+="-DPCB=XLITE"
|
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=TLITE"
|
||||||
;;
|
;;
|
||||||
XLITES)
|
xlite)
|
||||||
BUILD_OPTIONS+="-DPCB=XLITES"
|
BUILD_OPTIONS+="-DPCB=XLITE"
|
||||||
;;
|
;;
|
||||||
X9D)
|
xlites)
|
||||||
BUILD_OPTIONS+="-DPCB=X9D"
|
BUILD_OPTIONS+="-DPCB=XLITES"
|
||||||
;;
|
;;
|
||||||
X9DP)
|
x9d)
|
||||||
BUILD_OPTIONS+="-DPCB=X9D+"
|
BUILD_OPTIONS+="-DPCB=X9D"
|
||||||
;;
|
;;
|
||||||
X9DP2019)
|
x9dp)
|
||||||
BUILD_OPTIONS+="-DPCB=X9D+ -DPCBREV=2019"
|
BUILD_OPTIONS+="-DPCB=X9D+"
|
||||||
;;
|
;;
|
||||||
X9E)
|
x9dp2019)
|
||||||
BUILD_OPTIONS+="-DPCB=X9E"
|
BUILD_OPTIONS+="-DPCB=X9D+ -DPCBREV=2019"
|
||||||
;;
|
;;
|
||||||
X10)
|
x9e)
|
||||||
BUILD_OPTIONS+="-DPCB=X10"
|
BUILD_OPTIONS+="-DPCB=X9E"
|
||||||
;;
|
;;
|
||||||
X12S)
|
x10)
|
||||||
BUILD_OPTIONS+="-DPCB=X12S"
|
BUILD_OPTIONS+="-DPCB=X10"
|
||||||
;;
|
;;
|
||||||
T16)
|
x10-access)
|
||||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON"
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=ACCESS -DPXX1=YES"
|
||||||
;;
|
;;
|
||||||
T16_FS)
|
x12s)
|
||||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON -DFLYSKY_HALL_STICKS=ON"
|
BUILD_OPTIONS+="-DPCB=X12S"
|
||||||
;;
|
;;
|
||||||
T18)
|
t16)
|
||||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18"
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON"
|
||||||
;;
|
;;
|
||||||
T18_FS)
|
t16-fs)
|
||||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18 -DFLYSKY_HALL_STICKS=ON"
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T16 -DINTERNAL_MODULE_MULTI=ON -DFLYSKY_HALL_STICKS=ON"
|
||||||
;;
|
;;
|
||||||
TX16S)
|
t18)
|
||||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S"
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18"
|
||||||
;;
|
;;
|
||||||
TX16S_FS)
|
t18-fs)
|
||||||
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S -DFLYSKY_HALL_STICKS=ON"
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=T18 -DFLYSKY_HALL_STICKS=ON"
|
||||||
;;
|
;;
|
||||||
NV14)
|
tx16s)
|
||||||
BUILD_OPTIONS+="-DPCB=NV14"
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S"
|
||||||
;;
|
;;
|
||||||
esac
|
tx16s-fs)
|
||||||
|
BUILD_OPTIONS+="-DPCB=X10 -DPCBREV=TX16S -DFLYSKY_HALL_STICKS=ON"
|
||||||
|
;;
|
||||||
|
nv14)
|
||||||
|
BUILD_OPTIONS+="-DPCB=NV14"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
cmake ${BUILD_OPTIONS} "${SRCDIR}"
|
cmake ${BUILD_OPTIONS} "${SRCDIR}"
|
||||||
make -j"${CORES}" ${FIRMARE_TARGET}
|
make -j"${CORES}" ${FIRMARE_TARGET}
|
||||||
|
|
||||||
mv firmware.bin "../${fw_name}"
|
|
||||||
|
|
||||||
|
rm -f CMakeCache.txt
|
||||||
|
mv firmware.bin "../${fw_name}"
|
||||||
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user