shithub: libsamplerate

ref: f42f97f3312e342568f8d3cb432e44944e9768b5
dir: /appveyor.yml/

View raw version
image:
- Visual Studio 2017

environment:
  matrix:
    - generator: "Visual Studio 15 2017"
      artifact: "ON"
    - generator: "MSYS Makefiles"
      artifact: "ON"
    - generator: "Visual Studio 15 2017"
      shared: "OFF"
      artifact: "OFF"
    - generator: "Visual Studio 15 2017"
      shared: "ON"
      artifact: "OFF"
    - generator: "MSYS Makefiles"
      shared: "OFF"
      artifact: "OFF"
    - generator: "MSYS Makefiles"
      shared: "ON"
      artifact: "OFF"

matrix:
  fast_finish: true

build_script:
  - ps: |
      $env:Path = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;" + $env:Path
      bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-fftw mingw-w64-x86_64-libsndfile"
      mkdir build
      cd build
      if ($env:artifact -eq 'OFF')
      {
          cmake -G "$env:generator" -DBUILD_SHARED_LIBS=$env:shared ..
          cat config.h
          cmake --build .
          ctest -C "Debug"
      }
      else
      {
          cmake .. -G "$env:generator" -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=artifact
          cmake --build . --config Release --target install
          cmake .. -G "$env:generator" -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=artifact
          cmake --build . --config Release --target install
          Compress-Archive -Path artifact\* -Destination artifact
          Push-AppveyorArtifact artifact.zip
      }