fluidsynth/.azure/azure-pipelines-vcpkg.yml

82 lines
2.9 KiB
YAML
Raw Normal View History

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)
2021-05-10 20:00:03 +00:00
REM choco upgrade ninja -y
REM 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
2021-05-10 20:00:03 +00:00
cmake -Werror=dev -G "$(generator)" -A "$(cmake_platform)" -T "$(toolset)" -Denable-pkgconfig=0 -Denable-jack=0 -Denable-pulseaudio=0 -Denable-ladspa=0 -Denable-dbus=0 -Denable-readline=0 -Denable-sdl2=0 -Denable-libinstpatch=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
2021-05-10 20:00:03 +00:00
cmake --build . --config $(configuration) --parallel 3 || exit -1
displayName: 'Compile fluidsynth'
- script: |
@ECHO ON
REM build and exec unittests, unless when cross-compiling
2021-05-10 20:00:03 +00:00
if not "%platform%"=="ARM" ( cmake --build build --config $(configuration) --target check --parallel 3 )
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)