|
| 1 | +image: Visual Studio 2017 |
| 2 | +environment: |
| 3 | + RUSTFLAGS: -Ctarget-feature=+crt-static |
| 4 | + matrix: |
| 5 | + - TARGET: x86_64-pc-windows-msvc |
| 6 | + ALLOW_PR: 1 |
| 7 | + - TARGET: i686-pc-windows-msvc |
| 8 | + BUILD_MSI: 1 |
| 9 | + ALLOW_PR: 1 |
| 10 | + - TARGET: i686-pc-windows-gnu |
| 11 | + MINGW_DIR: mingw32 |
| 12 | + ALLOW_PR: 1 |
| 13 | + - TARGET: x86_64-pc-windows-gnu |
| 14 | + MINGW_DIR: mingw64 |
| 15 | + ALLOW_PR: 1 |
| 16 | + access_token: |
| 17 | + secure: q8Wqx0brgfpOYFQqWauvucE2h0o1WYb41a3gKaCKV9QiE4eTz6qLNlqyC3mdsp4Q |
| 18 | +branches: |
| 19 | + only: |
| 20 | + - master |
| 21 | + - auto |
| 22 | + |
| 23 | +install: |
| 24 | + # If this is a PR and we're not allowed to test PRs, skip the whole build. |
| 25 | + # Also if we're on the master branch no need to run the full test suite, so |
| 26 | + # just do a smoke test. |
| 27 | + - if defined APPVEYOR_PULL_REQUEST_NUMBER if NOT defined ALLOW_PR appveyor exit |
| 28 | + - if "%APPVEYOR_REPO_BRANCH%" == "master" if NOT defined ALLOW_PR appveyor exit |
| 29 | + |
| 30 | + # Install MSYS2 and MINGW (32-bit & 64-bit) |
| 31 | + - ps: | |
| 32 | + # Check if MSYS2 was restored from cache |
| 33 | + if($env:MINGW_DIR) { |
| 34 | + if($env:MINGW_DIR -eq "mingw32") { |
| 35 | + # Download and install MINGW (32-bit) |
| 36 | + Write-Host "Installing MinGW (32-bit)..." -ForegroundColor Cyan |
| 37 | + Write-Host "Downloading installation package..." |
| 38 | + appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z -FileName mingw.7z |
| 39 | + } elseif($env:MINGW_DIR -eq "mingw64") { |
| 40 | + # Download and install MINGW (64-bit) |
| 41 | + Write-Host "Installing MinGW (64-bit)..." -ForegroundColor Cyan |
| 42 | + Write-Host "Downloading installation package..." |
| 43 | + appveyor-retry appveyor DownloadFile https://s3.amazonaws.com/rust-lang-ci/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z -FileName mingw.7z |
| 44 | + } |
| 45 | + Write-Host "Extracting installation package..." |
| 46 | + 7z x -y mingw.7z -oC:\msys64 | Out-Null |
| 47 | + del mingw.7z |
| 48 | + } else { |
| 49 | + Write-Host "MSYS2 not required" -ForegroundColor Green |
| 50 | + } |
| 51 | +
|
| 52 | + # Install rust, x86_64-pc-windows-msvc host |
| 53 | + - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe |
| 54 | + - rustup-init.exe -y --default-host=x86_64-pc-windows-msvc |
| 55 | + - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin |
| 56 | + |
| 57 | + # Install the target we're compiling for |
| 58 | + - if NOT "%TARGET%" == "x86_64-pc-windows-msvc" rustup target add %TARGET% |
| 59 | + |
| 60 | + # add mingw to PATH if necessary |
| 61 | + - if defined MINGW_DIR set PATH=C:\msys64\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH% |
| 62 | + |
| 63 | + # set cargo features for MSI if requested (otherwise empty string) |
| 64 | + - set FEATURES= |
| 65 | + - if defined BUILD_MSI set FEATURES=--features msi-installed |
| 66 | + |
| 67 | + # let's see what we got |
| 68 | + - where gcc rustc cargo |
| 69 | + - rustc -vV |
| 70 | + - cargo -vV |
| 71 | + |
| 72 | +build: false |
| 73 | + |
| 74 | +test_script: |
| 75 | + - cd ui-sys |
| 76 | + - cargo build --verbose --tests --examples |
| 77 | + - cd ../iui |
| 78 | + - cargo build --verbose --tests --examples # make sure all examples can be build. |
0 commit comments