-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
52 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
sudo: false
language: cpp
matrix:
include:
# Linux GCC Builds
- os: linux
compiler: gcc
addons: &gcc9
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ['g++-9', 'gcc-9']
env: GCCVER='9' CXX_COMPILER='g++-9' C_COMPILER='gcc-9'
# 4/ OSX GCC Builds
- os: osx
compiler: gcc
addons:
homebrew:
packages:
- gcc
update: true
env: GCCVER='9' CXX_COMPILER='g++-9' C_COMPILER='gcc-9'
before_script:
## OSX
- cd ${TRAVIS_BUILD_DIR}
- export CXX=${CXX_COMPILER}
- export CC=${C_COMPILER}
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export TARGETBRANCH=osx ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rm louvain-generic/Makefile ; cp louvain-generic/Makefile.osx louvain-generic/Makefile ; fi
# linux only
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export AR=gcc-ar-${GCCVER} ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export RANLIB=gcc-ranlib-${GCCVER} ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export NM=gcc-nm-${GCCVER} ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export TARGETBRANCH=gh-pages ; fi
# build
script :
- ./tag.sh
- ./build_louvain.sh
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mv website/louvain_linux.tar.gz website/louvain_osx.tar.gz ; fi
- ls -lah website/
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
local_dir: website/
target_branch: $TARGETBRANCH
on:
branch: master