diff options
author | bartus | 2019-08-19 15:26:15 +0200 |
---|---|---|
committer | bartus | 2019-08-19 15:27:42 +0200 |
commit | bb6b3d5d4f75b82815041dfb1968d769cdb7a0dc (patch) | |
tree | 4dd07ff8ef09a569935e8e63539aa625ddca6e11 | |
parent | 2082a2d715ab373c06e9ecbfab3e49ce251c977d (diff) | |
download | aur-bb6b3d5d4f75b82815041dfb1968d769cdb7a0dc.tar.gz |
Add Travis CI support
-rw-r--r-- | .travis.yml | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000000..81e21104a714 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,60 @@ +sudo: required +language: c + +branches: + only: + - /.*/ + +cache: + directories: + - ~/.ccache + - ~/.pkg-cache + - gegl + +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 + - babl-qfix-git + 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: +# 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 |