Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
174 lines (159 sloc) 4.8 KB
language: cpp
jobs:
include:
- os: linux
- os: osx
addons:
apt:
update: true
packages:
- libsnappy-dev
- binutils-dev
- libomp-dev
- libunwind-dev
- texinfo
- python3
- python3-pip
- python3-setuptools
- python-sphinx
- doxygen
homebrew:
update: true
packages:
- snappy
- binutils
- libomp
- texinfo
- python3
- sphinx-doc
- doxygen
- cmake
- wget
before_install:
# build and cache LLVM/Tapir:
- |
if [[ -z "$(ls -A ${TRAVIS_BUILD_DIR}/Tapir-LLVM)" ]]; then
git clone -b release_60-release https://github.com/seq-lang/Tapir-LLVM ${TRAVIS_BUILD_DIR}/Tapir-LLVM
mkdir ${TRAVIS_BUILD_DIR}/Tapir-LLVM/build
cd ${TRAVIS_BUILD_DIR}/Tapir-LLVM/build
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
export LLVM_BINUTILS_INCDIR=/usr/include
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
export LLVM_BINUTILS_INCDIR=/usr/local/opt/binutils/include
fi
cmake .. -DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_RTTI=ON \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_TARGETS_TO_BUILD=host
cmake --build . --config Release
cd -
fi
# install OCaml:
- export OCAML_VERSION=4.07
- |
if [[ -z "$(ls -A ${HOME}/.opam)" ]]; then
wget https://raw.githubusercontent.com/ocaml/ocaml-ci-scripts/master/.travis-ocaml.sh
bash -ex .travis-ocaml.sh
opam update
opam install -y ocamlfind dune menhir
sudo cp /usr/local/bin/opam ${HOME}/.opam/
else
sudo cp ${HOME}/.opam/opam /usr/local/bin/
fi
- eval $(opam env)
# fix Python:
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then brew link --overwrite python3; fi
install:
# install libffi:
- wget -c https://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz -O - | tar -xz
- cd libffi-3.2.1
- ./configure CFLAGS="-fPIC" --enable-portable-binary --enable-static --disable-shared
- make LDFLAGS="-static"
- sudo make install
- cd -
# install Boehm GC:
- wget -c https://github.com/ivmai/bdwgc/releases/download/v8.0.4/gc-8.0.4.tar.gz -O - | tar -xz
- cd gc-8.0.4
- mkdir release
- |
./configure CFLAGS="-fPIC" --enable-threads=posix \
--enable-cplusplus \
--enable-thread-local-alloc \
--enable-large-config \
--prefix=`pwd`/release
- make LDFLAGS="-static"
- make check
- make install
- cd -
# install htslib:
- wget -c https://github.com/samtools/htslib/releases/download/1.10.2/htslib-1.10.2.tar.bz2 -O - | tar -xj
- cd htslib-1.10.2
- ./configure CFLAGS="-fPIC" --disable-libcurl
- make
- sudo make install
- cd -
# install dependencies for docs:
- sudo pip3 install --upgrade pip
- sudo pip3 install wheel sphinx sphinx-rtd-theme breathe exhale
before_script:
- export PYTHONPATH="${TRAVIS_BUILD_DIR}/test/python"
- export LDFLAGS="-L/usr/local/lib"
- export GCLIB=$(realpath gc-8.0.4/release/lib/libgc.a)
- export CPATH=`pwd`/gc-8.0.4/release/include:${CPATH}
- export SEQ_PYTHON=$(python3 test/python/find-python-library.py)
- export SEQ_PATH="${TRAVIS_BUILD_DIR}/stdlib"
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo ldconfig; fi
script:
- mkdir build
- |
(cd build && cmake .. -DCMAKE_BUILD_TYPE=Release \
-DSEQ_THREADED=ON \
-DLLVM_DIR=`${TRAVIS_BUILD_DIR}/Tapir-LLVM/build/bin/llvm-config --cmakedir` \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DGC_LIB=${GCLIB})
- cmake --build build --config Release
- build/seqtest
- build/seqc test/core/helloworld.seq
- (cd docs/sphinx && make html 2> /dev/null)
before_deploy:
- export SEQ_BUILD_ARCHIVE=seq-`uname -s | awk '{print tolower($0)}'`-`uname -m`.tar.gz
- export SEQ_STDLIB_ARCHIVE=seq-stdlib.tar.gz
- tar -czf ${SEQ_BUILD_ARCHIVE} build
- tar -czf ${SEQ_STDLIB_ARCHIVE} stdlib
deploy:
- provider: releases
token: $GITHUB_TOKEN
file:
- ${SEQ_BUILD_ARCHIVE}
- ${SEQ_STDLIB_ARCHIVE}
skip_cleanup: true
on:
repo: seq-lang/seq
tags: true
- provider: pages
local_dir: docs/sphinx/_build/html
target_branch: gh-pages
fqdn: seq-lang.org
token: $GITHUB_TOKEN
committer_from_gh: true
keep_history: false
skip_cleanup: true
on:
branch: master
condition: $TRAVIS_OS_NAME = linux
cache:
timeout: 1000
directories:
- Tapir-LLVM
- $HOME/.opam
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/8bcb19a2bb1bab2a3b1b
on_success: change
on_failure: always
on_start: never
on_cancel: always
on_error: always
email: false
You can’t perform that action at this time.