2023-03-17 20:48:15 +00:00
|
|
|
# This CI setup provides a largely homogeneous configuration across all
|
|
|
|
# major platforms (Windows, MacOS, and Linux). The aim of this test setup is
|
|
|
|
# to create a "native" platform experience, using as few cross-platform
|
|
|
|
# helper tools as possible.
|
|
|
|
#
|
|
|
|
# All workers support remote login. Login details are shown at the top of each
|
|
|
|
# CI run log.
|
|
|
|
#
|
|
|
|
# - Linux/Mac workers (via SSH):
|
|
|
|
#
|
|
|
|
# - A permitted SSH key must be defined in an APPVEYOR_SSH_KEY environment
|
|
|
|
# variable (via the appveyor project settings)
|
|
|
|
#
|
|
|
|
# - SSH login info is given in the form of: 'appveyor@67.225.164.xx -p 22xxx'
|
|
|
|
#
|
|
|
|
# - Login with:
|
|
|
|
#
|
|
|
|
# ssh -o StrictHostKeyChecking=no <LOGIN>
|
|
|
|
#
|
|
|
|
# - to prevent the CI run from exiting, `touch` a file named `BLOCK` in the
|
|
|
|
# user HOME directory (current directory directly after login). The session
|
|
|
|
# will run until the file is removed (or 60 min have passed)
|
|
|
|
#
|
|
|
|
# - Windows workers (via RDP):
|
|
|
|
#
|
|
|
|
# - An RDP password should be defined in an APPVEYOR_RDP_PASSWORD environment
|
|
|
|
# variable (via the appveyor project settings), or a random password is used
|
|
|
|
# every time
|
|
|
|
#
|
|
|
|
# - RDP login info is given in the form of IP:PORT
|
|
|
|
#
|
|
|
|
# - Login with:
|
|
|
|
#
|
|
|
|
# xfreerdp /cert:ignore /dynamic-resolution /u:appveyor /p:<PASSWORD> /v:<LOGIN>
|
|
|
|
#
|
2023-08-02 15:58:07 +00:00
|
|
|
# - to prevent the CI run from exiting, create a textfile named
|
|
|
|
# `BLOCK.txt` in the currently directory after login. The session
|
2023-03-17 20:48:15 +00:00
|
|
|
# will run until the file is removed (or 60 min have passed)
|
|
|
|
|
2023-03-18 21:45:31 +00:00
|
|
|
# Do a shallow clone with enough commits that queued builds will still
|
|
|
|
# find the commit they want to build.
|
|
|
|
clone_depth: 100
|
|
|
|
|
2023-03-17 20:48:15 +00:00
|
|
|
environment:
|
|
|
|
# Do not use `image` as a matrix dimension, to have fine-grained control over
|
|
|
|
# what tests run on which platform
|
|
|
|
# The ID variable had no impact, but sorts first in the CI run overview
|
|
|
|
# an intelligible name can help to locate a specific test run
|
|
|
|
matrix:
|
|
|
|
# List a CI run for each platform first, to have immediate access when there
|
|
|
|
# is a need for debugging
|
|
|
|
|
|
|
|
# Windows core tests
|
|
|
|
- ID: WinP39core
|
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
2023-03-22 01:54:10 +00:00
|
|
|
STACK_ROOT: "c:\\sr"
|
2023-03-17 20:48:15 +00:00
|
|
|
# MacOS core tests
|
|
|
|
- ID: MacP38core
|
|
|
|
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
|
2023-03-22 01:54:10 +00:00
|
|
|
# Ubuntu core tests
|
|
|
|
# (disabled because it's not needed)
|
|
|
|
#- ID: Ubu20
|
|
|
|
# APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
|
2023-03-17 20:48:15 +00:00
|
|
|
|
|
|
|
# do not run the CI if only documentation changes were made
|
|
|
|
# documentation builds are tested elsewhere and cheaper
|
|
|
|
skip_commits:
|
|
|
|
files:
|
|
|
|
- doc/
|
|
|
|
- CHANGELOG
|
|
|
|
|
|
|
|
# it is OK to specify paths that may not exist for a particular test run
|
|
|
|
cache:
|
2023-03-22 01:54:10 +00:00
|
|
|
- C:\sr -> stack.yaml
|
|
|
|
- C:\Users\appveyor\AppData\Local\Programs\stack -> stack.yaml
|
|
|
|
- /Users/appveyor/.stack -> stack.yaml
|
2023-03-17 20:48:15 +00:00
|
|
|
|
|
|
|
# turn of support for MS project build support (not needed)
|
|
|
|
build: off
|
|
|
|
|
|
|
|
# init cannot use any components from the repo, because it runs prior to
|
|
|
|
# cloning it
|
|
|
|
init:
|
|
|
|
# remove windows 260-char limit on path names
|
|
|
|
- cmd: powershell Set-Itemproperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name LongPathsEnabled -value 1
|
|
|
|
# enable developer mode on windows
|
|
|
|
# this should enable mklink without admin privileges, but it doesn't seem to work
|
|
|
|
#- cmd: powershell tools\ci\appveyor_enable_windevmode.ps1
|
|
|
|
# enable RDP access on windows (RDP password is in appveyor project config)
|
|
|
|
# this is relatively expensive (1-2min), but very convenient to jump into any build at any time
|
|
|
|
- cmd: powershell.exe iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
|
|
|
|
|
|
|
install:
|
|
|
|
# enable external SSH access to CI worker on all other systems
|
|
|
|
# needs APPVEYOR_SSH_KEY defined in project settings (or environment)
|
|
|
|
- sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
|
2023-03-18 21:09:05 +00:00
|
|
|
# install stack (works on linux, OSX, and windows)
|
|
|
|
- curl -sSL https://get.haskellstack.org/ | sh
|
2023-03-17 20:48:15 +00:00
|
|
|
|
2023-03-22 01:54:10 +00:00
|
|
|
# Building dependencies takes almost too long on windows, so build without
|
|
|
|
# optimisation (including when building the dependencies)
|
|
|
|
before_build:
|
2023-08-02 16:48:12 +00:00
|
|
|
- sh: cp stack.yaml stack.yaml.build
|
|
|
|
- ps: cp stack-lts-18.13.yaml stack.yaml.build
|
2023-03-22 01:54:10 +00:00
|
|
|
- sh: 'echo "apply-ghc-options: everything" >> stack.yaml.build'
|
|
|
|
- ps: '"apply-ghc-options: everything" |Add-Content -Path .\stack.yaml.build'
|
|
|
|
- stack --stack-yaml stack.yaml.build build --only-dependencies --ghc-options=-O0
|
2023-03-17 20:48:15 +00:00
|
|
|
|
|
|
|
build_script:
|
2023-03-22 01:54:10 +00:00
|
|
|
- stack --stack-yaml stack.yaml.build build --copy-bins --ghc-options=-O0
|
2023-03-17 20:48:15 +00:00
|
|
|
|
|
|
|
#after_build:
|
|
|
|
#
|
|
|
|
|
|
|
|
#before_test:
|
|
|
|
#
|
|
|
|
|
2023-03-22 01:54:10 +00:00
|
|
|
# Cannot use stack run git-annex because it does not support --ghc-options
|
|
|
|
# and would rebuild all deps. Instead, use the binary --copy-bins installed.
|
2023-03-18 21:09:05 +00:00
|
|
|
test_script:
|
2023-03-22 01:54:10 +00:00
|
|
|
- cmd: C:\Users\appveyor\AppData\Roaming\local\bin\git-annex.exe test
|
|
|
|
- sh: ln -s $(stack path --local-bin)/git-annex git-annex
|
|
|
|
- sh: ln -s $(stack path --local-bin)/git-annex git-annex-shell
|
|
|
|
- sh: PATH=`pwd`:$PATH; export PATH; git-annex test
|
2023-03-17 20:48:15 +00:00
|
|
|
|
|
|
|
#after_test:
|
|
|
|
#
|
|
|
|
|
|
|
|
#on_success:
|
|
|
|
#
|
|
|
|
|
|
|
|
#on_failure:
|
|
|
|
#
|
|
|
|
|
|
|
|
on_finish:
|
|
|
|
# conditionally block the exit of a CI run for direct debugging
|
2023-03-18 21:09:05 +00:00
|
|
|
- sh: while [ -f ~/BLOCK ]; do sleep 5; done
|
2023-08-02 15:58:07 +00:00
|
|
|
- cmd: powershell.exe while ((Test-Path "C:\Users\\appveyor\\BLOCK.txt")) { Start-Sleep 5 }
|
2023-03-18 21:09:05 +00:00
|
|
|
# block exit until 60 minute timeout, for direct debugging
|
|
|
|
#- sh: while true; do sleep 5; done
|
|
|
|
#- cmd: powershell.exe while ($true) { Start-Sleep 5 }
|