add Jenkinsfile to test each PR and branch commits

This includes a basic test that attempts to compile the rustfmt crate.
Ensures that the workspace is always removed at the end of the build. It
utilizes available caches to speed up the build process and parallelizes
the build across i386, x86_64, arm32, and arm64 targets.

Signed-off-by: Derek Straka <derek@asterius.io>
This commit is contained in:
Derek Straka
2016-10-28 13:34:49 -05:00
committed by Doug Goldstein
parent 4622bd49e9
commit e8acf1decf
5 changed files with 58 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash -e
sudo umount build
exit 0
+6 -2
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -x
# the repos we want to check out, must setup variables below
# NOTE: poky must remain first
@@ -33,7 +33,11 @@ update_repo() {
git fetch origin || die "unable to fetch ${uri}"
else
echo "Cloning '${path}'"
git clone ${uri} ${path} || die "unable to clone ${uri}"
if [ -z "${GIT_LOCAL_REF_DIR}" ]; then
git clone ${uri} ${path} || die "unable to clone ${uri}"
else
git clone --reference ${GIT_LOCAL_REF_DIR}/`basename ${path}` ${uri} ${path}
fi
pushd ${path} > /dev/null
fi
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash -e
mkdir -p build
sudo mount -t tmpfs -o size=64G,mode=755,uid=${UID} tmpfs build
exit 0