forked from AdaCore/gnatcoll-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
58 lines (47 loc) · 1.5 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Global variables
language: python
python:
- "2.7"
env:
global:
- TOOLS_DIR=$HOME/build_tools
- GNAT_TAR_PATH=$TOOLS_DIR/gpl-2017-compiler.tar.gz
- LINUX_GNAT_URL=http://mirrors.cdn.adacore.com/art/591c6d80c7a447af2deed1d7
- DARWIN_GNAT_URL=http://mirrors.cdn.adacore.com/art/591c9045c7a447af2deed24e
os:
- linux
# Cache directory that allows us to not download GNAT GPL every time, speeding
# up the process.
cache:
directories:
- /home/travis/build_tools
- /Users/travis/build_tools
install:
# Check if the GNAT package is already available in the cache directory. If
# not, download it.
- >
test -f $GNAT_TAR_PATH ||
(mkdir -p $TOOLS_DIR &&
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
wget $DARWIN_GNAT_URL -O $GNAT_TAR_PATH
else
wget $LINUX_GNAT_URL -O $GNAT_TAR_PATH
fi
)
# Extract GNAT from its package
- (mkdir -p ada-compiler && cd ada-compiler && tar --strip-components 1 -xzf $GNAT_TAR_PATH)
# Add GNAT to $PATH
- export PATH=$PWD/ada-compiler/bin:$PATH
# Checkout gprbuild
- git clone https://github.com/AdaCore/gprbuild libgpr-src
# Add e3-testsuite
- pip install git+https://github.com/AdaCore/e3-testsuite.git
script:
# Show GNAT version for the record
- $PWD/ada-compiler/bin/gprbuild --version
- (cd libgpr-src && make libgpr.build && make libgpr.install)
# Build gnatcoll-core
- make all
- (cd testsuite; ./run-tests --gcov)
after_success:
- bash <(curl -s https://codecov.io/bash)