aboutsummarylogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorbartus2019-07-23 09:20:44 +0200
committerbartus2019-07-23 09:20:44 +0200
commitc96154ff966f589e8e989eeb92c20d01c2bab8b6 (patch)
tree3a77567ff0a82fbb5827fcb43db76b13f33de238 /.travis.yml
parentb9567ba8b2ec54fa0f9ba6328334907a0326f4ba (diff)
downloadaur-c96154ff966f589e8e989eeb92c20d01c2bab8b6.tar.gz
Travis: build branch master
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml76
1 files changed, 70 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index f3a6a94f5381..08c39be7838f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,73 @@
-# blocklist
-branches:
- except:
- - /.*/
+sudo: required
-# safelist
branches:
only:
- - /^travis.*$/
+ - /.*/
+
+cache:
+ directories:
+ - ~/.ccache
+ - ~/.pkg-cache
+ - blender-addons-contrib.git
+ - blender-addons.git
+ - blender-dev-tools.git
+ - blender-translations.git
+ - blender
+
+services:
+- docker
+
+arch:
+ mount:
+ - ~/.ccache:~/.ccache
+ - ~/.pkg-cache:/var/cache/pacman/pkg
+ repos:
+ - bartus=https://github.com/bartoszek/AUR-repo/raw/master
+ packages:
+ - ccache
+ - moreutils
+ - cuda
+ 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 status=none
+ echo -e "#!/bin/sh -\n/usr/bin/ccache $_gcc \"\$@\"" | sudo dd of=/opt/cuda/bin/gcc status=none
+ echo -e "#!/bin/sh -\n/usr/bin/ccache $_gpp \"\$@\"" | sudo dd of=/opt/cuda/bin/g++ status=none
+ sudo chmod +x /opt/cuda/bin/{nvcc,g{cc,++}}
+# Normalize TRAVIS variable
+ - |
+ [ "$TRAVIS" == "true" ] && TRAVIS=1 || TRAVIS=0
+# Build
+ - ccache -s
+ - timeout 30m makepkg -s --noconfirm | ts -s '[%.T]'
+ - _makepkg_return=${PIPESTATUS[0]}
+ - sudo pacman -Sc --noconfirm
+ - ccache -s
+ - exit $_makepkg_return
+script:
+- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/base64-encode/arch-travis.sh| 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