Use download-chrome.sh to download Chrome on Windows too.

wget that ships with MSYS needs `--no-check-certificate` otherwise it fails for SNI.

Also, specified `-q` so that the output isn't bloated.
This commit is contained in:
XhmikosR 2017-01-29 12:46:42 +02:00
Родитель 350b06400e
Коммит 49fdcbb5db
2 изменённых файлов: 12 добавлений и 9 удалений

Просмотреть файл

@ -17,9 +17,9 @@ install:
- npm run install-all
before_test:
- set LIGHTHOUSE_CHROMIUM_PATH=%CD%\chrome-win32\chrome.exe
- appveyor DownloadFile https://download-chromium.appspot.com/dl/Win?type=snapshots -FileName chrome-win32.zip
- unzip chrome-win32.zip
- set "PATH=C:\MinGW\msys\1.0\bin;%PATH%"
- set "LIGHTHOUSE_CHROMIUM_PATH=%CD%\chrome-win32\chrome.exe"
- bash ./lighthouse-core/scripts/download-chrome.sh
- npm run build-cli
- npm run build-extension
- npm run build-viewer
@ -27,7 +27,6 @@ before_test:
test_script:
- node --version
- npm --version
- set "PATH=C:\MinGW\msys\1.0\bin;%PATH%"
- npm run lint
- npm run unit
- npm run smoke

Просмотреть файл

@ -2,15 +2,19 @@
# Download chrome inside of our CI env.
if [ x"$LIGHTHOUSE_CHROMIUM_PATH" == x ]
then
if [ "$APPVEYOR" == "True" ]; then
url="https://download-chromium.appspot.com/dl/Win?type=snapshots"
else
url="https://download-chromium.appspot.com/dl/Linux_x64?type=snapshots"
fi
if [ x"$LIGHTHOUSE_CHROMIUM_PATH" == x ]; then
echo "Error: Environment variable LIGHTHOUSE_CHROMIUM_PATH not set"
exit 1
fi
if [ -e "$LIGHTHOUSE_CHROMIUM_PATH" ]
then
if [ -e "$LIGHTHOUSE_CHROMIUM_PATH" ]; then
echo "cached chrome found"
else
wget 'https://download-chromium.appspot.com/dl/Linux_x64?type=snapshots' -O chrome.zip && unzip chrome.zip
wget "$url" --no-check-certificate -q -O chrome.zip && unzip chrome.zip
fi