summarylogtreecommitdiffstats
path: root/.travis.yml
blob: 9a41e47927922f349beeb731662a655a1be4cbc0 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
sudo: required
language: c

branches:
  only:
  - /.*/

cache:
  directories:
  - blender-addons-contrib.git
  - blender-addons.git
  - blender-dev-tools.git
  - blender-translations.git
  - blender

services:
- docker

archlinux:
  packages:
  - cuda
  - moreutils
  - oidn
# Dora otix as downloading behind auth-wall is to painful :(
# - optix
  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
# 5.Put optix in yay cache
  - |
     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
#    mkdir -p ~/.cache/yay/optix
#    cp /var/cache/pacman/pkg/NVIDIA-OptiX-SDK-7.0.0-linux64.sh ~/.cache/yay/optix
  script:
# Normalize TRAVIS variable
  - |
     [ "$TRAVIS" == "true" ] && TRAVIS=1 || TRAVIS=0
# 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"'
# set timeout to 50m minus current uptime, minus travis cache in time, minus 60 second buffer for arch-travis cleanup.
  - makepkg -s --noconfirm; _makepkg_return=$?
  - sudo pacman -Sc --noconfirm
  - exit $_makepkg_return
script:
- "export travis_uptime=$(cut -d' ' -f1 /proc/uptime|cut -d'.' -f1)"
- 'echo "Travis initialization time: $travis_uptime seconds"'
#- '[ ! -f ~/.pkg-cache/NVIDIA-OptiX-SDK-7.0.0-linux64.sh ] && curl -Ls "https://developer.download.nvidia.com/designworks/optix/secure/7.0.0/ga/NVIDIA-OptiX-SDK-7.0.0-linux64.sh?LOhihLF99zzm6EAXMViu7GfZXfW8lN6IaQ-KhJwHgWx1-tIBMUjiwjPKBvB_585iVoKU9spDrpIHyyWnb9AarWCf2Kgv5nwpJfg9ai4DbsTRYtEmFfTSCo04t0idjs6Wfh-dtfbbrkAHIF_1vx5AvrS5DeQCt2jbLxKADQ8WOm9qpw" > ~/.pkg-cache/NVIDIA-OptiX-SDK-7.0.0-linux64.sh || true'
#- 'du -h ~/.pkg-cache/NVIDIA-OptiX-SDK-7.0.0-linux64.sh'
# 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.

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