-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
68 lines (54 loc) · 2.3 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
59
60
61
62
63
64
65
66
67
# Build matrix / environment variable are explained on:
# http://about.travis-ci.org/docs/user/build-configuration/
# This file can be validated on:
# http://lint.travis-ci.org/
language: cpp
dist: bionic
sudo: required
compiler:
- gcc
- clang
before_install:
- sudo apt-get update
# Ensure add-apt-repository is installed.
- sudo apt-get install software-properties-common
# LLVM
- sudo sh -c "echo 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main' >> /etc/apt/sources.list"
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
install:
# Install package dependencies.
# (Re-run this command a few times to handle random failures.)
-
for i in {1..5}; do
if sudo apt-get update && sudo apt-get install -y --force-yes llvm-$LLVM_VERSION llvm-$LLVM_VERSION-dev clang-$LLVM_VERSION libconfig++-dev python-sphinx libboost-program-options-dev libboost-regex-dev libboost-system-dev libboost-filesystem-dev libcsfml-dev texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk; then
break;
fi;
sleep 1;
done
# Install lit (from LLVM) for testing.
- sudo pip install lit
# Use the previously installed clang version (since installing one tends to remove another).
-
if [[ "${CXX}" == "clang++" ]]; then
export CXX="clang++-$LLVM_VERSION";
fi
before_script:
- mkdir build
- cd build
script:
# Make sure we use the correct Clang binary.
- cmake -DCMAKE_BUILD_TYPE="$BUILD_TYPE" -DCLANG_BINARY_NAME="clang-$LLVM_VERSION" -DCMAKE_INSTALL_PREFIX=./artifacts/locic -DSPHINX_OUTPUT_PDF=ON ..
- make && ctest --output-on-failure
- make install
after_success:
- export LOCIC_ARTIFACTS_ARCHIVE="locic-artifacts-$TRAVIS_JOB_NUMBER-$TRAVIS_OS_NAME-$TRAVIS_BRANCH.tar.xz"
- tar cfJ "$LOCIC_ARTIFACTS_ARCHIVE" -C ./artifacts locic
- ../utils/upload_artifacts.py "$ARTIFACT_FTP_DOMAIN" "$ARTIFACT_FTP_USER" "$ARTIFACT_FTP_PASSWORD" "$LOCIC_ARTIFACTS_ARCHIVE"
-
if [ -n "$LOCIC_UPLOAD_DOCS" ]; then
../utils/upload_docs.py "$ARTIFACT_FTP_DOMAIN" "$ARTIFACT_FTP_USER" "$ARTIFACT_FTP_PASSWORD" "$TRAVIS_BRANCH" "./docs/html";
fi
env:
- BUILD_TYPE=Debug LLVM_VERSION="9"
- BUILD_TYPE=Release LLVM_VERSION="9" LOCIC_UPLOAD_DOCS=1