polylabel_cmd 1.4.0

A command-line utility for finding optimum polygon label positions
environment:
  VisualStudioVersion: 8.0
  global:
    # This will be used as part of the zipfile name
    # TODO change the project name
    CRATE_NAME: polylabel_cmd
    # TODO This is the Rust channel that build jobs will use by default but can be
    # overridden on a case by case basis down below
    RUST_VERSION: stable
  # TODO feel free to delete targets/channels you don't need
  matrix:
    # Stable channel
    - TARGET: i686-pc-windows-msvc
      RUST_VERSION: stable
    - TARGET: x86_64-pc-windows-msvc
      RUST_VERSION: nightly
    # Beta channel
    - TARGET: i686-pc-windows-msvc
      RUST_VERSION: beta
    # - TARGET: x86_64-pc-windows-gnu
    #   RUST_VERSION: beta
    # Nightly channel
    - TARGET: i686-pc-windows-msvc
      RUST_VERSION: nightly
    # - TARGET: x86_64-pc-windows-gnu
    #   RUST_VERSION: nightly

# Install Rust and Cargo
install:
  - ps: >-
      If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') {
        $Env:PATH += ';C:\msys64\mingw64\bin'
      } ElseIf ($Env:TARGET -eq 'i686-pc-windows-gnu') {
        $Env:PATH += ';C:\msys64\mingw32\bin'
      } ElseIf ($Env:TARGET -eq 'i686-pc-windows-msvc') {
        $Env:PATH += ';C:\msys64\mingw32\bin'
      } ElseIf ($Env:TARGET -eq 'x86_64-pc-windows-msvc') {
        $Env:PATH += ';C:\msys64\mingw64\bin'
      }
  - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
        https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
        Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
          throw "There are newer queued builds for this pull request, failing early." }
  - curl -sSf -o rustup-init.exe https://win.rustup.rs/
  - rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
  - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
  - set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
  - set PATH=%PATH%
  - rustc -Vv
  - cargo -V

# Equivalent to Travis' `script` phase
# TODO modify this phase as you see fit
test_script:
  - if [%APPVEYOR_REPO_TAG%]==[false] (
      cargo test
    )

artifacts:
  # Archive the generated packages in the ci.appveyor.com build report.
  - path: staging

before_deploy:
  # NEW Generate artifacts for release
  - set RUSTFLAGS=-C target-feature=+crt-static
  - cargo rustc --target %TARGET% --release
  - ps: ci\before_deploy_windows.ps1

deploy:
  appveyor_repo_tag: true
  tag: $(APPVEYOR_REPO_TAG_NAME)
  release: $(APPVEYOR_REPO_TAG_NAME)
  description: 'Binaries'
  provider: GitHub
  auth_token:
    secure: 3Q1Au4EM2RorjtNcBNLLIZ3A7G5eNn+HLR1I9VyJpKsRlpWDjJdoaoOEfbtwvCxf
  artifact: /.*\.zip/
  draft: false
  prerelease: false
  on:
    appveyor_repo_tag: true
    RUST_VERSION: nightly

cache:
  - C:\Users\appveyor\.cargo\registry
  - target

branches:
  only:
    - master
    - /v\d\.\d\.\d/

# Building is done in the test phase, so we disable Appveyor's build phase.
build: false