# =============================================================================
# General configuration
# =============================================================================
# Virtual Machine Image
image: Visual Studio 2019
# Build names
version: '{branch}-{build}'
# Branches to build
branches:
  except:
    - travis
skip_tags: true

# =============================================================================
# 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 .\scripts\appveyor\shared.psm1 -Verbose

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

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

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