<commit_before>version: 0.1.8.{build}

platform:
  - x64

environment:
  APPVEYOR_SAVE_CACHE_ON_ERROR : true
#  VCPKG_DEFAULT_HOST_TRIPLET: x64-windows

cache:
  - c:\Users\appveyor\AppData\Local\vcpkg\archives\
#  - c:\tools\vcpkg\installed\

image:
  - Visual Studio 2019

skip_tags: true

skip_branch_with_pr: true

build:
  verbosity: detailed

clone_folder: c:\projects\cdt-plusplus

shallow_clone: true

configuration: Release

clone_script:
  - cmd: >-
      git clone -q --recursive --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER%
      && cd %APPVEYOR_BUILD_FOLDER%
      && git checkout -qf %APPVEYOR_REPO_COMMIT%
      && git submodule update --init --recursive

install:
  #  - if not exist "c:\projects\dev" (
  #      mkdir c:\projects\dev
  #      cd c:\projects\dev
  #      set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip"
  #      appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
  #      7z x ninja.zip -oC:\projects\dev\ninja > nul
  #    )
  - mkdir C:\projects\dev
  - cd C:\projects\dev
  # Install Ninja
  - set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-win.zip"
  - appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
  - 7z x ninja.zip -oC:\projects\dev\ninja > nul
  - set PATH=%PATH%;C:\projects\dev\ninja
  - ninja --version
  - set CMAKE_MAKE_PROGRAM=C:\projects\dev\ninja\ninja.exe
  # Setup vcpkg
  - cd c:\tools\vcpkg
  - git pull origin master --no-rebase
  - .\bootstrap-vcpkg.bat
  - set VCPKG_ROOT=c:/tools/vcpkg
  - set PATH=%PATH%;%VCPKG_ROOT%
  - vcpkg integrate install
  - cmake --version
  # Install required libraries in classic mode
#  - vcpkg install catch2:x64-windows
#  - vcpkg install docopt:x64-windows
#  - vcpkg install date:x64-windows
#  - vcpkg install fmt:x64-windows
#  - vcpkg install ms-gsl:x64-windows
#  - vcpkg install eigen3:x64-windows
#  - vcpkg install pcg:x64-windows
#  - vcpkg install tbb:x64-windows
  # CGAL requires GMP which requires yasm-tool:x86-windows, even if you are using x64-windows.
#  - vcpkg install --recurse yasm-tool:x86-windows
#  - vcpkg install cgal:x64-windows
  - vcpkg install --x-install-root=c:\projects\cdt-plusplus\vcpkg_installed catch2:x64-windows docopt:x64-windows date:x64-windows fmt:x64-windows ms-gsl:x64-windows eigen3:x64-windows pcg:x64-windows tbb:x64-windows
  - vcpkg install --x-install-root=c:\projects\cdt-plusplus\vcpkg_installed --recurse yasm-tool:x86-windows
  - vcpkg install --x-install-root=c:\projects\cdt-plusplus\vcpkg_installed cgal:x64-windows
  # Upgrade required libraries
  - vcpkg upgrade --no-dry-run
  - vcpkg list
  # Setup Clang-cl
  - set PATH=%PATH%;"C:\Program Files\LLVM\bin"
  - clang-cl -v
  - set CC=clang-cl -mrtm
  - set CXX=clang-cl -mrtm
  # Visual Studio 2019
  - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
  - set CMAKE_CXX_COMPILER="C:\Program Files\LLVM\bin\clang-cl"

before_build:
  - cd %APPVEYOR_BUILD_FOLDER%
#  - vcpkg install --feature-flags=manifests

build_script:
#  - mkdir build
#  - cd build || exit
  #  - cmake -G Ninja -DCMAKE_MAKE_PROGRAM=c:\projects\dev\ninja\ninja.exe -D VCPKG_TARGET_TRIPLET=x86-windows -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake ..
  - cmake -G Ninja -D CMAKE_BUILD_TYPE=Release -D ENABLE_CACHE=OFF -D VCPKG_MANIFEST_MODE=OFF -D VCPKG_MANIFEST_INSTALL=OFF -S . -B build
  - cmake --build build

on_success:
  - cmake --build . --target test & exit 0

notifications:
  - provider: Email
    to:
      - <EMAIL>
    on_build_status_changed: true

#on_failure:<commit_msg>(ci) Cleanup AppVeyor<commit_after>version: 0.1.8.{build}

skip_tags: true

skip_branch_with_pr: true

image:
  - Visual Studio 2019

clone_folder: c:\projects\cdt-plusplus

shallow_clone: true

clone_script:
  - cmd: >-
      git clone -q --recursive --branch=%APPVEYOR_REPO_BRANCH% https://github.com/%APPVEYOR_REPO_NAME%.git %APPVEYOR_BUILD_FOLDER%
      && cd %APPVEYOR_BUILD_FOLDER%
      && git checkout -qf %APPVEYOR_REPO_COMMIT%
      && git submodule update --init --recursive

environment:
  #  APPVEYOR_SAVE_CACHE_ON_ERROR : true
  VCPKG_DEFAULT_TRIPLET: x64-windows
  VCPKG_ROOT: c:\tools\vcpkg
  CMAKE_MAKE_PROGRAM: C:\projects\dev\ninja\ninja.exe

cache:
  - c:\Users\appveyor\AppData\Local\vcpkg\archives\
  - c:\projects\dev\ninja\

install:
  # Install Ninja
  - if not exist "c:\projects\dev" (
      mkdir c:\projects\dev
      cd c:\projects\dev
      set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-win.zip"
      appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
      7z x ninja.zip -oC:\projects\dev\ninja > nul
    )
  - set PATH=%PATH%;C:\projects\dev\ninja
  - ninja --version
  # Setup vcpkg
  - cd c:\tools\vcpkg
  - git pull origin master --no-rebase
  - .\bootstrap-vcpkg.bat
  - set PATH=%PATH%;%VCPKG_ROOT%
  - vcpkg integrate install
  - cmake --version
  # Install required libraries in classic mode
  - set VCPKG_INSTALL_ROOT=%APPVEYOR_BUILD_FOLDER%\vcpkg_installed
  - vcpkg install --x-install-root=%VCPKG_INSTALL_ROOT% catch2 docopt date fmt ms-gsl eigen3 pcg tbb
  # CGAL requires GMP which requires yasm-tool:x86-windows, even if you are using x64-windows.
  - vcpkg install --x-install-root=%VCPKG_INSTALL_ROOT% --recurse yasm-tool:x86-windows
  - vcpkg install --x-install-root=%VCPKG_INSTALL_ROOT% cgal
  # Upgrade required libraries
  - vcpkg upgrade --no-dry-run --x-install-root=%VCPKG_INSTALL_ROOT%
  - vcpkg list --x-install-root=%VCPKG_INSTALL_ROOT%
  # Setup Clang-cl
  - set PATH=%PATH%;"C:\Program Files\LLVM\bin"
  - clang-cl -v
  - set CC=clang-cl -mrtm
  - set CXX=clang-cl -mrtm
  # Visual Studio 2019
  - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
  - set CMAKE_CXX_COMPILER="C:\Program Files\LLVM\bin\clang-cl"

platform:
  - x64

configuration: Release

build:
  verbosity: detailed

before_build:
  - cd %APPVEYOR_BUILD_FOLDER%
#  - vcpkg install --feature-flags=manifests

build_script:
  - cmake -G Ninja -D CMAKE_BUILD_TYPE=Release -D ENABLE_CACHE=OFF -D VCPKG_MANIFEST_MODE=OFF -D VCPKG_MANIFEST_INSTALL=OFF -S . -B build
  - cmake --build build

on_success:
  - cmake --build . --target test & exit 0

notifications:
  - provider: Email
    to:
      - <EMAIL>
    on_build_status_changed: true

#on_failure:
{'fraction_non_alphanumeric': 0.12470952749806352, 'fraction_numerical': 0.018590240123934933, 'mean_word_length': 3.3562753036437245, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '172659', 'n_tokens_mistral': 2706, 'n_tokens_neox': 2546, 'n_words': 478}