Skip to content

Commit

Permalink
Merge pull request #37 from purduesigbots/evn-jenkins-update for rele…
Browse files Browse the repository at this point in the history
…ase 2.12.1
  • Loading branch information
HotelCalifornia committed Oct 15, 2017
2 parents 95fc9b9 + 256b455 commit b402191
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 39 deletions.
44 changes: 7 additions & 37 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,10 @@
stage('Build') {
def build_ver = '2.11.0'
node('win') {
def venv = new edu.purdue.pros.venv()
stage('Clean') {
if(isUnix()) {
sh 'git init'
sh 'git clean -x -d -f'
} else {
bat 'git init'
bat 'git clean -x -d -f'
}
}
stage('PROS CLI') {
tool 'python3'
if(isUnix()) {
sh 'sudo apt-get install -y python3-pip'
}
venv.create_virtualenv()
venv.run 'pip3 install --no-cache-dir git+git://github.com/purduesigbots/pros-cli.git@master', sudo = true
}
stage('Clone') {
checkout scm
if(isUnix()) {
sh 'git describe --tags > version'
} else {
bat 'git describe --tags > version'
}
build_ver = readFile 'version'
echo "Build PROS at version ${build_ver}"
}
toolchain_dir = tool 'arm-gcc'
withEnv(["PROS_TOOLCHAIN=${toolchain_dir}"]) {
venv.run 'pros conduct first-run --use-defaults --no-download --no-force'
venv.run 'pros make template'
}
zip archive: true, dir: 'template', glob: '', zipFile: "kernel-template.zip"
node('linux&&prostools') {
checkout scm
sh '''
sudo pip3 install vex
vex -mr kernel ./build.sh
'''
archiveArtifacts artifacts: 'kernel-template.zip', onlyIfSuccessful: true
}
}

6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ OUT:=$(BINDIR)/$(OUTNAME)
.PHONY: all clean documentation library template flash upload upload-legacy _force_look release develop

# default version just uses the latest tag
VERSION := `git describe --abbrev=0`
VERSION := `git describe --dirty --abbrev`

# By default, compile program
all: $(BINDIR) $(OUT)
Expand Down Expand Up @@ -73,7 +73,9 @@ template: library
mkdir -p $(ROOT)/template/src $(ROOT)/template/include $(ROOT)/template/firmware
$(foreach f,$(TEMPLATEFILES),cp -r $(ROOT)/$(f) $(ROOT)/template/$(f); )
cp $(BINDIR)/$(LIBNAME).a $(ROOT)/template/firmware/$(LIBNAME).a
pros conduct create-template kernel $(VERSION) pros-mainline --location $(ROOT)/template -u "firmware/$(LIBNAME).a" -u "include/API.h" -u "common.mk" -i "template.pros"
pros conduct create-template kernel $(VERSION) $(ROOT)/template -u "firmware/$(LIBNAME).a" -u "include/API.h" -u "common.mk" -i "template.pros"
cd $(ROOT)/template && zip -r ../kernel-template *


# Builds the documentation
documentation:
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

pip3 install --no-cache-dir git+git://github.com/purduesigbots/pros-cli.git@master
pros conduct first-run --no-force --use-defaults --no-download --apply-providers
pros make template

0 comments on commit b402191

Please sign in to comment.