CI: added appveyor build of SITL for MissionPlanner

This commit is contained in:
Andrew Tridgell 2018-12-26 09:24:22 +11:00
parent 29042c95eb
commit cf582cdb12
2 changed files with 72 additions and 0 deletions

34
Tools/scripts/build_appveyor.sh Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
# script to build 32 bit cygwin binaries for SITL
export PATH="/usr/local/bin:/usr/bin:/bin"
export PATH
set -x
cd /cygdrive/c/work
# build for 32 bit target
CXX=i686-pc-cygwin-g++.exe CC=i686-pc-cygwin-gcc ./waf configure --board sitl
(
date
git submodule update --init --recursive -f
/usr/bin/python waf -j4 copter plane rover heli sub
# map to the names that MissionPlanner expects
cp /cygdrive/c/work/build/sitl/bin/ardurover.exe /cygdrive/c/work/sitl/APMrover2.elf
cp /cygdrive/c/work/build/sitl/bin/arduplane.exe /cygdrive/c/work/sitl/ArduPlane.elf
cp /cygdrive/c/work/build/sitl/bin/arducopter.exe /cygdrive/c/work/sitl/ArduCopter.elf
cp /cygdrive/c/work/build/sitl/bin/arducopter-heli.exe /cygdrive/c/work/sitl/ArduHeli.elf
cp /cygdrive/c/work/build/sitl/bin/ardusub.exe /cygdrive/c/work/sitl/ArduSub.elf
cp /usr/i686-pc-cygwin/sys-root/usr/bin/*.dll /cygdrive/c/work/sitl/
cd /cygdrive/c/work/sitl/
git log -1 > git.txt
ls
) > /cygdrive/c/work/sitl/build.txt 2>&1

38
appveyor.yml Normal file
View File

@ -0,0 +1,38 @@
version: 1.0.{build}
image: Visual Studio 2017 Preview
clone_depth: 1
clone_folder: C:\work\
init:
- cmd: git config --global core.autocrlf false
environment:
CYG_ROOT: C:\cygwin64
CYG_SETUP: setup-x86_64.exe
install:
- cmd: >-
curl -o setup-cygwin.exe https://www.cygwin.com/%CYG_SETUP%
setup-cygwin.exe --quiet-mode --no-shortcuts --only-site -R "%CYG_ROOT%" -P gcc-g++,git,procps,libexpat,python,python-setuptools,cygwin32-gcc-g++
dir %CYG_ROOT%
dir %CYG_ROOT%\bin
%CYG_ROOT%\bin\bash.exe -l -c "/usr/bin/easy_install-2.7 future"
build_script:
- cmd: >-
cd C:\work
mkdir c:\work\sitl
cd c:\work
%CYG_ROOT%\bin\sh.exe /cygdrive/c/work/Tools/scripts/build_appveyor.sh
cd c:\work\sitl
7z a C:\work\sitl.zip *
test: off
artifacts:
- path: sitl.zip
name: sitl