simh-testsetgenerator/appveyor.yml
B. Scott Michel 30b74dbd73 appveyor.yml build, dep lib version number updates
- Give appveyor.yml some much needed attention. Specifically, work
  around the CMake build termination when the issuing the "CMake is too
  old to produce packages" warning message. There's something funky with
  how Appveyor's runtime interacts with PowerShell and
  warning/diagnostic output ends up terminating builds unexpectedly.
  Appveyor's technical support says to write the CI/CD script using the
  old DOS CMD interpreter, not PowerShell.

- Cut down the number of builds. Older Visual Studio VM images are still
  in the appveyor.yml matrix, just commented out.

- dep-locate.cmake: Update dependency library version numbers to reflect
  recent releases for libpng16, SDL and SDL_ttf. This affects the XP
  "legacy" CMake builds on Github CI/CD, Appveyor's VS 2017 and earlier
  VM images that build the minimal SIMH dependency library support
  (i.e., environments where vcpkg is known not to work.)
2023-07-15 17:20:26 -04:00

173 lines
5.4 KiB
YAML

cache:
- cmake\dependencies -> appveyor.yml, **\CMakeLists.txt, cmake\dep-targets.cmake
## shallow_clone: true
## clone_depth: 50
environment:
DIST_DIR: '%APPVEYOR_BUILD_FOLDER%\dist'
CMAKE_DIST_DIR: C:/projects/simh/dist
matrix:
##+
## The matrix is ordered by relative popularity/priority:
##-
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
SIMH_BUILD_FLAVOR: vs2022
## Static library support available in this vcpkg install.
VCPKG_ROOT: C:\Tools\vcpkg
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
SIMH_BUILD_FLAVOR: vs2019
## Static library support available in this vcpkg install.
VCPKG_ROOT: C:\Tools\vcpkg
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
SIMH_BUILD_FLAVOR: vs2017
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
SIMH_BUILD_FLAVOR: vs2022-xp
## These Appveyor VM images exist, aren't strictly needed to build XP-compatible
## executables.
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# SIMH_BUILD_FLAVOR: vs2019-xp
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# SIMH_BUILD_FLAVOR: vs2017-xp
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# SIMH_BUILD_FLAVOR: vs2015
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
SIMH_BUILD_FLAVOR: ninja
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004
SIMH_BUILD_FLAVOR: unix
## Older image -- still needed?
# - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu1604
# SIMH_BUILD_FLAVOR: unix
## These images have cmake 3.12, which is too old. Could build if
## cmake were upgraded in the image in the before_build stanza, but
## that subverts the image's purpose.
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
# SIMH_BUILD_FLAVOR: vs2013
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2012
# SIMH_BUILD_FLAVOR: vs2012
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2008
# SIMH_BUILD_FLAVOR: vs2008
## - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
## SIMH_BUILD_FLAVOR: mingw
## MINGW: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0
## Here's how you would build with Ninja. It's going to build the same executables
## as the MinGW flavor, which is why it's skipped here.
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# SIMH_BUILD_FLAVOR: ninja
# MINGW: C:\msys64\mingw32\bin
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# SIMH_BUILD_FLAVOR: 2017
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# SIMH_BUILD_FLAVOR: 2015
matrix:
## Bail if a job fails, don't start new ones.
fast_finish: true
skip_commits:
files:
- 'doc/*'
- '**/*.md'
configuration:
- Debug
- Release
build:
parallel: true # enable MSBuild parallel builds
verbosity: minimal
before_build:
- cmd: |
if "%SIMH_BUILD_FLAVOR%"=="ninja" ( choco install ninja )
if not exist "cmake\dependencies" ( mkdir "cmake\dependencies" )
- sh: |
case "${APPVEYOR_BUILD_WORKER_IMAGE}" in
Ubuntu*)
## .travis/deps.sh will try to install cmake, but that's not desirable
sudo apt-get update -yqqm
sudo apt-get install -ym pkg-config
sudo apt-get install -ym libpcre3-dev
sudo apt-get install -ym libegl1-mesa-dev libgles2-mesa-dev
sudo apt-get install -ym libsdl2-dev libpcap-dev libvdeplug-dev
sudo apt-get install -ym libsdl2-ttf-dev
sudo apt-get install -ym libedit-dev
;;
*)
echo "Update before_build for ${APPVEYOR_BUILD_WORKER_IMAGE}"
exit 99
esac
build_script:
## Need to use cmd, per Appveyor support. PowerShell has issues with output.
## Specifically, when CMake prints the "old CMake version, won't CPack" warning,
## Appveyor terminates the build injudiciously. The workaround is cmd.
##
## LTO works reliably on VS 2022 and 2019. Hangs while building SEL32 on VS 2017.
- cmd: |
SETLOCAL EnableExtensions
if not "%MINGW%"=="" ( set "PATH=%MINGW%;%PATH%" )
if "%SIMH_BUILD_FLAVOR%"=="vs2022" set LTO=-lto
if "%SIMH_BUILD_FLAVOR%"=="vs2019" set LTO=-lto
powershell -File .\cmake\cmake-builder.ps1 -flavor %SIMH_BUILD_FLAVOR% -config %CONFIGURATION% %LTO% -parallel -clean -notest -noinstall -verbose
- sh: |
case "${APPVEYOR_BUILD_WORKER_IMAGE}" in
Ubuntu1604)
## LTO support is either incompletely installed or not installed at all.
LTO=
;;
*)
LTO="--lto"
;;
esac
cmake/cmake-builder.sh --flavor ${SIMH_BUILD_FLAVOR} --config ${CONFIGURATION} ${LTO} \
--verbose --parallel --clean --notest --noinstall
test_script:
# - ps: |
# if ($isWindows) {
# Write-Output "cmake\cmake-builder.ps1 -testonly -config ${env:CONFIGURATION} -flavor ${env:SIMH_BUILD_FLAVOR}"
# cmake\cmake-builder.ps1 -testonly -config ${env:CONFIGURATION} -flavor ${env:SIMH_BUILD_FLAVOR}
# }
- cmd: |
powershell -File .\cmake\cmake-builder.ps1 -flavor %SIMH_BUILD_FLAVOR% -config %CONFIGURATION% -testonly
- sh: |
cmake/cmake-builder.sh --testonly --config ${CONFIGURATION} --flavor ${SIMH_BUILD_FLAVOR}
##+
## Don't package artifacts -- only GitHub does this now.
##-
# after_test:
#
# artifacts:
# - path: PACKAGES\*.zip
# notifications:
# - provider: Email
# to:
# - Mark@infocomm.com
# - lars@nocrew.org
# on_build_success: false