CI: Update to use latest vcpkg version and integration

This commit is contained in:
SupSuper 2023-04-17 14:40:40 +01:00 committed by Eugene Sandulenko
parent e396d34320
commit 3e178ae7fe
2 changed files with 40 additions and 24 deletions

View File

@ -16,44 +16,38 @@ jobs:
triplet: x86-windows
arch: x86
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx
vcpkgPackages: 'curl discord-rpc faad2 fluidsynth freetype fribidi giflib libflac libjpeg-turbo libmad libmikmod libmpeg2 libogg libpng libtheora libvorbis libvpx sdl2 sdl2-net zlib'
useNasm: 'true'
- platform: x64
arch: x64
triplet: x64-windows
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx
vcpkgPackages: 'curl discord-rpc faad2 fluidsynth freetype fribidi giflib libflac libjpeg-turbo libmad libmikmod libmpeg2 libogg libpng libtheora libvorbis libvpx sdl2 sdl2-net zlib'
- platform: arm64
arch: arm64
triplet: arm64-windows
# fribidi is disabled due to https://github.com/microsoft/vcpkg/issues/11248 [fribidi] Fribidi doesn't cross-compile on x86-64 to target arm/arm64
# Note that fribidi is also disabled on arm64 in devtools/create_project/msvc.cpp
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx --disable-fribidi --disable-opengl
vcpkgPackages: 'curl discord-rpc faad2 fluidsynth freetype giflib libflac libjpeg-turbo libmad libmikmod libmpeg2 libogg libpng libtheora libvorbis libvpx sdl2 sdl2-net zlib'
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx --disable-opengl
env:
CONFIGURATION: Debug
PLATFORM: ${{ matrix.platform }}
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ilammy/setup-nasm@v1
if: ${{ matrix.useNasm }} == 'true'
- name: Install vcpkg and packages
uses: lukka/run-vcpkg@v7
- name: Install vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
# temporary hack until create_project / vcpkg incompatibility is resolved.
# use a fork of vcpkg with the previous working setup from March 2022
# with the the January 2023 fix for msys-libtool's url cherry-picked.
vcpkgGitURL: 'https://github.com/sluicebox/vcpkg.git'
vcpkgGitCommitId: 47c0c6e2cb7e70edf5799bb48560d7ddbeb6250d
vcpkgTriplet: '${{ matrix.triplet }}'
vcpkgArguments: '${{ matrix.vcpkgPackages }}'
vcpkgGitCommitId: 5a101fc741f41cf05e13fe660168d32c516fb658
- name: Integrate vcpkg
run: |
${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}/vcpkg integrate install
# - name: Upload libs
# uses: actions/upload-artifact@v3
# with:
# name: libs-${{ matrix.triplet }}
# path: ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}\\installed\\${{ matrix.triplet }}
# path: ${{ env.VCPKG_INSTALLED_DIR }}\\${{ matrix.triplet }}
- name: Build create_project
run: |
cd devtools/create_project/cmake
@ -65,19 +59,15 @@ jobs:
run: |
mkdir build-scummvm
cd build-scummvm
../devtools/create_project/cmake/Debug/create_project.exe .. --msvc --enable-all-engines ${{ matrix.configflags }} --use-canonical-lib-names
../devtools/create_project/cmake/Debug/create_project.exe .. --msvc --vcpkg --enable-all-engines ${{ matrix.configflags }}
ls
- name: set SCUMMVM_LIBS env variable
run: |
echo "SCUMMVM_LIBS=${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}\\installed\\${{ matrix.triplet }}\\debug" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Copy-Item "${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}\\installed\\${{ matrix.triplet }}\\include" -Destination "${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}\\installed\\${{ matrix.triplet }}\\debug" -Recurse
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1.3
- name: Build scummvm
run: |
cd build-scummvm
ls
msbuild scummvm.sln /m /p:BuildInParallel=true /p:Configuration=${{ env.CONFIGURATION }} /p:PreferredToolArchitecture=x64 /p:Platform=${{ matrix.platform }} /v:minimal
msbuild scummvm.sln /m /p:VcpkgEnableManifest=true /p:BuildInParallel=true /p:Configuration=${{ env.CONFIGURATION }} /p:PreferredToolArchitecture=x64 /p:Platform=${{ matrix.platform }} /v:minimal
# - name: Upload scummvm
# uses: actions/upload-artifact@v3
# with:
@ -87,7 +77,7 @@ jobs:
# uses: actions/upload-artifact@v3
# with:
# name: scummvm-${{ matrix.arch }}
# path: ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}\\installed\\${{ matrix.triplet }}\\bin\\*.dll
# path: ${{ env.VCPKG_INSTALLED_DIR }}\\${{ matrix.triplet }}\\bin\\*.dll
# - name: Upload scummvm symbols
# uses: actions/upload-artifact@v3
# with:
@ -97,7 +87,7 @@ jobs:
# uses: actions/upload-artifact@v3
# with:
# name: symbols-${{ matrix.arch }}
# path: ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}\\installed\\${{ matrix.triplet }}\\bin\\*.pdb
# path: ${{ env.VCPKG_INSTALLED_DIR }}\\${{ matrix.triplet }}\\bin\\*.pdb
xcode:
name: Xcode
runs-on: macos-latest

26
vcpkg.json Normal file
View File

@ -0,0 +1,26 @@
{
"name": "scummvm",
"version-string": "latest",
"dependencies": [
"curl",
"discord-rpc",
"faad2",
"fluidsynth",
"freetype",
"fribidi",
"giflib",
"libflac",
"libjpeg-turbo",
"libmad",
"libmikmod",
"libmpeg2",
"libogg",
"libpng",
"libtheora",
"libvorbis",
"libvpx",
"sdl2",
"sdl2-net",
"zlib"
]
}