ci: update ci configs

- add windows runner
- update actions versions
- other minor enhancements
This commit is contained in:
Dima Gerasimov 2022-05-02 17:35:15 +01:00
parent 80c5be7293
commit 960ed56291
5 changed files with 52 additions and 22 deletions

View file

@ -1,7 +1,8 @@
#!/bin/bash -eu
#!/bin/bash
set -eu
cd "$(dirname "$0")"
cd ../..
cd .. # git root
if ! command -v sudo; then
# CI or Docker sometimes doesn't have it, so useful to have a dummy
@ -10,16 +11,31 @@ if ! command -v sudo; then
}
fi
if ! [ -z "$CI" ]; then
if [ -n "${CI-}" ]; then
# install OS specific stuff here
if [[ "$OSTYPE" == "darwin"* ]]; then
case "$OSTYPE" in
darwin*)
# macos
brew install fd
else
;;
cygwin* | msys* | win*)
# windows
:
;;
*)
# must be linux?
sudo apt update
sudo apt install fd-find
fi
;;
esac
fi
pip3 install --user tox
tox
PY_BIN="python3"
# some systems might have python pointing to python3
if ! command -v python3 &> /dev/null; then
PY_BIN="python"
fi
"$PY_BIN" -m pip install --user tox
"$PY_BIN" -m tox