diff options
author | bartus | 2019-08-21 23:19:59 +0200 |
---|---|---|
committer | bartus | 2019-08-26 11:22:52 +0200 |
commit | c08839b34490a00b156a2861cea98acadc075230 (patch) | |
tree | e35c5cbbe0734f0431df5509b77b34461725f828 | |
parent | 10489a906bbf08d53e912f2cdb0f32e98096c418 (diff) | |
download | aur-c08839b34490a00b156a2861cea98acadc075230.tar.gz |
Travis CI
-rw-r--r-- | .travis.yml | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000000..eaf2ba462905 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,108 @@ +sudo: required +language: c + +branches: + only: + - master + +cache: + directories: + - ~/.ccache + - ~/.pkg-cache + - ~/.cache/yay + - alice-vision + - geogram + - MeshSDFilter + - nanoflann + - osi_clp + - ute_lib + +addons: + apt: + packages: + - moreutils + +services: +- docker + +arch: + mount: + - ~/.ccache:~/.ccache + - ~/.pkg-cache:/var/cache/pacman/pkg + - ~/.cache/yay:~/.cache/yay + repos: + - bartus=https://github.com/bartoszek/AUR-repo/raw/master + packages: + - ccache + - moreutils + - cuda + - openblas-lapack + - opengv-git + - flann + - coin-or-lemon + - gcc-fortran + - gsl + - ceres-solver + before_install: +# 1.Override `package-cleanup.hook` to preserve cache for travis. +# 2.Enable ccache +# 3.Multithreaded build and compress +# 4.Suppress all gcc warnings + - | + sudo mkdir /etc/pacman.d/hooks/ + sudo ln -s /dev/null /etc/pacman.d/hooks/package-cleanup.hook + sudo sed -i '/^BUILDENV/s/\!ccache/ccache/' /etc/makepkg.conf + sudo sed -i '/#MAKEFLAGS=/c MAKEFLAGS="-j2"' /etc/makepkg.conf + sudo sed -i '/^COMPRESSXZ/s/\xz/xz -T 2/' /etc/makepkg.conf + sudo sed -i '$a CFLAGS="$CFLAGS -w"' /etc/makepkg.conf + sudo sed -i '$a CXXFLAGS="$CXXFLAGS -w"' /etc/makepkg.conf + script: +# Incorporate ccache in nvcc + - | + _gcc="$(readlink /opt/cuda/bin/gcc)" + _gpp="$(readlink /opt/cuda/bin/g++)" + sudo mv /opt/cuda/bin/nvcc /opt/cuda/bin/nvcc.bin + sudo rm /opt/cuda/bin/g{cc,++} + echo -e "#!/bin/sh -\n/usr/bin/ccache /opt/cuda/bin/nvcc.bin \"\$@\"" | sudo dd of=/opt/cuda/bin/nvcc + echo -e "#!/bin/sh -\n/usr/bin/ccache $_gcc \"\$@\"" | sudo dd of=/opt/cuda/bin/gcc + echo -e "#!/bin/sh -\n/usr/bin/ccache $_gpp \"\$@\"" | sudo dd of=/opt/cuda/bin/g++ + sudo chmod +x /opt/cuda/bin/{nvcc,g{cc,++}} +# Normalize TRAVIS variable + - | + [ "$TRAVIS" == "true" ] && TRAVIS=1 || TRAVIS=0 +# Build + - export CCACHE_LOGFILE=/tmp/ccache.log + - export CCACHE_MAXSIZE=2G + - export CCACHE_COMPILERCHECK=content + - export CCACHE_PCH_EXTSUM=True + - export CCACHE_SLOPPINESS=file_macro,include_file_ctime,include_file_mtime,locale,pch_defines,time_macros + - ccache -p +# - ccache -C + - ccache -s + - ccache -z + - | + sudo pacman -U --noconfirm /var/cache/pacman/pkg/magma-2.5.0-2-x86_64.pkg.tar.xz || { + git clone https://aur.archlinux.org/magma.git + pushd magma + git checkout 1e3ec19ca54c3 + timeout 35m makepkg -s --noconfirm > >(ts -s '[%.T]') || { makepkg -ceo; exit 314; } + cp magma-2.5.0-2-x86_64.pkg.tar.xz /var/cache/pacman/pkg + sudo pacman -U /var/cache/pacman/pkg/magma-2.5.0-2-x86_64.pkg.tar.xz + #sudo pacman -S magma + } + - timeout 35m makepkg -s --noconfirm > >(ts -s '%.T'); _makepkg_return=$? + - sudo pacman -Sc --noconfirm + - ccache -s + - ccache -z + - exit $_makepkg_return +script: +#- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/base64-encode/arch-travis.sh| timeout 40m bash > >(ts| ts -r '[%M:%.S]') 2>&1" +- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/base64-encode/arch-travis.sh| timeout 40m bash" +- "echo pacman pkg cache size: $(du -h ~/.pkg-cache|cut -f1) in $(ls ~/.pkg-cache|wc -l) files" + +#deploy: +# on: +# branch: master +# skip_cleanup: true +# provider: script +# script: bash .travis_deploy.sh |