-
Notifications
You must be signed in to change notification settings - Fork 9
/
appveyor.yml
186 lines (160 loc) · 8.05 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
174
175
176
177
178
179
180
181
182
183
184
185
186
os: Windows Server 2012 R2
platform:
- x86
- x64
configuration:
- Release
branches:
only:
- master
- devel
install:
# - git fetch --unshallow # Appveyor fetch already all of the repo, no need of unshallowing
- git fetch --tags
- git tag
- echo APPVEYOR_REPO_TAG_NAME %APPVEYOR_REPO_TAG_NAME%
- echo APPVEYOR_REPO_TAG %APPVEYOR_REPO_TAG%
- echo appveyor_repo_tag_name %appveyor_repo_tag_name%
- echo appveyor_repo_tag %appveyor_repo_tag%
- ps: echo $env:platform
- ps: if ($env:platform -eq 'x64') {$env:QTDIR = "C:\Qt\5.10\msvc2015_64"}
- ps: if ($env:platform -eq 'x86') {$env:QTDIR = "C:\Qt\5.10\msvc2015"}
- ps: echo $env:QTDIR
- ps: Get-ChildItem C:\Qt\5.10
- set PATH=%PATH%;%QTDIR%\bin
- ps: echo $env:APPVEYOR_PROJECT_SLUG
- echo %APPVEYOR_PROJECT_SLUG%
- echo %CD%
- ps: Get-ChildItem .
- ps: cd "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"
- cmd: if "%PLATFORM%" == "x64" call vcvarsall.bat amd64
- cmd: if "%PLATFORM%" == "x86" call vcvarsall.bat x86
# - cmd: vcvarsall amd64
- ps: cd "C:\projects\$env:APPVEYOR_PROJECT_SLUG"
- ps: New-Item -ItemType directory -Name lib | Out-Null
- ps: cd lib
- ps: echo "Install FFTW3"
- ps: if ($env:platform -eq 'x64') {$libfft = "fftw-3.3.4-dll64"}
- ps: if ($env:platform -eq 'x86') {$libfft = "fftw-3.3.4-dll32"}
- ps: echo $libfft
- ps: New-Item -ItemType directory -Name $libfft | Out-Null
- ps: cd $libfft
# - echo %CD%
- ps: Invoke-WebRequest "ftp://ftp.fftw.org/pub/fftw/$libfft.zip" -OutFile "$libfft.zip"
- ps: Get-ChildItem .
# - appveyor DownloadFile "ftp://ftp.fftw.org/pub/fftw/$libfft.zip"
- ps: 7z x "$libfft.zip" -y
- ps: lib /machine:$env:platform /def:libfftw3-3.def
- ps: Get-ChildItem .
- ps: cd ..
- ps: Move-Item "$libfft" libfft
# - ps: Get-ChildItem C:\projects\%APPVEYOR_PROJECT_SLUG%\lib\fftw-3.3.4-dll32
# - ps: lib /MACHINE:X86 /def:libfftw3-3.def # Needed only for MSVC (lib is still unrecognized command)
- ps: echo "Install libsndfile"
# - ps: New-Item -ItemType directory -Name libsndfile-1.0.25-w32
# - ps: cd libsndfile-1.0.25-w32
# - echo %CD%
# TODO Replace with original
# - appveyor DownloadFile http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.25-w64-setup.exe
# - libsndfile-1.0.25-w64-setup.exe /s
# - ps: Get-ChildItem "C:\Program Files\Mega-Nerd\libsndfile"
- ps: if ($env:platform -eq 'x64') {$libsndfile = "libsndfile-1.0.25-w64"}
- ps: if ($env:platform -eq 'x86') {$libsndfile = "libsndfile-1.0.25-w32"}
- ps: Invoke-WebRequest "http://gillesdegottex.eu/soft/$libsndfile.zip" -OutFile "$libsndfile.zip"
- ps: 7z x "$libsndfile.zip" -y
- ps: Move-Item "$libsndfile" libsndfile
# - ps: lib /MACHINE:X86 /def:libfftw3-3.def # Needed only for MSVC (lib is still unrecognized command)
# - ps: Get-ChildItem "c:\projects\%APPVEYOR_PROJECT_SLUG%\lib\$libsndfile"
# Leave lib folder
- ps: cd ..
# For packaging
# InnoSetup
# Directly from author (working)
# - appveyor DownloadFile http://www.jrsoftware.org/download.php/is.exe
# - is.exe /SP- /VERYSILENT /NORESTART /SUPPRESSMSGBOXES
# From Choco
- choco install -y InnoSetup
# - ps: Get-ChildItem "C:\Program Files (x86)\Inno Setup 5"
- echo %CD%
- git submodule update --init --recursive
# - ps: cd ..
# Install SDIF
# Doesn't compile anymore bcs of deprecated behaviors CMP0042 and CMP0054
- choco install cmake -version 3.8.0
- ps: Get-ChildItem "C:\Program Files\CMake\bin\"
- set PATH="C:\Program Files (x86)\CMake 3.8\bin\";%PATH%
- set PATH=C:\Program Files\CMake\bin;%PATH%
# - choco install make
- ps: cd external
- ps: New-Item -ItemType directory -Name sdif | Out-Null
- ps: cd sdif
- ps: New-Item -ItemType directory -Name easdif | Out-Null
- ps: Invoke-WebRequest "http://gillesdegottex.eu/soft/EASDIF_SDIF.1.4.26.zip" -OutFile "EASDIF_SDIF.zip"
- ps: 7z x "EASDIF_SDIF.zip" -y
- ps: Get-ChildItem "c:\projects\$env:APPVEYOR_PROJECT_SLUG\external\sdif\EASDIF_SDIF"
- ps: New-Item -ItemType directory -Name build | Out-Null
- ps: cd build
- ps: if ($env:platform -eq 'x86') {cmake -DSDIF_BUILD_STATIC:BOOL=ON -DEASDIF_BUILD_STATIC:BOOL=ON -DCMAKE_INSTALL_PREFIX:STRING=c:/projects/$env:APPVEYOR_PROJECT_SLUG/external/sdif/easdif ../EASDIF_SDIF}
- ps: if ($env:platform -eq 'x64') {cmake -G"Visual Studio 12 Win64" -DSDIF_BUILD_STATIC:BOOL=ON -DEASDIF_BUILD_STATIC:BOOL=ON -DCMAKE_INSTALL_PREFIX:STRING=c:/projects/$env:APPVEYOR_PROJECT_SLUG/external/sdif/easdif ../EASDIF_SDIF}
- ps: Get-ChildItem .
# - ps: if ($env:platform -eq 'x86') {msbuild libs.vcxproj /property:Platform=x86}
# - ps: if ($env:platform -eq 'x64') {msbuild libs.vcxproj /property:Platform=x64}
- ps: cmake --build . --config Release --target libs
- ps: Get-ChildItem "c:\projects\$env:APPVEYOR_PROJECT_SLUG\external\sdif\build\"
- ps: Get-ChildItem "c:\projects\$env:APPVEYOR_PROJECT_SLUG\external\sdif\build\bin\Release"
- ps: Get-ChildItem "c:\projects\$env:APPVEYOR_PROJECT_SLUG\external\sdif\build\lib\Release"
# - ps: msbuild INSTALL.vcxproj
- ps: New-Item -ItemType directory -Name ..\easdif\lib | Out-Null
- ps: Copy-Item lib\Release\* ..\easdif\lib
- ps: New-Item -ItemType directory -Name ..\easdif\bin | Out-Null
- ps: Copy-Item bin\Release\* ..\easdif\bin
- ps: New-Item -ItemType directory -Name ..\easdif\include | Out-Null
- ps: New-Item -ItemType directory -Name ..\easdif\include\easdif | Out-Null
- ps: Copy-Item SDIF\sdifconfig\sdif*.h ..\easdif\include
- ps: Copy-Item easdif\*.hpp ..\easdif\include\easdif
- ps: Copy-Item ..\EASDIF_SDIF\easdif\*.hpp ..\easdif\include\easdif
- ps: Copy-Item ..\EASDIF_SDIF\easdif\easdif.h ..\easdif\include\easdif
- ps: Get-ChildItem "c:\projects\$env:APPVEYOR_PROJECT_SLUG\external\sdif\easdif"
- ps: Get-ChildItem "c:\projects\$env:APPVEYOR_PROJECT_SLUG\external\sdif\easdif\bin"
- ps: Get-ChildItem "c:\projects\$env:APPVEYOR_PROJECT_SLUG\external\sdif\easdif\lib"
- ps: Get-ChildItem "c:\projects\$env:APPVEYOR_PROJECT_SLUG\external\sdif\easdif\include"
- ps: Get-ChildItem "c:\projects\$env:APPVEYOR_PROJECT_SLUG\external\sdif\easdif\include\easdif"
# Go back to the project's root
- ps: cd "c:\projects\$env:APPVEYOR_PROJECT_SLUG"
build_script:
# Compile
- qmake "CONFIG+=fft_fftw3 file_audio_libsndfile" "FILE_AUDIO_LIBDIR=C:\projects\%APPVEYOR_PROJECT_SLUG%\lib\libsndfile" "FFT_LIBDIR=C:\projects\%APPVEYOR_PROJECT_SLUG%\lib\libfft" "CONFIG+=file_sdif" "FILE_SDIF_LIBDIR=external\sdif\easdif" dfasma.pro
# - qmake "CONFIG+=fft_fftw3 file_audio_libsndfile" "FILE_AUDIO_LIBDIR=C:\projects\%APPVEYOR_PROJECT_SLUG%\lib\libsndfile" "FFT_LIBDIR=C:\projects\%APPVEYOR_PROJECT_SLUG%\lib\libfft" dfasma.pro
- set PATH=%PATH%;C:\Qt\Tools\QtCreator\bin
- C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Release
# Build package
- ps: Get-ChildItem c:\projects\$env:APPVEYOR_PROJECT_SLUG\lib
- ps: Get-ChildItem c:\projects\$env:APPVEYOR_PROJECT_SLUG\lib\libsndfile
- ps: Get-ChildItem c:\projects\$env:APPVEYOR_PROJECT_SLUG\lib\libfft
- ps: .\distrib\package_windows_appveyor.ps1 $env:platform
- ps: Move-Item distrib\dfasma_*_win*.exe .
- ps: Get-ChildItem .
#- ps: $GITPROJECTVERSION = (git describe --tags --always) | Out-String
#- ps: $GITPROJECTVERSION = $GITPROJECTVERSION -replace "`n|`r"
#- ps: echo "Version $GITPROJECTVERSION"
- echo APPVEYOR_REPO_TAG_NAME %APPVEYOR_REPO_TAG_NAME%
- echo appveyor_repo_tag_name %appveyor_repo_tag_name%
- if defined APPVEYOR_REPO_TAG_NAME set RELEASEVERSION=%APPVEYOR_REPO_TAG_NAME:~1%
- echo Version %RELEASEVERSION%
artifacts:
- path: dfasma_*_win*.exe
name: newinstallers # Reference used for deployment
- path: release/dfasma.exe
name: executable # Reference used for deployment
# deploy:
# - provider: GitHub
# release: Version $(releaseversion)
# tag: $(appveyor_repo_tag_name)
# auth_token:
# secure: TQgRc2OQ+3qGZXRW1yf2AIuYeOAC2FeC4wgfhZv2qZr8yMZF6AST9ER9xfRMJ4Ze # your encrypted token from GitHub
# artifact: newinstallers
# draft: true
# prerelease: false
# on:
# appveyor_repo_tag: true # deploy on tag push only
# #branch: /v\d+\.\d+\.\d+/ # Doesn't work anymore