Skip to content

Commit

Permalink
appveyor: add cache of mingw download
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanross committed Aug 30, 2016
1 parent ae0e1c4 commit d1d04f8
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions appveyor.yml
Expand Up @@ -6,6 +6,7 @@ environment:
MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z/download
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
MINGW_DIR: mingw32
DIR_TEMP_MINGW: C:\cached\mingw
- TARGET: x86_64-pc-windows-gnu
MSYS_BITS: 64

Expand All @@ -16,9 +17,16 @@ install:
# Use the system msys if we can
- if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%

# download a custom compiler otherwise
- if defined MINGW_ARCHIVE appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
- if defined MINGW_ARCHIVE 7z x -y "%MINGW_ARCHIVE%" > nul
- ps: >-
if ((Test-Path Env:\MINGW_ARCHIVE) -and -not (Test-Path "${env:DIR_TEMP_MINGW}\${env:MINGW_ARCHIVE}")) {
if (Test-Path "${env:DIR_TEMP_MINGW}") {
rm -Recurse ${env:DIR_TEMP_MINGW}\*;
}
New-Item -ItemType Directory -Force -Path ${env:DIR_TEMP_MINGW} | Out-Null;
$download_loc = ${env:MINGW_URL};
Start-FileDownload $download_loc -FileName "${env:DIR_TEMP_MINGW}\${env:MINGW_ARCHIVE}";
}
- if defined MINGW_ARCHIVE 7z x -y "%DIR_TEMP_MINGW%\%MINGW_ARCHIVE%" > nul
- if defined MINGW_ARCHIVE set PATH=%CD%\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%

- rust-nightly-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
Expand All @@ -34,3 +42,6 @@ build: false

test_script:
- cargo test --no-fail-fast --features "nightly generic" --no-default-features

cache:
- c:\cached

0 comments on commit d1d04f8

Please sign in to comment.