summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2019-07-17 09:15:07 +0200
committerbartus2019-07-17 09:23:10 +0200
commit707fef267b133fe5a7f561a803a324a1652ea08e (patch)
treea284021281198436b09ea0c14a0724be2aba54c0
parenta191a24b467574f507247decaa00a2133441170c (diff)
downloadaur-707fef267b133fe5a7f561a803a324a1652ea08e.tar.gz
add Travis CI support
-rw-r--r--.travis.yml67
-rw-r--r--PKGBUILD3
2 files changed, 69 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000000..fc1c4b6dff7
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,67 @@
+sudo: required
+
+branches:
+ only:
+ - master
+
+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:
+# Override `package-cleanup.hook` to preserve cache for travis.
+# Enable ccache
+# Multithreaded build and compress
+# 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 '/#MAKEFLAGS=/c MAKEFLAGS="-j2"' /etc/makepkg.conf
+ sudo sed -i '/^BUILDENV/s/\!ccache/ccache/' /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)"
+ _g++="$(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 $_g++ \"\$@\"" | sudo dd of=/opt/cuda/bin/g++
+ sudo chmod +x /opt/cuda/bin/{nvcc,g{cc,++}}
+# Build
+ - "ccache -s"
+ - "timeout 35m makepkg -s --noconfirm | ts -s '[%.T]'"
+ - "ccache -s"
+script:
+- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/pacman-pkg-cache/arch-travis.sh |sed 's:mikkeloscar/arch-travis:bartoszek/arch-travis-bartus:'| 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
diff --git a/PKGBUILD b/PKGBUILD
index 9402bc517f9..6d18c67ec95 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,9 @@
# shellcheck disable=SC2034
#to enforce cuda verison uncomment this line and update value of sm_xx model accordingly
-#_cuda_capability+=(sm_30 sm_35 sm_37) # suppress to prevent Travis build exceed time limit.
+#_cuda_capability+=(sm_30 sm_35 sm_37)
#_cuda_capability+=(sm_50 sm_52 sm_60 sm_61 sm_70 sm_75)
+((TRAVIS)) && _cuda_capability+=(sm_50 sm_52 sm_60 sm_61 sm_70 sm_75) # suppress 3.x to prevent Travis build exceed time limit.
pkgname=blender-2.7
_fragment="#branch=blender2.7"