polylabel 3.1.0

A Rust implementation of the Polylabel algorithm for finding optimum polygon label positions.
Documentation
environment:
  VisualStudioVersion: 8.0
  global:
    # This will be used as part of the zipfile name
    # TODO change the project name
    CRATE_NAME: polylabel-rs
    # 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
  - cargo rustc --target %TARGET% --release -- -C target-feature=+crt-static
  # Cython build expects name.lib, not name.dll.lib
  - cp target\%TARGET%\release\deps\polylabel.dll.lib target\%TARGET%\release\deps\polylabel.lib

  # OLD build artifacts for generating a .def, needed by the MinGW Python build
  # - cargo rustc --target %TARGET% --release -- -C target-cpu=native -C link-args=-Wl,--out-implib,polylabel.a
  # - dlltool -z target\%TARGET%\release\polylabel.def --export-all-symbols target\%TARGET%\release\polylabel.dll
  # - dir target\%TARGET%\release
  # - appveyor PushArtifact target\%TARGET%\release\polylabel.def

  - dir target\%TARGET%\release
  - dir target\%TARGET%\release\deps
  - dumpbin /exports target\%TARGET%\release\polylabel.dll > dumpbin_exports.txt
  - dumpbin /dependents target\%TARGET%\release\polylabel.dll > dumpbin_dependents.txt
  - appveyor PushArtifact dumpbin_exports.txt
  - appveyor PushArtifact dumpbin_dependents.txt
  - 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: mJlu7lwGqi3BVMm8IyWdRrzhmHqTSCMz0LacJUovMrq6MdHrAiHqkts3fS1EuoD0
  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