forked from coin3d/coin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor_mingw.yml
263 lines (246 loc) · 13 KB
/
appveyor_mingw.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
version: 4.0.0-{branch}-ci-{build}
branches:
only:
- master
- /v\d*\.\d*\.\d*/
# do not build feature branches with open pull requests
skip_branch_with_pr: true
#shallow clone does not work when submodules are involved!
#shallow_clone: true
matrix:
fast_finish: true # set this flag to immediately finish build once one of the jobs fails.
environment:
SUPERGLU_VERSION: 1.3.0
GH_AUTH_TOKEN:
secure: 850frgRGZcc4Cljd2P7Ej68no4/kkl4EMB+DjnX725wcKBRJuFk/kGRdJGyKXd2u
matrix:
# - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
# CMAKE_GENERATOR: 'Unix Makefiles'
# CMAKE_PLATFORM: x86
# CMAKE_ARCH_FLAGS: -m32
# COMPILER_ID: gcc
#
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
CMAKE_GENERATOR: 'Unix Makefiles'
CMAKE_PLATFORM: x64
CMAKE_ARCH_FLAGS: -m64
COMPILER_ID: gcc
# older compilers are supported in a separate appveyor project
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# BOOST_VERSION: 1_69_0
# CMAKE_GENERATOR: 'Visual Studio 10 2010'
# CMAKE_ARCHITECTURE: Win32
# CMAKE_PLATFORM: x86
# COMPILER_ID: msvc10
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# BOOST_VERSION: 1_69_0
# CMAKE_GENERATOR: 'Visual Studio 10 2010'
# CMAKE_ARCHITECTURE: x64
# CMAKE_PLATFORM: x64
# COMPILER_ID: msvc10
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# BOOST_VERSION: 1_69_0
# CMAKE_GENERATOR: 'Visual Studio 14 2015'
# CMAKE_ARCHITECTURE: Win32
# CMAKE_PLATFORM: x86
# COMPILER_ID: msvc14
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
# BOOST_VERSION: 1_69_0
# CMAKE_GENERATOR: 'Visual Studio 14 2015'
# CMAKE_ARCHITECTURE: x64
# CMAKE_PLATFORM: x64
# COMPILER_ID: msvc14
#
# newer compilers are supported in a separate appveyor project
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# BOOST_VERSION: 1_69_0
# CMAKE_GENERATOR: 'Visual Studio 15 2017'
# CMAKE_ARCHITECTURE: Win32
# CMAKE_PLATFORM: x86
# COMPILER_ID: msvc15
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
# BOOST_VERSION: 1_69_0
# CMAKE_GENERATOR: 'Visual Studio 15 2017'
# CMAKE_ARCHITECTURE: x64
# CMAKE_PLATFORM: x64
# COMPILER_ID: msvc15
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# BOOST_VERSION: 1_71_0
# CMAKE_GENERATOR: 'Visual Studio 16 2019'
# CMAKE_ARCHITECTURE: Win32
# CMAKE_PLATFORM: x86
# COMPILER_ID: msvc16
#
# - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# BOOST_VERSION: 1_71_0
# CMAKE_GENERATOR: 'Visual Studio 16 2019'
# CMAKE_ARCHITECTURE: x64
# CMAKE_PLATFORM: x64
# COMPILER_ID: msvc16
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_GENERATOR: 'MSYS Makefiles'
CMAKE_PLATFORM: i686
COMPILER_ID: mingw32
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
CMAKE_GENERATOR: 'MSYS Makefiles'
CMAKE_PLATFORM: x86_64
COMPILER_ID: mingw64
install:
- sh: |
sudo apt-get -y update
cd $APPVEYOR_BUILD_FOLDER
if [ "$CMAKE_PLATFORM" == "x86" ]
then
sudo apt-get -y install freeglut3-dev:i386
elif [ "$CMAKE_PLATFORM" == "x64" ]
then
sudo apt-get -y install freeglut3-dev
fi
sudo apt-get -y install doxygen gcc-multilib g++-multilib jq libboost-all-dev
- cmd: |
choco install jq
rem Work around for outdated curl version giving problems with GitHub Authentication when redirected.
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set PATH=C:\msys64\%COMPILER_ID%\bin;C:\msys64\usr\bin\;%PATH%
curl --version
cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
# Assumes that we use the vx.y.z tagging scheme (e.g. v1.3.0)
before_build:
- cmd: |
C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Syu"
C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy mingw-w64-%CMAKE_PLATFORM%-boost"
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" for /f %%i in ('gcc -dumpversion') do set GCC_VERSION=%%i
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set COMPILER_ID=mingw-gcc%GCC_VERSION:.=%
if defined APPVEYOR_REPO_TAG_NAME (set CI_REPO_VERSION=%APPVEYOR_REPO_TAG_NAME:~1%) else (set CI_REPO_VERSION=latest)
set BUILD_SOURCE_ARCHIVE=%APPVEYOR_PROJECT_NAME%-%CI_REPO_VERSION%-src.zip
7z a -xr!*\.git/ -tzip %BUILD_SOURCE_ARCHIVE% %APPVEYOR_BUILD_FOLDER%
C:\msys64\usr\bin\md5sum.exe -b %BUILD_SOURCE_ARCHIVE% > %BUILD_SOURCE_ARCHIVE%.md5
C:\msys64\usr\bin\sha256sum.exe -b %BUILD_SOURCE_ARCHIVE% > %BUILD_SOURCE_ARCHIVE%.sha256
mkdir %APPVEYOR_BUILD_FOLDER%\downloads
rem ##############
if defined APPVEYOR_REPO_TAG_NAME (set SUPERGLU_REPO_VERSION=%SUPERGLU_VERSION%) else (set SUPERGLU_REPO_VERSION=latest)
if defined APPVEYOR_REPO_TAG_NAME (set SUPERGLU_REPO_TAG_NAME=superglu-%SUPERGLU_VERSION%) else (set SUPERGLU_REPO_TAG_NAME=CI-builds)
set DOWNLOAD_FILE_SUPERGLU=superglu-%SUPERGLU_REPO_VERSION%-%COMPILER_ID%-%CMAKE_PLATFORM%.zip
for /f %%i in ('curl -s -H "Authorization: token %GH_AUTH_TOKEN%" https://api.github.com/repos/coin3d/superglu/releases ^| jq -r --arg SUPERGLU_REPO_TAG_NAME "%SUPERGLU_REPO_TAG_NAME%" ".[] | select(.tag_name==$SUPERGLU_REPO_TAG_NAME) | .id"') do set RELEASE_ID=%%i
for /f %%i in ('curl -s -H "Authorization: token %GH_AUTH_TOKEN%" https://api.github.com/repos/coin3d/superglu/releases/%RELEASE_ID% ^| jq -r --arg DOWNLOAD_FILE_SUPERGLU "%DOWNLOAD_FILE_SUPERGLU%" ".assets[] | select(.name==$DOWNLOAD_FILE_SUPERGLU) | .id"') do set ASSET_ID=%%i
set DOWNLOAD_ADDRESS_SUPERGLU=https://api.github.com/repos/coin3d/superglu/releases/assets/%ASSET_ID%
echo download file %DOWNLOAD_FILE_SUPERGLU% from address %DOWNLOAD_ADDRESS_SUPERGLU%
curl -s -S -L -H "Authorization: token %GH_AUTH_TOKEN%" -H "Accept: application/octet-stream" -o %DOWNLOAD_FILE_SUPERGLU% %DOWNLOAD_ADDRESS_SUPERGLU%
7z x %DOWNLOAD_FILE_SUPERGLU% -o%APPVEYOR_BUILD_FOLDER%\downloads
rem ##############
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" cmake -H. -Bbuild_debug -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_POSITION_INDEPENDENT_CODE=true -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/Coin3D -DCMAKE_PREFIX_PATH=%APPVEYOR_BUILD_FOLDER%/downloads/Coin3D -DUSE_SUPERGLU=ON
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" cmake -H. -Bbuild_release -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=true -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/Coin3D -DCMAKE_PREFIX_PATH=%APPVEYOR_BUILD_FOLDER%/downloads/Coin3D -DUSE_SUPERGLU=ON
if not "%CMAKE_GENERATOR%" == "MSYS Makefiles" cmake -H. -Bbuild -G "%CMAKE_GENERATOR%" -A %CMAKE_ARCHITECTURE% -DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\Coin3D -DUSE_SUPERGLU=ON
- sh: |
if [ -n "${APPVEYOR_REPO_TAG_NAME}" ]; then export CI_REPO_VERSION=${APPVEYOR_REPO_TAG_NAME:1}; else export CI_REPO_VERSION=latest; fi
BUILD_SOURCE_ARCHIVE=$APPVEYOR_PROJECT_NAME-$CI_REPO_VERSION-src.tar.gz
if [ ! -d "$APPVEYOR_BUILD_FOLDER/../$APPVEYOR_PROJECT_NAME" ]; then cp -r $APPVEYOR_BUILD_FOLDER $APPVEYOR_BUILD_FOLDER/../$APPVEYOR_PROJECT_NAME; fi
cd $APPVEYOR_BUILD_FOLDER/..
tar czf $BUILD_SOURCE_ARCHIVE --exclude .git $APPVEYOR_PROJECT_NAME
mv $BUILD_SOURCE_ARCHIVE $APPVEYOR_BUILD_FOLDER
cd $APPVEYOR_BUILD_FOLDER
md5sum -b $BUILD_SOURCE_ARCHIVE > $BUILD_SOURCE_ARCHIVE.md5
sha256sum -b $BUILD_SOURCE_ARCHIVE > $BUILD_SOURCE_ARCHIVE.sha256
mkdir $APPVEYOR_BUILD_FOLDER/downloads
export COMPILER_ID=$APPVEYOR_BUILD_WORKER_IMAGE-$COMPILER_ID`$COMPILER_ID -dumpversion | tr '.' '\n'`
###############
# if [ -n "${APPVEYOR_REPO_TAG_NAME}" ]; then export SUPERGLU_REPO_VERSION=$SUPERGLU_VERSION; else export SUPERGLU_REPO_VERSION=latest; fi
# if [ -n "${APPVEYOR_REPO_TAG_NAME}" ]; then export SUPERGLU_REPO_TAG_NAME=superglu-$SUPERGLU_VERSION; else export SUPERGLU_REPO_TAG_NAME=CI-builds; fi
# DOWNLOAD_FILE_SUPERGLU=superglu-$SUPERGLU_REPO_VERSION-$COMPILER_ID-$CMAKE_PLATFORM.tar.gz
# RELEASE_ID=`curl -s -H "Authorization: token $GH_AUTH_TOKEN" https://api.github.com/repos/coin3d/superglu/releases | jq -r --arg SUPERGLU_REPO_TAG_NAME "$SUPERGLU_REPO_TAG_NAME" '.[] | select(.tag_name==$SUPERGLU_REPO_TAG_NAME) | .id'`
# ASSET_ID=`curl -s -H "Authorization: token $GH_AUTH_TOKEN" https://api.github.com/repos/coin3d/superglu/releases/$RELEASE_ID | jq -r --arg DOWNLOAD_FILE_SUPERGLU "$DOWNLOAD_FILE_SUPERGLU" '.assets[] | select(.name==$DOWNLOAD_FILE_SUPERGLU) | .id'`
# export DOWNLOAD_ADDRESS_SUPERGLU=https://api.github.com/repos/coin3d/superglu/releases/assets/$ASSET_ID
# echo download file $DOWNLOAD_FILE_SUPERGLU from address $DOWNLOAD_ADDRESS_SUPERGLU
# curl -s -S -L -H "Authorization: token $GH_AUTH_TOKEN" -H "Accept: application/octet-stream" -o $DOWNLOAD_FILE_SUPERGLU $DOWNLOAD_ADDRESS_SUPERGLU
# tar xzf $DOWNLOAD_FILE_SUPERGLU -C $APPVEYOR_BUILD_FOLDER/downloads
###############
export CFLAGS=$CMAKE_ARCH_FLAGS
export CXXFLAGS=$CMAKE_ARCH_FLAGS
cmake -H. -Bbuild_debug -G "$CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_POSITION_INDEPENDENT_CODE=true -DCMAKE_INSTALL_PREFIX=$APPVEYOR_BUILD_FOLDER/Coin3D
cmake -H. -Bbuild_release -G "$CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=true -DCMAKE_INSTALL_PREFIX=$APPVEYOR_BUILD_FOLDER/Coin3D
build_script:
- cmd: |
set BUILD_TOOL_OPTIONS=/nologo /verbosity:minimal /maxcpucount
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" cmake --build build_debug --target install --config Debug -- -j4
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" cmake --build build_release --target install --config Release -- -j4
if not "%CMAKE_GENERATOR%" == "MSYS Makefiles" cmake --build build --target INSTALL --config Debug -- %BUILD_TOOL_OPTIONS%
if not "%CMAKE_GENERATOR%" == "MSYS Makefiles" cmake --build build --target INSTALL --config Release -- %BUILD_TOOL_OPTIONS%
- sh: |
BUILD_TOOL_OPTIONS=-j4
cmake --build build_debug --target install --config Debug -- $BUILD_TOOL_OPTIONS
cmake --build build_release --target install --config Release -- $BUILD_TOOL_OPTIONS
after_build:
- cmd: |
cd %APPVEYOR_BUILD_FOLDER%
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" for /f %%i in ('gcc -dumpversion') do set GCC_VERSION=%%i
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" set COMPILER_ID=mingw-gcc%GCC_VERSION:.=%
if defined APPVEYOR_REPO_TAG_NAME (set CI_REPO_VERSION=%APPVEYOR_REPO_TAG_NAME:~1%) else (set CI_REPO_VERSION=latest)
set BUILD_ARCHIVE=%APPVEYOR_PROJECT_NAME%-%CI_REPO_VERSION%-%COMPILER_ID%-%CMAKE_PLATFORM%.zip
7z a -tzip %BUILD_ARCHIVE% Coin3D
appveyor DownloadFile https://ci.appveyor.com/api/buildjobs/%APPVEYOR_JOB_ID%/log -FileName %APPVEYOR_PROJECT_NAME%-%CI_REPO_VERSION%-%COMPILER_ID%-%CMAKE_PLATFORM%.log
- sh: |
cd $APPVEYOR_BUILD_FOLDER
if [ -n "${APPVEYOR_REPO_TAG_NAME}" ]; then export CI_REPO_VERSION=${APPVEYOR_REPO_TAG_NAME:1}; else export CI_REPO_VERSION=latest; fi
BUILD_ARCHIVE=$APPVEYOR_PROJECT_NAME-$CI_REPO_VERSION-$COMPILER_ID-$CMAKE_PLATFORM.tar.gz
tar czf $BUILD_ARCHIVE Coin3D/*
appveyor DownloadFile https://ci.appveyor.com/api/buildjobs/$APPVEYOR_JOB_ID/log -FileName $APPVEYOR_PROJECT_NAME-$CI_REPO_VERSION-$COMPILER_ID-$CMAKE_PLATFORM.log
artifacts:
- path: $(APPVEYOR_PROJECT_NAME)*.zip
name: CIArchives
- path: $(APPVEYOR_PROJECT_NAME)*.tar.gz
name: CIArchivesTGZ
- path: $(APPVEYOR_PROJECT_NAME)*.log
name: logs
- path: $(APPVEYOR_PROJECT_NAME)*.md5
name: CImd5
- path: $(APPVEYOR_PROJECT_NAME)*.sha256
name: CIsha256
test_script:
- cmd: |
if "%CMAKE_GENERATOR%" == "MSYS Makefiles" cd build_release
if not "%CMAKE_GENERATOR%" == "MSYS Makefiles" cd build
rem ctest -C Release -VV
- sh: |
cd build_release
ctest -C Release -VV
notifications:
- provider: Email
to:
- '{{commitAuthorEmail}}'
on_build_success: false
on_build_failure: true
on_build_status_changed: true
deploy:
# Deploy to GitHub Releases
- provider: GitHub
auth_token:
secure: 850frgRGZcc4Cljd2P7Ej68no4/kkl4EMB+DjnX725wcKBRJuFk/kGRdJGyKXd2u # your encrypted token from GitHub
artifact: CIArchives, CIArchivesTGZ, CImd5, CIsha256, logs
tag: 'CI builds'
description: 'Results of CI builds for various platforms'
draft: false
prerelease: true
force_update: true
on:
APPVEYOR_REPO_TAG: false # deploy on untagged builds only
# branch: master # release from master branch only
# Deploy to GitHub Releases
- provider: GitHub
auth_token:
secure: 850frgRGZcc4Cljd2P7Ej68no4/kkl4EMB+DjnX725wcKBRJuFk/kGRdJGyKXd2u # your encrypted token from GitHub
artifact: CIArchives, CIArchivesTGZ, CImd5, CIsha256
tag: $(APPVEYOR_REPO_TAG_NAME)
description: 'Release build'
draft: true
prerelease: true
force_update: true
on:
APPVEYOR_REPO_TAG: true # deploy on tag push only