mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 05:11:33 +00:00
81 lines
2.8 KiB
YAML
81 lines
2.8 KiB
YAML
|
|
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)
|