diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..84e2906 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,95 @@ +# .appveyor.yml for use with EPICS Base ci-scripts +# (see: https://github.com/epics-base/ci-scripts) + +# This is YAML - indentation levels are crucial + +#---------------------------------# +# repository cloning # +#---------------------------------# + +# Called at very beginning, before repo cloning +init: + # Set autocrlf to make batch files work + - git config --global core.autocrlf true + +# Set clone depth (do not fetch complete history) +clone_depth: 50 + +# Skipping commits affecting only specific files +skip_commits: + files: + - 'documentation/*' + - 'templates/*' + - '**/*.html' + - '**/*.md' + +#---------------------------------# +# build matrix configuration # +#---------------------------------# + +# Build Configurations: dll/static, regular/debug +configuration: + - dynamic + - static + - dynamic-debug + - static-debug + +# Environment variables: compiler toolchain +environment: + SETUP_PATH: . + + matrix: + - CC: mingw + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + BASE: 7.0 + - CC: vs2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + BASE: 7.0 + - CC: vs2017 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + BASE: 7.0 + - CC: vs2015 + BASE: 7.0 + +# Platform: architecture +platform: + - x64 + +#---------------------------------# +# building & testing # +#---------------------------------# + +install: + - cmd: git submodule update --init --recursive + - cmd: python .ci/appveyor/do.py prepare + - cmd: python .ci/appveyor/do.py exec python .ci-local/appveyor-libevent.py + +build_script: + - cmd: python .ci/appveyor/do.py build + +test_script: + - cmd: python .ci/appveyor/do.py --add-path "{TOP}\bundle\usr-{EPICS_HOST_ARCH}\lib" test + +on_finish: + - ps: Get-ChildItem *.tap -Recurse -Force | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name } + - cmd: python .ci/appveyor/do.py build test-results -s + + +#---------------------------------# +# debugging # +#---------------------------------# + +## if you want to connect by remote desktop to a failed build, uncomment these lines +## note that you will need to connect within the usual build timeout limit (60 minutes) +## so you may want to adjust the build matrix above to just build the one of interest + +#on_failure: +# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) +# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + +#---------------------------------# +# notifications # +#---------------------------------# + +notifications: + - provider: GitHubPullRequest diff --git a/.ci b/.ci index 7de5a7e..a8c44ae 160000 --- a/.ci +++ b/.ci @@ -1 +1 @@ -Subproject commit 7de5a7edc391d1b908828f2aa8118a5a6ce27021 +Subproject commit a8c44aeed8598c7cc369634deecb5c9a3d2a4141 diff --git a/.ci-local/appveyor-libevent.py b/.ci-local/appveyor-libevent.py new file mode 100644 index 0000000..f9de722 --- /dev/null +++ b/.ci-local/appveyor-libevent.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python + +from __future__ import print_function + +import sys +import os +from glob import glob +import subprocess as SP + +def check_call(cmd, shell=True, env=None): + print('CALLING', repr(cmd)) + sys.stdout.flush() + sys.stderr.flush() + SP.check_call(cmd, shell=shell, env=env) + sys.stdout.flush() + sys.stderr.flush() + print('CALLED', repr(cmd)) + +check_call('cmake --version') +check_call('cmake --help') + +print('ENV') +[print(" ", frag) for frag in os.environ['PATH'].split(os.pathsep)] +print('PATH') +[print(" ", K, "=", V) for K, V in os.environ.items()] + +# environment for sub-process +env=os.environ.copy() +CC = env.pop('CC') # both ci-scripts and cmake use this, with different sets of values... +make = env.pop('MAKE', 'make') + +if CC=='mingw': + print('mingw versions') + for loc in glob(r'C:\mingw-w64\*\*\bin\gcc.exe'): + print(' ', loc) + check_call('gcc --version') + +# CMake MinGW generator doesn't like sh.exe in PATH +# NMake generator doesn't care +# strip it out +env['PATH'] = os.pathsep.join([ent for ent in env['PATH'].split(os.pathsep) if not os.path.isfile(os.path.join(ent, 'sh.exe'))]) + +check_call("{} -C bundle libevent".format(make), + env=env) diff --git a/defaults.set b/defaults.set index fbc341b..1e35c18 100644 --- a/defaults.set +++ b/defaults.set @@ -3,3 +3,4 @@ BASE_DIRNAME=base BASE_REPONAME=epics-base BASE_REPOOWNER=epics-base BASE_VARNAME=EPICS_BASE +BASE_RECURSIVE=no