forked from open-simh/simh
-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
173 lines (142 loc) · 5.4 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
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:
# on_build_success: false