# DO NOT CHANGE the "init" and "install" sections below

# Download script file from GitHub
init:
  ps: |
        $ErrorActionPreference = "Stop"
        Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
        Import-Module '..\appveyor-tool.ps1'

install:
  ps: Bootstrap

cache:
  - C:\RLibrary

# Adapt as necessary starting from here

environment:
  global:
   USE_RTOOLS: true
   GCC_PATH: mingw_64
    # Default GCC_PATH appears to be gcc-4.6.3 which is now unsupported as from Rtools.exe v3.4
   R_CHECK_ARGS: --no-manual
    # R_CHECK_ARGS specified in order to turn off --as-cran as that can be slow
   BIOC_USE_DEVEL: true


  matrix:
   - R_VERSION: devel
     R_ARCH: x64
   - R_VERSION: devel
     R_ARCH: i386
   - R_VERSION: release
     R_ARCH: x64
   - R_VERSION: release
     R_ARCH: i386

  
build_script:
  - Rscript -e 'source("https://gist.githubusercontent.com/leandroroser/c9f8169cc842bd62b8792cc547edb903/raw/c8befc51f61d6c7e740d8c691c41a8f8dc7a177c/test_FastqCleaner_dependences.R")'
  - travis-tool.sh install_bioc BiocInstaller GenomeInfoDbData GenomicRanges IRanges S4Vectors DelayedArray # from source for problems during install
  - travis-tool.sh install_deps
  - set _R_CHECK_FORCE_SUGGESTS_=false

test_script:
  - travis-tool.sh run_tests
  
#on_failure:
#  - 7z a failure.zip *.Rcheck\*.log *.Rcheck\*.out *.Rcheck\*.fail *.Rcheck\*.Rout
#  - appveyor PushArtifact failure.zip
#
#artifacts:
#  - path: '*.Rcheck\**\*.log'
#    name: Logs
#
#  - path: '*.Rcheck\**\*.out'
#    name: Logs
#
#  - path: '*.Rcheck\**\*.fail'
#    name: Logs
#
#  - path: '*.Rcheck\**\*.Rout'
#    name: Logs

#  - path: '\*_*.tar.gz'
#    name: Bits
#
#  - path: '\*_*.zip'
  
    
notifications:

  # Email
  - provider: Email
    to:
      - [email protected]
    subject: 'Build {{status}}'                  # optional
    message: "{{message}}, {{commitId}}, {{status}}"    # optional
    on_build_status_changed: true