gitlab-ci: refactor out some common stuff for Windows and Linux

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
2 files changed