zig/.travis.yml
2017-08-26 00:34:40 -04:00

25 lines
1.0 KiB
YAML

dist: trusty
sudo: required
language: cpp
before_install:
- sudo sh -c 'echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main" >> /etc/apt/sources.list'
- wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -q
install:
- sudo apt-get remove -y llvm-*
- sudo rm -rf /usr/local/*
- sudo apt-get install -y clang-5.0 libclang-5.0 libclang-5.0-dev llvm-5.0 llvm-5.0-dev liblld-5.0 liblld-5.0-dev cmake
script:
- export CC=clang-5.0
- export CXX=clang++-5.0
- which $CC
- which $CXX
- echo $PATH
- mkdir build
- cd build
- cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd) -DZIG_LIBC_LIB_DIR=$(dirname $($CC -print-file-name=crt1.o)) -DZIG_LIBC_INCLUDE_DIR=$(echo -n | $CC -E -x c - -v 2>&1 | grep -B1 "End of search list." | head -n1 | cut -c 2- | sed "s/ .*//") -DZIG_LIBC_STATIC_LIB_DIR=$(dirname $($CC -print-file-name=crtbegin.o))
- make VERBOSE=1
- make install
- ./zig build --build-file ../build.zig test