forked from keylime/keylime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (34 loc) · 1.24 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
language: ruby
sudo: required
# If the change is a markdown file, don't run CI build. Or at a later point
# we can set a specific job in here (such as a markdown lint)
before_install:
- |
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH"
fi
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^doc)/' || {
echo "Only documentation files were updated, stopping build process."
exit
}
env:
global:
- container_id: $(mktemp)
- tpm12image: lukehinds/keylime-ci-tpm12
tpm12tag: v500
- tpm20image: lukehinds/keylime-ci-tpm20
tpm20tag: v501
services:
- docker
before_install:
- 'sudo docker pull ${tpm12image}:${tpm12tag}'
- 'sudo docker pull ${tpm20image}:${tpm20tag}'
script:
# Run TPM 2.0 Tests
- docker run --detach --privileged -v $(pwd):/root/keylime -v /sys/fs/cgroup:/sys/fs/cgroup:ro ${tpm20image}:${tpm20tag} > ${container_id}
- docker exec -u 0 -it --tty "$(cat ${container_id})" /bin/bash /root/keylime/.ci/test_wrapper.sh
# Run TPM 1.2 Tests
- >
docker run --privileged -v $(pwd):/root/keylime -it ${tpm12image}:${tpm12tag}
/bin/sh -c 'cd /root/keylime/test; chmod +x ./run_tests.sh; ./run_tests.sh -s openssl'