adafruit / ci-arduino

A script that will install all of the common dependencies for testing Arduino library builds using Github Actions
MIT License
115 stars 73 forks source link

removed the use of apt-spy2 #135

Closed eringerli closed 2 years ago

eringerli commented 2 years ago

I'm honest, I have no idea what apt-spy2 does, a quick recherche says something about keeping the /etc/sources.list current and the log shows a lot of mirrors which aparently get tested. Shouldn't that be the responsibility of github by having quick download mirrors already configured in their images? Also even using the slowest mirror is faster than the two minutes this test takes.

Here are two runs: This commit lowers the runtime of pre-install from 2:31 minutes to 17 seconds, which is 888% faster. Screenshot_20220429_085028 Screenshot_20220430_185038

ladyada commented 2 years ago

we had a lot of failures before we searched each time.

eringerli commented 2 years ago

It seems to be solved: https://github.com/actions/virtual-environments/issues/675. The workaround is to call apt-get update before installing stuff and collect all installing into one call to apt-get install.

eringerli commented 2 years ago

I ran a stresstest by letting it run 50 times without apt-spy2, it worked flawlessly: https://github.com/eringerli/Adafruit_LSM6DS/actions I also deactivated the compilation test, as the problem would be in actions_install.sh/Install the prerequisites and I don't want to use up my execution time.

I used the code

for i in {0..50}; do 
  git commit --amend -m "github actions test for eringerli/ci-arduino #$i"; 
  git push --set-upstream origin github-actions-test --force; 
done

to create a lot of commits and trigger the action runs in quick succesion. This should let them run on different hosts, so if something would go wrong, it does.

ladyada commented 2 years ago

its not an issue now but for a few days a couple months ago actions had a bad default apt mirror - really this was the best solution!