CI: Update to use latest vcpkg version and integration

# Conflicts:
#	.github/workflows/ci.yml
This commit is contained in:
SupSuper 2023-04-17 14:40:40 +01:00
parent 21d16f2124
commit eddcbbe2c8
2 changed files with 40 additions and 24 deletions

View file

@ -16,44 +16,38 @@ jobs:
triplet: x86-windows triplet: x86-windows
arch: x86 arch: x86
configFlags: --enable-faad --enable-mpeg2 --enable-discord configFlags: --enable-faad --enable-mpeg2 --enable-discord
vcpkgPackages: 'curl discord-rpc faad2 fluidsynth freetype libflac libjpeg-turbo libmad libmpeg2 libogg libpng libtheora libvorbis sdl2 sdl2-net zlib giflib fribidi'
useNasm: 'true' useNasm: 'true'
- platform: x64 - platform: x64
arch: x64 arch: x64
triplet: x64-windows triplet: x64-windows
configFlags: --enable-faad --enable-mpeg2 --enable-discord configFlags: --enable-faad --enable-mpeg2 --enable-discord
vcpkgPackages: 'curl discord-rpc faad2 fluidsynth freetype libflac libjpeg-turbo libmad libmpeg2 libogg libpng libtheora libvorbis sdl2 sdl2-net zlib giflib fribidi'
- platform: arm64 - platform: arm64
arch: arm64 arch: arm64
triplet: arm64-windows 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 configFlags: --enable-faad --enable-mpeg2 --enable-discord --disable-opengl
# Note that fribidi is also disabled on arm64 in devtools/create_project/msvc.cpp
configFlags: --enable-faad --enable-mpeg2 --enable-discord --disable-fribidi --disable-opengl
vcpkgPackages: 'curl discord-rpc faad2 fluidsynth freetype libflac libjpeg-turbo libmad libmpeg2 libogg libpng libtheora libvorbis sdl2 sdl2-net zlib giflib'
env: env:
CONFIGURATION: Debug CONFIGURATION: Debug
PLATFORM: ${{ matrix.platform }} PLATFORM: ${{ matrix.platform }}
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- uses: ilammy/setup-nasm@v1 - uses: ilammy/setup-nasm@v1
if: ${{ matrix.useNasm }} == 'true' if: ${{ matrix.useNasm }} == 'true'
- name: Install vcpkg and packages - name: Install vcpkg
uses: lukka/run-vcpkg@v7 uses: lukka/run-vcpkg@v11
id: runvcpkg id: runvcpkg
with: with:
# temporary hack until create_project / vcpkg incompatibility is resolved. vcpkgGitCommitId: 5a101fc741f41cf05e13fe660168d32c516fb658
# use a fork of vcpkg with the previous working setup from March 2022 - name: Integrate vcpkg
# with the the January 2023 fix for msys-libtool's url cherry-picked. run: |
vcpkgGitURL: 'https://github.com/sluicebox/vcpkg.git' ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}/vcpkg integrate install
vcpkgGitCommitId: 47c0c6e2cb7e70edf5799bb48560d7ddbeb6250d
vcpkgTriplet: '${{ matrix.triplet }}'
vcpkgArguments: '${{ matrix.vcpkgPackages }}'
# - name: Upload libs # - name: Upload libs
# uses: actions/upload-artifact@v3 # uses: actions/upload-artifact@v3
# with: # with:
# name: libs-${{ matrix.triplet }} # 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 - name: Build create_project
run: | run: |
cd devtools/create_project/cmake cd devtools/create_project/cmake
@ -65,19 +59,15 @@ jobs:
run: | run: |
mkdir build-scummvm mkdir build-scummvm
cd 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 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 - name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1.3 uses: microsoft/setup-msbuild@v1.1.3
- name: Build scummvm - name: Build scummvm
run: | run: |
cd build-scummvm cd build-scummvm
ls 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 # - name: Upload scummvm
# uses: actions/upload-artifact@v3 # uses: actions/upload-artifact@v3
# with: # with:
@ -87,7 +77,7 @@ jobs:
# uses: actions/upload-artifact@v3 # uses: actions/upload-artifact@v3
# with: # with:
# name: scummvm-${{ matrix.arch }} # 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 # - name: Upload scummvm symbols
# uses: actions/upload-artifact@v3 # uses: actions/upload-artifact@v3
# with: # with:
@ -97,7 +87,7 @@ jobs:
# uses: actions/upload-artifact@v3 # uses: actions/upload-artifact@v3
# with: # with:
# name: symbols-${{ matrix.arch }} # 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: xcode:
name: Xcode name: Xcode
runs-on: macos-latest 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"
]
}