[#14] Parallelize Subproject CI Builds and Pull Pre-Built Image

This commit is contained in:
apldev3 2018-09-26 14:40:23 -04:00
parent 4bb5fae0a4
commit e711f9df55
3 changed files with 22 additions and 6 deletions

View File

@ -5,11 +5,22 @@ sudo: true
language: java
env:
matrix:
- SUBPROJECT=HIRS_Utils
- SUBPROJECT=HIRS_Provisioner
- SUBPROJECT=HIRS_ProvisionerTPM2
- SUBPROJECT=HIRS_Structs
- SUBPROJECT=HIRS_AttestationCA
- SUBPROJECT=HIRS_AttestationCAPortal
- SUBPROJECT=TPM_Utils
- SUBPROJECT=tpm_module
services:
- docker
before_install:
- docker build -t hirs-centos7 .
- docker pull hirs/hirs-ci:centos7
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
@ -22,5 +33,4 @@ cache:
install: true
script:
- docker run --rm hirs-centos7 /bin/bash -c "cd /root/HIRS; git checkout ${TRAVIS_BRANCH}; make -C tpm_module/"
- docker run --rm hirs-centos7 /bin/bash -c "cd /root/HIRS; git checkout ${TRAVIS_BRANCH}; ./gradlew build"
- docker run --rm hirs/hirs-ci:centos7 /bin/bash -c "cd /root/HIRS; git checkout ${TRAVIS_BRANCH}; ./gradlew :$SUBPROJECT:build"

View File

@ -5,4 +5,5 @@ include 'TPM_Utils',
'HIRS_ProvisionerTPM2',
'HIRS_Structs',
'HIRS_AttestationCA',
'HIRS_AttestationCAPortal'
'HIRS_AttestationCAPortal',
'tpm_module'

View File

@ -1,10 +1,15 @@
task build(type:Exec) {
task make(type: Exec) {
outputs.file 'tpm_module'
inputs.dir fileTree(dir: '.').include('main.cpp').include('*.hpp')
commandLine 'make'
}
task clean() {
task cleanUp() {
delete 'tpm_module', 'main.d', 'main.o'
}
task fullBuild(type: GradleBuild) {
tasks = ['cleanUp', 'make']
}
build.dependsOn tasks.fullBuild