aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorbartus2019-10-22 15:57:08 +0200
committerbartus2020-09-02 09:29:33 +0200
commite23e0a315dfed05ecc9be4bf4b6eb23bfd14fa94 (patch)
tree94d0f18c9b08c2434d44cd1be5f993b56f90607a
parentd7ee72e3ef2ca6562f6391d9288b742e8db8818e (diff)
downloadaur-e23e0a315dfed05ecc9be4bf4b6eb23bfd14fa94.tar.gz
Travis: fix archlinux:script timeout.
-rw-r--r--.travis.yml23
1 files changed, 15 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 0a61583c1460..0077eb172ab5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,4 +1,3 @@
-sudo: required
language: c
branches:
@@ -53,28 +52,36 @@ archlinux:
# Install optix
- 'sudo pacman -U --noconfirm /var/cache/pacman/pkg/optix*.pkg.tar.xz'
# 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"'
+ - 'build_time=$((50*60-arch_uptime-cache_out_time-60))'
+ - 'echo "Travis initialization time: $(date --date=@${travis_uptime} -u +%M:%S)"'
+ - 'echo "Arch-Travis initialization time: $(date --date=@$((arch_uptime-travis_uptime)) -u +%M:%S)"'
+ - 'echo "Current Run time: $(date --date=@${arch_uptime} -u +%M:%S)"'
+ - 'echo "Assumed Build time: $(date --date=@${build_time} -u +%M:%S)"'
+ - 'echo "Travis Cache Out time: $(date --date=@${cache_out_time} -u +%M:%S)"'
- ccache -s
- 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-cache_out_time-60)) makepkg -s --noconfirm > >(ts -s '%.T'); _makepkg_return=$?
+ - timeout ${build_time} 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"'
# 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/'
+- "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.
# detect no cache in and assume 5min cache out time.
-- "[ $travis_uptime -le 60 ] && cache_out_time=300 || cache_out_time=$travis_uptime"
+- "[ $travis_uptime -le 200 ] && cache_out_time=450 || cache_out_time=$travis_uptime"
+- 'build_time=$((50*60-travis_uptime-cache_out_time))'
+- 'echo "Current Run time: $(date --date=@${travis_uptime} -u +%M:%S)"'
+- 'echo "Assumed Build time: $(date --date=@${build_time} -u +%M:%S)"'
+- 'echo "Cache Out time: $(date --date=@${cache_out_time} -u +%M:%S)"'
- "export cache_out_time"
-- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/master/arch-travis.sh| timeout $((50*60-travis_uptime-cache_out_time)) bash"
+- "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/master/arch-travis.sh| timeout ${build_time} bash"
- "echo pacman pkg cache size: $(du -h ~/.pkg-cache|cut -f1) in $(ls ~/.pkg-cache|wc -l) files"
#deploy: