# set clone depth
clone_depth: 5                  # clone entire repository history if not defined

environment:
  GAPROOT: "gaproot"
  COVDIR: "coverage"
  matrix:
    - CYG_ARCH: x86
      CYG_ROOT: C:\cygwin
      ABI: 32
    - CYG_ARCH: x86_64
      CYG_ROOT: C:\cygwin64

install:
  - '%CYG_ROOT%\setup-%CYG_ARCH%.exe -qnNdO -R %CYG_ROOT% -s http://cygwin.mirror.constant.com -l %CYG_ROOT%/var/cache/setup -P libgmp-devel,zlib-devel'
  - SET "PATH=%CYG_ROOT%\bin;%PATH%"
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER && scripts/build_gap.sh"

# scripts that run after cloning repository
build_script:
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER && scripts/build_pkg.sh"

test_script:
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER && scripts/run_tests.sh"

on_success:
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER && scripts/gather-coverage.sh"
  - curl -s https://codecov.io/bash > codecov.sh
  - bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./codecov.sh"
