2018-09-21 17:53:04 +00:00
|
|
|
version: "{build} ~ {branch}"
|
|
|
|
|
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- gh-pages
|
|
|
|
|
2017-08-04 17:57:59 +00:00
|
|
|
os: Visual Studio 2015
|
|
|
|
|
2018-09-21 17:53:04 +00:00
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- CHANNEL: nightly
|
|
|
|
|
2015-12-24 03:53:27 +00:00
|
|
|
environment:
|
2018-09-21 17:53:04 +00:00
|
|
|
global:
|
|
|
|
FEATURES: "generic"
|
2015-12-24 03:53:27 +00:00
|
|
|
matrix:
|
2018-09-21 17:53:04 +00:00
|
|
|
- CHANNEL: 1.27.0
|
|
|
|
ARCH: i686
|
|
|
|
TOOLCHAIN: msvc
|
|
|
|
- CHANNEL: stable
|
|
|
|
ARCH: i686
|
|
|
|
TOOLCHAIN: msvc
|
|
|
|
- CHANNEL: stable
|
|
|
|
ARCH: x86_64
|
2017-08-04 17:57:59 +00:00
|
|
|
TOOLCHAIN: msvc
|
2018-09-21 17:53:04 +00:00
|
|
|
# - CHANNEL: beta
|
|
|
|
# ARCH: i686
|
|
|
|
# TOOLCHAIN: msvc
|
|
|
|
# - CHANNEL: beta
|
|
|
|
# ARCH: x86_64
|
|
|
|
# TOOLCHAIN: msvc
|
|
|
|
- CHANNEL: nightly
|
|
|
|
ARCH: i686
|
2017-08-04 17:57:59 +00:00
|
|
|
TOOLCHAIN: msvc
|
2018-09-21 17:53:04 +00:00
|
|
|
- CHANNEL: nightly
|
|
|
|
ARCH: x86_64
|
|
|
|
TOOLCHAIN: msvc
|
|
|
|
- CHANNEL: stable
|
|
|
|
ARCH: i686
|
|
|
|
TOOLCHAIN: gnu
|
|
|
|
- CHANNEL: stable
|
|
|
|
ARCH: x86_64
|
|
|
|
TOOLCHAIN: gnu
|
|
|
|
# - CHANNEL: beta
|
|
|
|
# ARCH: i686
|
|
|
|
# TOOLCHAIN: gnu
|
|
|
|
# - CHANNEL: beta
|
|
|
|
# ARCH: x86_64
|
|
|
|
# TOOLCHAIN: gnu
|
|
|
|
- CHANNEL: nightly
|
|
|
|
ARCH: i686
|
|
|
|
TOOLCHAIN: gnu
|
|
|
|
- CHANNEL: nightly
|
|
|
|
ARCH: x86_64
|
|
|
|
TOOLCHAIN: gnu
|
|
|
|
- CHANNEL: stable
|
|
|
|
ARCH: i686
|
|
|
|
TOOLCHAIN: gnu
|
2016-07-29 11:50:59 +00:00
|
|
|
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
|
2016-08-30 00:18:52 +00:00
|
|
|
DIR_TEMP_MINGW: C:\cached\mingw
|
2016-07-29 11:50:59 +00:00
|
|
|
|
2015-12-24 03:53:27 +00:00
|
|
|
install:
|
2018-09-21 17:53:04 +00:00
|
|
|
# force branch checkout (if knowable), then reset to the specific commit ## (can be needed for accurate code coverage info)
|
|
|
|
# * this allows later apps to see the branch name using standard `git branch` operations, yet always builds the correct specific commit
|
|
|
|
# * ref: <https://github.com/appveyor/ci/issues/1606>[`@`](https://archive.is/RVpnF)
|
|
|
|
- if DEFINED APPVEYOR_REPO_BRANCH if /I "%APPVEYOR_REPO_SCM%"=="git" ( git checkout "%APPVEYOR_REPO_BRANCH%" & git reset --hard "%APPVEYOR_REPO_COMMIT%" )
|
|
|
|
# ensure CWD is project main directory
|
|
|
|
- cd "%APPVEYOR_BUILD_FOLDER%"
|
|
|
|
# create a working area
|
|
|
|
- ps: if ( ! $env:CI_TEMP_DIR ) { $env:CI_TEMP_DIR = "${env:TEMP}\${env:APPVEYOR_JOB_ID}" ; mkdir -force $env:CI_TEMP_DIR | out-null }
|
|
|
|
- set "TARGET=%ARCH%-pc-windows-%TOOLCHAIN%"
|
|
|
|
# install `rust` via `rustup`
|
|
|
|
- call appveyor DownloadFile "https://win.rustup.rs/" -FileName "%CI_TEMP_DIR%\rustup-init.exe"
|
|
|
|
- call "%CI_TEMP_DIR%\\rustup-init.exe" -y --default-toolchain %CHANNEL% --default-host %TARGET% --no-modify-path
|
|
|
|
- set "PATH=%PATH%;%USERPROFILE%\.cargo\bin"
|
|
|
|
- rustc -vV
|
|
|
|
- cargo -vV
|
2016-07-29 11:50:59 +00:00
|
|
|
|
2018-09-21 17:53:04 +00:00
|
|
|
# finalize FEATURES
|
|
|
|
- if /I "%CHANNEL%"=="nightly" set "FEATURES=nightly %FEATURES%"
|
2016-07-29 11:50:59 +00:00
|
|
|
|
2018-09-21 17:53:04 +00:00
|
|
|
# "gnu" toolchain setup
|
|
|
|
- if /I "%TOOLCHAIN%"=="gnu" set "PATH=%PATH%;C:\MinGW\bin"
|
|
|
|
# * use the system MSYS if we can
|
|
|
|
- if /I "%TOOLCHAIN%"=="gnu" if /I "%ARCH%"=="i686" set "MSYS_BITS=32"
|
|
|
|
- if /I "%TOOLCHAIN%"=="gnu" if /I "%ARCH%"=="x86_64" set "MSYS_BITS=64"
|
|
|
|
- if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
|
|
|
|
# * specific MinGW, if specified
|
|
|
|
- ps: |
|
2016-08-30 00:18:52 +00:00
|
|
|
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};
|
2018-09-21 17:53:04 +00:00
|
|
|
appveyor DownloadFile $download_loc -FileName "${env:DIR_TEMP_MINGW}\${env:MINGW_ARCHIVE}";
|
2016-08-30 00:18:52 +00:00
|
|
|
}
|
|
|
|
- if defined MINGW_ARCHIVE 7z x -y "%DIR_TEMP_MINGW%\%MINGW_ARCHIVE%" > nul
|
2016-07-29 11:50:59 +00:00
|
|
|
- if defined MINGW_ARCHIVE set PATH=%CD%\%MINGW_DIR%\bin;C:\msys64\usr\bin;%PATH%
|
|
|
|
|
2018-09-21 17:53:04 +00:00
|
|
|
# "msvc" toolchain setup
|
|
|
|
- if "%TOOLCHAIN%" == "msvc" if "%ARCH%" == "i686" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
|
|
|
|
- if "%TOOLCHAIN%" == "msvc" if "%ARCH%" == "x86_64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
|
|
|
|
- if "%TOOLCHAIN%" == "msvc" if "%ARCH%" == "x86_64" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
|
2015-12-24 03:53:27 +00:00
|
|
|
|
2016-05-21 01:37:14 +00:00
|
|
|
artifacts:
|
2016-05-22 23:38:37 +00:00
|
|
|
- path: target\debug\uutils.exe
|
2016-05-21 01:37:14 +00:00
|
|
|
name: uutils.exe
|
2015-12-24 03:53:27 +00:00
|
|
|
|
2018-09-21 17:53:04 +00:00
|
|
|
build_script:
|
|
|
|
- cargo build --features "%FEATURES%" --no-default-features
|
2016-05-22 23:38:37 +00:00
|
|
|
|
2015-12-24 03:53:27 +00:00
|
|
|
test_script:
|
2018-09-21 17:53:04 +00:00
|
|
|
- cargo test --no-fail-fast --features "%FEATURES%" --no-default-features
|