From 3e178ae7feee27fa1fc8ea55add47c48c148e4e3 Mon Sep 17 00:00:00 2001 From: SupSuper Date: Mon, 17 Apr 2023 14:40:40 +0100 Subject: [PATCH] CI: Update to use latest vcpkg version and integration --- .github/workflows/ci.yml | 38 ++++++++++++++------------------------ vcpkg.json | 26 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 vcpkg.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0708539dfe..56ff6c7e1e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000000..363a2dab5b6 --- /dev/null +++ b/vcpkg.json @@ -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" + ] +} \ No newline at end of file