forked from supercollider/sc3-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
106 lines (90 loc) · 3.93 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
# Appveyor config file for sc3-plugins
# Author: Brian Heim
# Created on 2018-06-24
# 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: 5
# https://www.appveyor.com/docs/build-environment/#build-worker-images
image: Visual Studio 2017
# disable automatic tests
test: off
environment:
CMAKE_CONFIGURATION: Release
# 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:
- CMAKE_GENERATOR: "Visual Studio 15 2017"
FFTW_URL: ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll32.zip
ARCH: "x86"
S3_BUILDS_LOCATION: "builds/supercollider/sc3-plugins/win32"
# https://www.appveyor.com/docs/lang/cpp/
VCVARS_SCRIPT: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars32.bat"
- CMAKE_GENERATOR: "Visual Studio 15 2017 Win64"
FFTW_URL: ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip
ARCH: "x64"
S3_BUILDS_LOCATION: "builds/supercollider/sc3-plugins/win64"
VCVARS_SCRIPT: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build/vcvars64.bat"
install:
# Load command-line tools (lib.exe)
- cmd: call "%VCVARS_SCRIPT%"
- cmd: echo "Get submodules"
- cmd: git submodule update --init --recursive
- cmd: echo "Get SuperCollider"
# can shallow clone, no submodules needed (no supernova)
- cmd: git clone --depth 1 https://github.com/supercollider/supercollider ../supercollider
# 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: echo "Done installing fftw"
- cmd: cd ..
before_build:
- mkdir build
- cd build
build_script:
- cmake -G "%CMAKE_GENERATOR%" -DSC_PATH=../../supercollider -DFFTW3F_INCLUDE_DIR=../fftw -DFFTW3F_LIBRARY=../fftw/libfftw3f-3.lib -DCMAKE_INSTALL_PREFIX="%APPVEYOR_BUILD_FOLDER%/build/install" ..
- cmake --build . --target install --config %CMAKE_CONFIGURATION%
after_build:
# create archive name; either the version (if tagged) or commit hash
- ps: |
if (Test-Path env:APPVEYOR_REPO_TAG_NAME) {
$env:VERSION_SLUG=$env:APPVEYOR_REPO_TAG_NAME | % { $_ -replace "Version-","" }
$env:ZIP_NAME="sc3-plugins-$env:VERSION_SLUG-Windows-$env:ARCH-VS.zip"
} else {
$env:ZIP_NAME="sc3-plugins-$env:APPVEYOR_REPO_COMMIT-Windows-$env:ARCH-VS.zip"
}
- ps: 7z a -mx7 $env:ZIP_NAME install
# XXX vvv TEMPORARY WORKAROUND DUE TO APPVEYOR ARTIFACT STORAGE LIMIT
- ps: $env:S3_URL="https://supercollider.s3.amazonaws.com/$env:S3_BUILDS_LOCATION/$env:ZIP_NAME"
- ps: >-
If ($env:APPVEYOR_REPO_NAME -eq "supercollider/sc3-plugins") {
If ([string]::IsNullOrEmpty($env:APPVEYOR_PULL_REQUEST_NUMBER)) {
echo "Pushing artifact to S3"
aws s3 cp --region us-west-2 --acl public-read $env:APPVEYOR_BUILD_FOLDER/build/$env:ZIP_NAME s3://supercollider/$env:S3_BUILDS_LOCATION/$env:ZIP_NAME
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
#artifacts:
#- path: build/%ZIP_NAME%
# name: Plugins
#
## github releases - only tags
#deploy:
#- provider: GitHub
# description: appveyor_$(APPVEYOR_REPO_TAG_NAME)
# artifact: Plugins
# auth_token:
# secure: 4uMFrJ2Vc3ju6OtWpQ9chRce/2JHNhfy/sjX+w+KFTNDvmSPD5CqdEuwFp/+Ln/s
# prerelease: true
# on:
# appveyor_repo_tag: true