diff options
author | bartoszek | 2019-10-14 11:48:40 +0200 |
---|---|---|
committer | bartus | 2020-07-04 15:16:24 +0200 |
commit | 48636f0f22d8df6ad7fb55cc5c853b709dad439d (patch) | |
tree | ee99247c5ef023f9fc27c012a5bccf443f47f53a | |
parent | ca4b141e19e8568d896421c7d9aec31e45384ee2 (diff) | |
download | aur-48636f0f22d8df6ad7fb55cc5c853b709dad439d.tar.gz |
Travis: calculated timeout.
-rw-r--r-- | .travis.yml | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 86f80517f77c..ac89dde0761c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,14 +41,22 @@ archlinux: - | [ "$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"' - ccache -s - - timeout 30m makepkg -s --noconfirm | ts -s '[%.T]'; _makepkg_return=${PIPESTATUS[0]} + - 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: -- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/master/arch-travis.sh| bash" -- "echo pacman pkg cache size: $(du -h ~/.pkg-cache|cut -f1) in $(ls ~/.pkg-cache|wc -l) files" +- "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" #deploy: # on: |