forked from UMD-AOSC/UMD-SST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (38 loc) · 1006 Bytes
/
.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
40
41
42
43
44
language: cpp
services:
- docker
branches:
only:
- develop
- master
- "/.*/travisci_.*$/"
before_install:
- |
# prepare build directory
mkdir $HOME/build1
chmod 777 -R $HOME/build1
chmod 777 -R $TRAVIS_BUILD_DIR
- |
# prepare docker image
cd .github
docker build -t jcsda/dockerl2 .
docker images
docker run -d -t -e CI_USER_TOKEN \
-v $HOME/build1:/jcsda/build \
-v $TRAVIS_BUILD_DIR:/jcsda/src \
--name jcsda_container jcsda/dockerl2
docker ps -a
docker exec jcsda_container bash \
-c 'git config --global url.https://${CI_USER_TOKEN}@github.com/.insteadOf https://github.com/'
script:
- |
# build code
docker exec -it jcsda_container bash \
-c 'cd /jcsda/build && ecbuild -DBUILD_FCKIT=ON -DBUILD_ATLAS=ON /jcsda/src/bundle && cd umdsst && make -j 4; exit $?' \
|| travis_terminate 1
- |
# test code
docker exec -it jcsda_container bash \
-c 'cd /jcsda/build/umdsst && ctest --output-on-failure' \
|| travis_terminate 1
after_success: