version: "{build} ~ {branch}" branches: except: - gh-pages os: Visual Studio 2015 matrix: allow_failures: - CHANNEL: nightly environment: global: FEATURES: "generic" matrix: - CHANNEL: 1.27.0 ARCH: i686 TOOLCHAIN: msvc - CHANNEL: stable ARCH: i686 TOOLCHAIN: msvc - CHANNEL: stable ARCH: x86_64 TOOLCHAIN: msvc # - CHANNEL: beta # ARCH: i686 # TOOLCHAIN: msvc # - CHANNEL: beta # ARCH: x86_64 # TOOLCHAIN: msvc - CHANNEL: nightly ARCH: i686 TOOLCHAIN: msvc - 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 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 install: # 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://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 # finalize FEATURES - if /I "%CHANNEL%"=="nightly" set "FEATURES=nightly %FEATURES%" # "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: | 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}; appveyor DownloadFile $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% # "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 artifacts: - path: target\debug\uutils.exe name: uutils.exe build_script: - cargo build --features "%FEATURES%" --no-default-features test_script: - cargo test --no-fail-fast --features "%FEATURES%" --no-default-features