forked from FluidSynth/fluidsynth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor-vcpkg.yml
81 lines (79 loc) · 2.78 KB
/
.appveyor-vcpkg.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
variables:
toolset: 'v142'
generator: 'Visual Studio 16 2019'
VCPKG_DIR: 'C:\vcpkg'
jobs:
- job: vcpkg
workspace:
clean: all
strategy:
matrix:
ARM:
platform: 'ARM'
cmake_platform: 'ARM'
configuration: 'Release'
x86:
platform: 'x86'
cmake_platform: 'Win32'
configuration: 'Release'
x64:
platform: 'x64'
cmake_platform: 'x64'
configuration: 'Release'
pool:
vmImage: 'windows-2019'
steps:
- script: |
@ECHO ON
echo $(generator)
echo $(toolset)
choco upgrade ninja -y
ninja --version
cmake --version
REM manually update vcpkg
REM cd "$(VCPKG_DIR)" || exit -1
REM git pull || exit -1
REM .\bootstrap-vcpkg.bat || exit -1
REM cd $(Build.SourcesDirectory)
where vcpkg.exe
vcpkg install --only-downloads glib:$(platform)-windows
displayName: 'Prerequisites'
- task: Cache@2
displayName: "Cache vcpkg's packages"
inputs:
key: $(VCPKG_DIR)\downloads\glib* | "$(platform)"
path: "$(VCPKG_DIR)"
cacheHitVar: CACHE_RESTORED
- script: |
@ECHO ON
vcpkg install glib:$(platform)-windows
displayName: 'vcpkg build glib'
condition: ne(variables.CACHE_RESTORED, 'true')
- script: |
@ECHO ON
mkdir build
cd build
cmake -Werror=dev -G "$(generator)" -A "$(cmake_platform)" -T "$(toolset)" -Denable-pkgconfig=0 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 .. || exit -1
REM build libfluidsynth and fluidsynth exec
cmake --build . --config $(configuration) || exit -1
displayName: 'Compile fluidsynth'
- script: |
@ECHO ON
REM build and exec unittests, unless when cross-compiling
if not "%platform%"=="ARM" ( cmake --build build --config $(configuration) --target check )
displayName: 'Execute Unittests'
- script: |
@ECHO ON
cd build
cmake --build . --config $(configuration) --target install || exit -1
REM del $(Build.ArtifactStagingDirectory)\bin\concrt*.dll
REM del $(Build.ArtifactStagingDirectory)\bin\vcruntime*.dll
REM del $(Build.ArtifactStagingDirectory)\bin\msvcp*.dll
REM del $(Build.ArtifactStagingDirectory)\lib\instpatch*.lib
REM del $(Build.ArtifactStagingDirectory)\lib\pkgconfig\libinstpatch*.pc
REM rd $(Build.ArtifactStagingDirectory)\include\libinstpatch-2 /s /q
displayName: 'Copy Artifacts'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: fluidsynth-vcpkg-$(platform)