summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2020-06-21 15:33:46 +0200
committerbartus2020-06-21 19:27:05 +0200
commit8e0372d7c00e32205dd748d512ad2ce47ef0b4cf (patch)
tree22da0bd718402696abc26c8fe83f06c2e85d5761
parentf2890cc54512c768a4d58113029f71b6a1fe279f (diff)
downloadaur-8e0372d7c00e32205dd748d512ad2ce47ef0b4cf.tar.gz
Add .travis.yml
-rw-r--r--.travis.yml93
1 files changed, 93 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000000..6fbb37353077
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,93 @@
+sudo: required
+language: c
+
+branches:
+ only:
+ - /.*/
+
+cache:
+ directories:
+ - ~/.ccache
+ - ~/.pkg-cache
+ - ~/.cache/yay
+ - scilab
+
+services:
+- docker
+
+archlinux:
+ 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
+ - bwidget
+ - java-flexdock
+ - aur/fop-hyph
+ - jeuclid-core
+ - jgraphx-jre8
+ - javahelp2
+ - saxon-he
+ - jlatexmath-fop
+ - jrosetta
+ - jgoodies-looks
+ - java-qdox
+ - java-skinlf
+ - jogl
+ - apache-lucene
+ 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
+ - |
+ echo "$ env:"
+ env
+ echo "$ declare -p"
+ declare -p
+ unset JAVA_HOME
+ 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:
+# - "( . PKGBUILD ; pacman -Q ${depends[@]} ${makedepends[@]} 2>&1 1>/dev/null|cut -d' ' -f3| xargs -n1 yay -S )"
+# Normalize TRAVIS variable
+ - |
+ [ "$TRAVIS" == "true" ] && TRAVIS=1 || TRAVIS=0
+ export NINJA_STATUS="[%p₋|₋%f<%r<%u₋|₋%obps₋]₋"
+# Java-testng fail in check()
+ - sudo archlinux-java set java-8-openjdk
+ - yay -S --noconfirm --needed --useask --mflags="--nocheck" java-testng
+# Build
+ - 'echo "Travis initialization time: $travis_uptime seconds"'
+ - "arch_uptime=$(cut -d' ' -f1 /proc/uptime|cut -d'.' -f1)"
+ - 'echo "Arch-Travis initialization time: $((arch_uptime-travis_uptime)) seconds"'
+ - ccache -s
+ - ccache -z
+# set timeout to 50m minus current uptime, minus travis cache in time, minus 60 second buffer for arch-travis cleanup.
+ - timeout $((50*60-arch_uptime-travis_uptime-60)) makepkg -s --noconfirm > >(ts -s '%.T'); _makepkg_return=$?
+ - sudo pacman -Sc --noconfirm
+ - ccache -s
+ - ccache -z
+ - exit $_makepkg_return
+script:
+- "export travis_uptime=$(cut -d' ' -f1 /proc/uptime|cut -d'.' -f1)"
+- 'echo "Travis initialization time: $travis_uptime seconds"'
+# assume caching out will take the same amount of time as caching in those making build time equal to 50 minutes minus two time current uptime.
+- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/master/arch-travis.sh| timeout $((50*60-2*travis_uptime)) bash"
+- "echo pacman pkg cache size: $(du -h ~/.pkg-cache|cut -f1) in $(ls ~/.pkg-cache|wc -l) files"
+
+#deploy:
+# provider: script
+# script: bash .travis_deploy.sh
+# on:
+# branch: master
+# skip_cleanup: true