# fix lineendings in Windows
init:
  - git config --global core.autocrlf input

environment:
  RUST_BACKTRACE: 1
  matrix:
  - TARGET: x86_64-pc-windows-msvc
  - TARGET: i686-pc-windows-msvc
  - TARGET: i686-pc-windows-gnu

install:
  - ps: Start-FileDownload "https://static.rust-lang.org/dist/rust-1.20.0-${env:TARGET}.exe"
  - rust-1.20.0-%TARGET%.exe /VERYSILENT /NORESTART /DIR="C:\Program Files (x86)\Rust"
  - SET PATH=%PATH%;C:\Program Files (x86)\Rust\bin
  - SET PATH=%PATH%;C:\MinGW\bin

build: false

build_script:
  - rustc -V
  - cargo -V
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_matching"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_mock_server"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_mock_server_cli"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_consumer"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_verifier"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_verifier_cli"
  - cargo build
  - cargo test


# fix lineendings in Windows
init:
  - git config --global core.autocrlf input

environment:
  RUST_BACKTRACE: 1
  matrix:
  - TARGET: x86_64-pc-windows-msvc
  - TARGET: i686-pc-windows-msvc
  - TARGET: i686-pc-windows-gnu

install:
  - ps: Start-FileDownload "https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe"
  - rustup-init.exe

build: false

build_script:
  - rustc -V
  - cargo -V
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_matching"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_mock_server"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_mock_server_cli"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_consumer"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_verifier"
  - cargo build
  - cargo test
  - cd "%APPVEYOR_BUILD_FOLDER%\rust\pact_verifier_cli"
  - cargo build
  - cargo test


Switch Appveyor to use rustup to install the Rust compiler
Switch Appveyor to use rustup to install the Rust compiler
