summarylogtreecommitdiffstats
path: root/.travis.yml
blob: 7285d693f5a93b9a4865d6e2bad0003ab0e482c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
sudo: required

branches:
  only:
  - master

cache:
  directories:
  - .ccache
  - .arch-cache
  - AUR-repo
  - LuxCore.git

services:
- docker

arch:
  repos:
  - bartus=https://github.com/bartoszek/AUR-repo/raw/master
  packages:
# disable to prevent `package-cleanup.hook`
# - ccache
# - moreutils
  script:
  - "echo 'options+=(ccache)' >> PKGBUILD"
  - "export CCACHE_DIR='/build/.ccache'"
# COMPRESSXZ=(), can't be passed to makepkg as bash dosn't support array in `export` statement.
  - "echo 'COMPRESSXZ=(xz -T 0 -7 -c -z -)' >> PKGBUILD"
# override `package-cleanup.hook` to preserve cache for travis.
  - "sudo mkdir /etc/pacman.d/hooks/ && sudo ln -s /dev/null /etc/pacman.d/hooks/package-cleanup.hook"
  - "sudo pacman -S --noconfirm ccache moreutils"
# exit with makepkg return code
  - "set -o pipefail"
  - "makepkg -s --noconfirm TRAVIS=1 MAKEFLAGS='-j2' 2>&1 |ts -s '[%.T]'; makepkg_ret=$?"
  - "ccache -s"
  - "exit $makepkg_ret"

script:
- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/pacman-pkg-cache/arch-travis.sh | bash"
- "echo 'pacman pkg cache size: ' $(du -h .arch-cache|cut -f1) in $(ls .arch-cache|wc -l) files"

deploy:
  on:
    branch: master
  skip_cleanup: true
  provider: script
  script: bash .travis_deploy.sh