Add azure pipeline (#10)

Closes #6.
pull/311/head
Peter Johnson 2018-12-25 15:57:40 -06:00 committed by GitHub
parent 3a1ecb9c97
commit b1877d5365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 9 deletions

8
.gitmodules vendored
View File

@ -1,12 +1,12 @@
[submodule "deps/robotpy-cscore"]
path = deps/robotpy-cscore
url = git@github.com:robotpy/robotpy-cscore.git
url = https://github.com/robotpy/robotpy-cscore.git
[submodule "deps/pynetworktables"]
path = deps/pynetworktables
url = git@github.com:robotpy/pynetworktables.git
url = https://github.com/robotpy/pynetworktables.git
[submodule "deps/allwpilib"]
path = deps/allwpilib
url = git@github.com:wpilibsuite/allwpilib.git
url = https://github.com/wpilibsuite/allwpilib.git
[submodule "deps/thirdparty-opencv"]
path = deps/thirdparty-opencv
url = git@github.com:wpilibsuite/thirdparty-opencv.git
url = https://github.com/wpilibsuite/thirdparty-opencv.git

12
azure-docker/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM debian:stretch-backports
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update \
&& apt-get -y install \
git vim parted \
quilt realpath qemu-user-static debootstrap zerofree pxz zip dosfstools \
bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file \
build-essential cmake python3 ant sudo \
&& apt-get -y -t stretch-backports install openjdk-11-jdk \
&& rm -rf /var/lib/apt/lists/*

26
azure-pipelines.yml Normal file
View File

@ -0,0 +1,26 @@
resources:
containers:
- container: pi-gen
image: wpilib/pi-gen:latest
options: --privileged
jobs:
- job: 'Main'
pool:
vmImage: 'Ubuntu 16.04'
container: pi-gen
steps:
- checkout: self
submodules: true
- script: |
cd deps && ./01-download.sh && ./02-extract.sh && ./03-build.sh && ./04-copy.sh
displayName: 'Build Image Dependencies'
- script: |
sudo sh -c 'dpkg-reconfigure qemu-user-static && ./build.sh'
cp deploy/*.zip $BUILD_ARTIFACTSTAGINGDIRECTORY
displayName: 'Build Image'
- task: PublishBuildArtifacts@1
inputs:
artifactName: 'FRCVisionImage'

10
deps/03-build.sh vendored
View File

@ -40,18 +40,18 @@ cmake ../../02-extract/opencv \
-DPYTHON3_NUMPY_INCLUDE_DIRS=${PWD}/../../02-extract/raspbian9/arm-raspbian9-linux-gnueabihf/usr/include/python3.5m/numpy \
-DOPENCV_EXTRA_FLAGS_DEBUG=-Og \
-DCMAKE_MODULE_PATH=${PWD}/../../thirdparty-opencv/arm-frc-modules \
|| die
make -j3 || die
make install || die
|| exit 1
make -j3 || exit 1
make install || exit 1
popd
# wpiutil, cscore, ntcore, cameraserver
pushd allwpilib
./gradlew -PonlyRaspbian :wpiutil:build :cscore:build :ntcore:build :cameraserver:build :cameraserver:multiCameraServer:build || die
./gradlew -PonlyRaspbian :wpiutil:build :cscore:build :ntcore:build :cameraserver:build :cameraserver:multiCameraServer:build || exit 1
popd
# tools
pushd tools
make || die
make || exit 1
popd