diff options
author | bartus | 2020-08-18 22:11:51 +0200 |
---|---|---|
committer | bartus | 2020-08-18 22:11:51 +0200 |
commit | dfeef11fd0dfc266de131a0a31d2bbc5a0a8e6d0 (patch) | |
tree | e137815dd79e73cd26f82eec9df21d3276981a60 /.travis.yml | |
parent | 64de423bf3ce14736fbdcd7856ced8dfdcc5e09c (diff) | |
download | aur-dfeef11fd0dfc266de131a0a31d2bbc5a0a8e6d0.tar.gz |
Fix Travis
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 54 |
1 files changed, 42 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml index 787f7ffac42a..779a6ac69e9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,52 +1,82 @@ -sudo: required language: c +os: linux branches: only: - /.*/ +cache: + directories: + - ~/.ccache + - ~/.pkg-cache + - ~/.cache/yay + - blender-addons-contrib.git + - blender-addons.git + - blender-dev-tools.git + - blender-translations.git + - blender + 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: -# - cuda + - ccache + - ccache-ext +# cuda need to be installed before `makepkg` invocation in order to allow nvcc-ccache logic to work. + - cuda - moreutils - - oidn -# Dora otix as downloading behind auth-wall is to painful :( -# - optix + - openimagedenoise + - usd=20.05 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 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 -# 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 +# Install optix + - 'sudo pacman -U --noconfirm /var/cache/pacman/pkg/optix*.pkg.tar.xz||true' # 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. - - makepkg -s --noconfirm; _makepkg_return=$? + - 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"' -#- '[ ! -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' +# copy optix.pkg from private github repo +- 'git clone https://$GITHUB_ACCESS_TOKEN@github.com/bartoszek/optix-pkg' +- 'cp optix-pkg/optix*.pkg.tar.xz ~/.pkg-cache/' # 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| bash" +# detect no cache in and assume 5min cache out time. +- "[ $travis_uptime -le 60 ] && cache_out_time=300 || cache_out_time=$travis_uptime" +- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/master/arch-travis.sh| timeout $((50*60-travis_uptime-cache_out_time)) bash" +- "echo pacman pkg cache size: $(du -h ~/.pkg-cache|cut -f1) in $(ls ~/.pkg-cache|wc -l) files" + #deploy: # on: # branch: master |