Skip to content

Commit

Permalink
[#14] Parallelize Subproject CI Builds and Pull Pre-Built Image
Browse files Browse the repository at this point in the history
  • Loading branch information
apldev3 committed Oct 12, 2018
1 parent 4bb5fae commit e711f9d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
16 changes: 13 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
3 changes: 2 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ include 'TPM_Utils',
'HIRS_ProvisionerTPM2',
'HIRS_Structs',
'HIRS_AttestationCA',
'HIRS_AttestationCAPortal'
'HIRS_AttestationCAPortal',
'tpm_module'
9 changes: 7 additions & 2 deletions tpm_module/build.gradle
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e711f9d

Please sign in to comment.