forked from supercollider/supercollider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
178 lines (154 loc) · 6.43 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
# Appveyor config file for SuperCollider
# Author: Brian Heim
# Created on 2017-12-31
# See http://www.appveyor.com/docs/appveyor-yml
version: '{build}' # incremented with each build
# shallow_clone doesn't clone, repository is not git so can't get submodules
clone_depth: 10
# https://www.appveyor.com/docs/build-environment/#build-worker-images
image: Visual Studio 2019
# disable automatic tests
test: off
environment:
CMAKE_CONFIGURATION: Release
ASIO_URL: "http://www.steinberg.net/sdk_downloads/asiosdk2.3.zip"
ASIO_ZIP: asiosdk2.3.zip
# XXX vvv TEMPORARY WORKAROUND DUE TO APPVEYOR ARTIFACT STORAGE LIMIT
AWS_ACCESS_KEY_ID:
secure: cUwCIb/EtpG3uAP48WylcMNxAh3yEbPNcQGPZDnh6go=
AWS_SECRET_ACCESS_KEY:
secure: 9n0lOPh/3hpwSEf1l0QySYngrgWYqplZozQ9ZJMxtDARIV5DIBn/NXttTfkh1Z3k
# XXX ^^^ TEMPORARY WORKAROUND DUE TO APPVEYOR ARTIFACT STORAGE LIMIT
matrix:
- QT_DIR: "C:/Qt/5.9/msvc2015"
CMAKE_GENERATOR: "Visual Studio 16 2019"
FFTW_URL: ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll32.zip
ARCH: "x86"
CMAKE_ARCH: "Win32"
S3_BUILDS_LOCATION: "builds/supercollider/supercollider/win32"
# https://www.appveyor.com/docs/lang/cpp/
VCVARS_SCRIPT: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvars32.bat"
- QT_DIR: "C:/Qt/5.15/msvc2019_64"
CMAKE_GENERATOR: "Visual Studio 16 2019"
FFTW_URL: ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip
ARCH: "x64"
CMAKE_ARCH: "x64"
S3_BUILDS_LOCATION: "builds/supercollider/supercollider/win64"
VCVARS_SCRIPT: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Auxiliary/Build/vcvars64.bat"
install:
- ps: echo "Install phase start"
- ps: $env:PROGFILES = if ($env:ARCH -eq "x64") { 'Program Files' } else { 'Program Files (x86)' }
# Load command-line tools (lib.exe)
- cmd: call "%VCVARS_SCRIPT%"
- cmd: echo "Get submodules"
- cmd: git submodule update --init --recursive
# Install libsndfile, FFTW, and ASIO SDK. Note that DirectX SDK, Windows SDK are already installed.
- cmd: echo "Install 3rd-party tools"
- cmd: mkdir 3rdparty && cd 3rdparty
# libsndfile using hosted repository. Couldn't find a way to get the installer to work silently.
- cmd: echo "Install libsndfile"
- cmd: mkdir libsndfile && cd libsndfile
- cmd: git clone https://github.com/brianlheim/libsndfile-windows-%ARCH% libsndfile
- cmd: set MEGANERD_DIR=C:/%PROGFILES%/Mega-Nerd
- cmd: mkdir "%MEGANERD_DIR%"
- cmd: move libsndfile "%MEGANERD_DIR%/libsndfile"
- cmd: cd .. && echo "Done installing libsndfile"
# FFTW3, including lib prep
- cmd: echo "Install fftw"
- cmd: mkdir fftw && cd fftw
# can't use appveyor DownloadFile because it's FTP
- ps: Invoke-WebRequest $env:FFTW_URL -OutFile fftw.zip
- ps: 7z x fftw.zip -y
- cmd: lib.exe /machine:%ARCH% /def:libfftw3f-3.def
- cmd: cd ..
- cmd: move fftw "C:/%PROGFILES%/fftw"
- cmd: echo "Done installing fftw"
# ASIO SDK
- cmd: echo "Install asio_sdk"
- cmd: mkdir asio_sdk && cd asio_sdk
- appveyor DownloadFile %ASIO_URL%
- ps: 7z x $env:ASIO_ZIP -y
- cmd: move ASIOSDK2.3 "%APPVEYOR_BUILD_FOLDER%\external_libraries\asiosdk"
- cmd: cd .. && echo "Done installing asio_sdk"
- cmd: cd .. && echo "Done installing 3rd-party tools"
- cmd: echo "Install phase end"
before_build:
- set PATH=%QT_DIR%\bin;%PATH%
- mkdir build
- cd build
build_script:
- cmake -G "%CMAKE_GENERATOR%" -A "%CMAKE_ARCH%" -D CMAKE_PREFIX_PATH=%QT_DIR% -D SUPERNOVA=ON ..
- cmake --build . --target install --config %CMAKE_CONFIGURATION%
# after_build instead of before_deploy so artifacts are collected at the right time
after_build:
- ps: $env:ARCHIVE_NAME="SC-Windows-$env:ARCH-$env:APPVEYOR_REPO_COMMIT.zip"
- ps: $env:S3_URL="https://supercollider.s3.amazonaws.com/$env:S3_BUILDS_LOCATION/$env:ARCHIVE_NAME"
- ps: $env:FWD_HTML="<html><head><meta http-equiv=""refresh"" content=""0; url='$env:S3_URL'"" /></head></html>"
- ps: $env:BRANCH_ESC=$env:APPVEYOR_REPO_BRANCH -replace '/', ''
- ps: cd $env:APPVEYOR_BUILD_FOLDER
- echo "Making artifacts"
- ps: mkdir artifacts
- ps: cd artifacts
- ps: echo $env:FWD_HTML > $env:BRANCH_ESC-latest.html
- ps: Copy-Item -Path $env:APPVEYOR_BUILD_FOLDER/build/Install/SuperCollider . -Recurse
- ps: 7z a $env:ARCHIVE_NAME -tzip SuperCollider
- ps: rmdir -Recurse -Force SuperCollider
- ps: >-
If (Test-Path env:APPVEYOR_REPO_TAG_NAME) {
# required for github releases
# -q because otherwise PS reads output from stderr and thinks there's a problem
$env:TAG_ESC=$env:APPVEYOR_REPO_TAG_NAME -replace '/', ''
echo $env:FWD_HTML > $env:TAG_ESC.html
cd ../build
# to get NSIS in path for installer generation
$env:PATH="C:\Program Files (x86)\NSIS;$env:PATH"
cmake --build . --target installer --config Release
}
- ps: cd ..
# XXX vvv TEMPORARY WORKAROUND DUE TO APPVEYOR ARTIFACT STORAGE LIMIT
- ps: >-
If ($env:APPVEYOR_REPO_NAME -eq "supercollider/supercollider") {
If ([string]::IsNullOrEmpty($env:APPVEYOR_PULL_REQUEST_NUMBER)) {
echo "Pushing artifact to S3"
aws s3 cp --region us-west-2 --acl public-read --recursive --include "*" $env:APPVEYOR_BUILD_FOLDER/artifacts/ s3://supercollider/$env:S3_BUILDS_LOCATION
echo "S3 Build Location = $env:S3_URL"
}
}
# XXX ^^^ TEMPORARY WORKAROUND DUE TO APPVEYOR ARTIFACT STORAGE LIMIT
# XXX vvv TEMPORARILY DISABLED DUE TO APPVEYOR ARTIFACT STORAGE LIMIT
# after_deploy:
# - ps: echo "S3 Build Location = $env:S3_URL"
#
# artifacts:
# - path: artifacts
# name: art_folder
# - path: build\Install\*.exe
# name: installer
# type: File
#
# deploy:
# # s3 upload - every commit
# - provider: S3
# access_key_id:
# secure: cUwCIb/EtpG3uAP48WylcMNxAh3yEbPNcQGPZDnh6go=
# secret_access_key:
# secure: 9n0lOPh/3hpwSEf1l0QySYngrgWYqplZozQ9ZJMxtDARIV5DIBn/NXttTfkh1Z3k
# bucket: supercollider
# region: us-west-2
# folder: $(S3_BUILDS_LOCATION)
# artifact: art_folder
# unzip: true
# set_public: true
# on:
# appveyor_repo_name: supercollider/supercollider
#
# # github releases - only tags
# - provider: GitHub
# description: appveyor_$(APPVEYOR_REPO_TAG_NAME)
# artifact: installer
# auth_token:
# secure: 6m5+IiGj/pLhiUJvZPqs7yOlSe0ttH3pklaM7w1i8ca4YRUrIKddsGTZAZo86qLx
# prerelease: true
# on:
# appveyor_repo_tag: true
# XXX ^^^ TEMPORARY WORKAROUND DUE TO APPVEYOR ARTIFACT STORAGE LIMIT