Skip to content

Commit

Permalink
CI: removed px4 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Dec 22, 2018
1 parent f056391 commit 9596358
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 249 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ matrix:
include:
- if: type != cron
compiler: "gcc"
env: CI_BUILD_TARGET="px4-v2 revo-bootloader iofirmware"
env: CI_BUILD_TARGET="revo-bootloader iofirmware"
- compiler: "gcc"
env: CI_BUILD_TARGET="px4-v4 revo-mini"
env: CI_BUILD_TARGET="revo-mini"
- if: type != cron
compiler: "gcc"
env: CI_BUILD_TARGET="sitltest-copter"
Expand Down
9 changes: 4 additions & 5 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ list some basic and more used commands as example.
supported and the next section shows how to get a full list of them.

```sh
./waf configure --board fmuv3
./waf configure --board CubeBlack
./waf copter
```

Expand Down Expand Up @@ -62,10 +62,9 @@ list some basic and more used commands as example.
./waf configure --board fmuv3 # Pixhawk2/Cube using ChibiOS
./waf configure --board fmuv4 # Pixracer using ChibiOS
./waf configure --board navio2 # emlid navio2
./waf configure --board px4-v1 # the very old two layer Pixhawk (almost none exist)
./waf configure --board px4-v2 # older Pixhawks that suffer from the 1MB flash limit issue
./waf configure --board px4-v3 # Pixhawk2/Cube and newer Pixhawks with no 1MB flash limit issue
./waf configure --board px4-v4 # Pixracer
./waf configure --board Pixhawk1 # Pixhawk1
./waf configure --board CubeBlack # Pixhawk2
./waf configure --board Pixracer # Pixracer
./waf configure --board skyviper-v2450 # SkyRocket's SkyViper GPS drone using ChibiOS
./waf configure --board sitl # software-in-the-loop simulator
./waf configure --board sitl --debug # software-in-the-loop simulator with debug symbols
Expand Down
21 changes: 1 addition & 20 deletions Tools/autotest/autotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,24 +116,9 @@ def build_binaries():
return True


def build_devrelease():
"""Run the build_devrelease.sh script."""
print("Running build_devrelease.sh")
# copy the script as it changes git branch, which can change the
# script while running
orig = util.reltopdir('Tools/scripts/build_devrelease.sh')
copy = util.reltopdir('./build_devrelease.sh')
shutil.copy2(orig, copy)

if util.run_cmd(copy, directory=util.reltopdir('.')) != 0:
print("Failed build_devrelease.sh")
return False
return True


def build_examples():
"""Build examples."""
for target in 'fmuv2', 'px4-v2', 'navio', 'linux':
for target in 'fmuv2', 'Pixhawk1', 'navio', 'linux':
print("Running build.examples for %s" % target)
try:
util.build_examples(target)
Expand Down Expand Up @@ -434,9 +419,6 @@ def run_step(step):
if step == 'build.Binaries':
return build_binaries()

if step == 'build.DevRelease':
return build_devrelease()

if step == 'build.examples':
return build_examples()

Expand Down Expand Up @@ -722,7 +704,6 @@ def run_tests(steps):
'prerequisites',
'build.All',
'build.Binaries',
# 'build.DevRelease',
'build.Parameters',

'build.unit_tests',
Expand Down
23 changes: 0 additions & 23 deletions Tools/scripts/build_all_px4.sh

This file was deleted.

82 changes: 1 addition & 81 deletions Tools/scripts/build_binaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def build_vehicle(self, tag, vehicle, boards, vehicle_binaries_subdir,
"bin",
"".join([binaryname, framesuffix]))
files_to_copy = []
for extension in [".px4", ".apj", ".abin", "_with_bl.hex", ".hex"]:
for extension in [".apj", ".abin", "_with_bl.hex", ".hex"]:
filepath = "".join([bare_path, extension])
if os.path.exists(filepath):
files_to_copy.append(filepath)
Expand All @@ -402,86 +402,6 @@ def build_vehicle(self, tag, vehicle, boards, vehicle_binaries_subdir,
self.touch_filepath(os.path.join(self.binaries,
vehicle_binaries_subdir, tag))

# PX4-building
board = "px4"
for frame in frames:
self.progress("Building frame %s for board %s" % (frame, board))
if frame is None:
framesuffix = ""
else:
framesuffix = "-%s" % frame

if not self.checkout(vehicle, tag, "PX4", frame):
msg = ("Failed checkout of %s %s %s %s" %
(vehicle, "PX4", tag, frame))
self.progress(msg)
self.error_strings.append(msg)
self.checkout(vehicle, "latest")
continue

try:
deadwood = "../Build.%s" % vehicle
if os.path.exists(deadwood):
self.progress("#### Removing (%s)" % deadwood)
shutil.rmtree(os.path.join(deadwood))
except Exception as e:
self.progress("FIXME: narrow exception (%s)" % repr(e))

self.progress("Building %s %s PX4%s binaries" %
(vehicle, tag, framesuffix))
ddir = os.path.join(self.binaries,
vehicle_binaries_subdir,
self.hdate_ym,
self.hdate_ymdhm,
"".join(["PX4", framesuffix]))
if self.skip_build(tag, ddir):
continue

for v in ["v1", "v2", "v3", "v4", "v4pro"]:
px4_v = "%s-%s" % (board, v)

if self.skip_board_waf(px4_v):
continue

if os.path.exists(self.buildroot):
shutil.rmtree(self.buildroot)

self.progress("Configuring for %s in %s" %
(px4_v, self.buildroot))
try:
self.run_waf(["configure", "--board", px4_v,
"--out", self.buildroot, "clean"])
except subprocess.CalledProcessError as e:
self.progress("waf configure failed")
continue
try:
self.run_waf([
"build",
"--targets",
os.path.join("bin",
"".join([binaryname, framesuffix]))])
except subprocess.CalledProcessError as e:
msg = ("Failed build of %s %s%s %s for %s" %
(vehicle, board, framesuffix, tag, v))
self.progress(msg)
self.error_strings.append(msg)
continue

oldfile = os.path.join(self.buildroot, px4_v, "bin",
"%s%s.px4" % (binaryname, framesuffix))
newfile = "%s-%s.px4" % (px4_binaryname, v)
self.progress("Copying (%s) to (%s)" % (oldfile, newfile,))
try:
shutil.copyfile(oldfile, newfile)
except Exception as e:
self.progress("FIXME: narrow exception (%s)" % repr(e))
msg = ("Failed build copy of %s PX4%s %s for %s" %
(vehicle, framesuffix, tag, v))
self.progress(msg)
self.error_strings.append(msg)
continue
# FIXME: why the two stage copy?!
self.copyit(newfile, ddir, tag, vehicle)
self.checkout(vehicle, "latest")

def common_boards(self):
Expand Down
23 changes: 1 addition & 22 deletions Tools/scripts/build_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ export BUILDROOT=/tmp/ci.build
rm -rf $BUILDROOT
export GIT_VERSION="ci_test"
export NUTTX_GIT_VERSION="ci_test"
export PX4_GIT_VERSION="ci_test"
export CHIBIOS_GIT_VERSION="ci_test"
export CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
autotest_args=""

# If CI_BUILD_TARGET is not set, build 3 different ones
if [ -z "$CI_BUILD_TARGET" ]; then
CI_BUILD_TARGET="sitl linux px4-v2"
CI_BUILD_TARGET="sitl linux"
fi

declare -A waf_supported_boards
Expand Down Expand Up @@ -116,26 +115,6 @@ for t in $CI_BUILD_TARGET; do
continue
fi

# only do make-based builds for GCC, when target is PX4-v3 or build is launched by a scheduled job and target is a PX4 board or SITL
if [[ "$cxx_compiler" != "clang++" && ($t == "px4-v3" || (-n ${CI_CRON_JOB+1} && ($t == "px4"* || $t == "sitl"))) ]]; then
echo "Starting make based build for target ${t}..."
for v in "ArduPlane" "ArduCopter" "APMrover2" "ArduSub" "AntennaTracker"; do
echo "Building $v for ${t}..."

pushd $v
make clean
if [[ $t == "px4"* ]]; then
make px4-cleandep
fi

start_time=$(get_time)
make "$t" -j$(nproc)
diff_time=$(($(get_time)-$start_time))
echo -e "\033[32m'make' finished successfully (${diff_time}s)\033[0m"
popd
done
fi

if [[ -n ${waf_supported_boards[$t]} && -z ${CI_CRON_JOB+1} ]]; then
echo "Starting waf build for board ${t}..."
$waf configure --board "$t" \
Expand Down
93 changes: 0 additions & 93 deletions Tools/scripts/build_devrelease.sh

This file was deleted.

2 changes: 1 addition & 1 deletion Tools/scripts/build_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def run(self):
if __name__ == '__main__':

parser = optparse.OptionParser("build_examples.py")
parser.add_option("--target", type='string', default=['navio','px4-v2'], help='list of targets for which to build examples', action='append')
parser.add_option("--target", type='string', default=['navio','Pixhawk1'], help='list of targets for which to build examples', action='append')
parser.add_option("--clean", action='store_true', default=False, help='clean build')
opts, args = parser.parse_args()

Expand Down
2 changes: 1 addition & 1 deletion Tools/vagrant/shellinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ cd $APMROOT/ArduCopter
echo "Ardupilot environment ready. Run 'sim_vehicle.py' to start simulating an arducopter instance."
echo "To build for fmuv2:"
echo " cd /vagrant"
echo " ./waf configure --board=px4-v2"
echo " ./waf configure --board=Pixhawk1"
echo " ./waf build --target=bin/arducopter"
1 change: 0 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# xterm # X11 forwarding should work
# sim_vehicle.py --debug --gdb
# sim_vehicle.py --valgrind
# time (cd /vagrant && ./waf configure --board=px4-v2 && ./waf build --target=bin/ardusub) # ~17 minutes
# time (cd /vagrant && ./waf configure --board=fmuv2 && ./waf build --target=bin/ardusub) # ~9 minutes
# time (cd /vagrant && ./waf configure --board=fmuv3 && ./waf build --target=bin/ardusub) # ~ minutes (after building fmuv2)
# time (cd /vagrant && ./waf configure --board=navio2 && ./waf build --target=bin/arduplane)
Expand Down

0 comments on commit 9596358

Please sign in to comment.