# =============================================================================
# General configuration
# =============================================================================
# Virtual Machine Image
image: WMF 5
# Build names
version: '{branch}-{build}'
# Branches to build
branches:
  except:
    - travis

# =============================================================================
# Build matrix configuration
# =============================================================================
environment:
  matrix:
    - BUILD_MINGW: mingw32
      BUILD_BACKEND: mcode
# Not yet functionnal
#    - BUILD_MINGW: mingw32
#      BUILD_BACKEND: llvm
# mcode is not yet supported on Win64
#    - BUILD_MINGW: mingw64
#      BUILD_BACKEND: mcode
    - BUILD_MINGW: mingw64
      BUILD_BACKEND: llvm

# =============================================================================
# Build flow configuration
# =============================================================================
# initialization scripts to run
init:
  - ps: Write-Host "Initializing virtual machine ..."
  - ps: $env:PATH = "C:\msys64\$($env:BUILD_MINGW)\bin;C:\msys64\usr\bin;" + $env:PATH
#  - ps: Import-Module .\dist\appveyor\shared.psm1 -Verbose

# installation scripts to run
install:
  - ps: .\dist\windows\appveyor\install.ps1
  - ps: .\dist\windows\appveyor\info.ps1

# Build flow
# Disable MSBuild
build: off
# build scripts to run
build_script:
  - ps: .\dist\windows\appveyor\build.ps1

# Test flow
# test scripts to run
test_script:
  - ps: .\dist\windows\appveyor\test.ps1


# =============================================================================
# Deployment configuration
# =============================================================================
deploy:
  - provider: GitHub
    release: $(APPVEYOR_REPO_TAG_NAME)
    description: 'Release'
    draft: true
    prerelease: false
    artifact: /.*\.zip/
    on:
      appveyor_repo_tag: true
    auth_token:
      secure: Qli1B9/I6B1uTMeyGolw8N/zh/PRhLdT8fjUUTcd4Vp14UQki+YTjxKjAe+65Oqv