travis: Fix job configuration for windows

* call `bundle clean` before caching
* explicitely specify path for `bundle install`
* create a `--msys2--` file as a marker to skip msys2 & ridk install
This commit is contained in:
Claudio Bley 2020-10-09 18:04:37 +02:00
parent 905b0e8584
commit 3fd9081b88

View file

@ -8,11 +8,7 @@ language:
os:
- linux
cache:
bundler: true
directories:
- $HOME/AppData/Local/Temp/chocolatey
- /C/tools/msys64
cache: bundler
rvm:
- '2.5'
@ -36,14 +32,27 @@ jobs:
before_cache:
- |-
# https://unix.stackexchange.com/a/137322/107554
$msys2 pacman --sync --clean --noconfirm
pacman --sync --clean --noconfirm
- bundle clean
before_install:
- ruby --version
- gem --version
- choco install msys2 --params /NoUpdate
- powershell -Command 'Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass ; & c:\tools\ruby27\bin\ridk.ps1' install dev_tools
- |
if [[ ! -f /C/tools/msys64/--msys2-- ]]; then
rm -rf /C/tools/msys64
choco uninstall -y mingw
choco upgrade --no-progress -y msys2 --params /NoUpdate
ridk.cmd install dev_tools
fi
- touch /C/tools/msys64/--msys2--
install:
- bundle install --retry=3
- bundle install --path vendor/bundle --retry=3
- export MSYS=winsymlinks:nativestrict
cache:
directories:
- $HOME/AppData/Local/Temp/chocolatey
- /C/tools/msys64
- vendor/bundle
before_install:
- gem --version