ENGINES: Use common GFX code for 3D games - fixes part of bug #14342 #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
# schedule: | |
# - cron: '0 0-23/4 * * *' | |
permissions: | |
contents: read | |
jobs: | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: win32 | |
triplet: x86-windows | |
arch: x86 | |
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx | |
useNasm: 'true' | |
- platform: x64 | |
arch: x64 | |
triplet: x64-windows | |
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx | |
- platform: arm64 | |
arch: arm64 | |
triplet: arm64-windows | |
configFlags: --enable-discord --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx | |
env: | |
CONFIGURATION: Debug | |
PLATFORM: ${{ matrix.platform }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VCPKG_FEATURE_FLAGS: dependencygraph | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} | |
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed | |
permissions: | |
contents: write # For dependencygraph | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: ilammy/setup-nasm@v1 | |
if: matrix.useNasm == 'true' | |
- name: Install vcpkg | |
uses: lukka/run-vcpkg@v11 | |
id: runvcpkg | |
with: | |
vcpkgGitCommitId: 943c5ef1c8f6b5e6ced092b242c8299caae2ff01 | |
- name: Integrate vcpkg | |
run: | | |
${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}/vcpkg integrate install | |
- name: Upload libs | |
uses: actions/upload-artifact@v4 | |
if: matrix.buildArtifacts == 'true' | |
with: | |
name: libs-${{ matrix.triplet }} | |
path: ${{ env.VCPKG_INSTALLED_DIR }}\\${{ matrix.triplet }} | |
- name: Build create_project | |
run: | | |
cd devtools/create_project/cmake | |
cmake . | |
cmake --build . -j 2 | |
ls | |
cd ../../../ | |
- name: Call create_project | |
run: | | |
mkdir build-scummvm | |
cd build-scummvm | |
../devtools/create_project/cmake/Debug/create_project.exe .. --msvc --vcpkg --enable-all-engines ${{ matrix.configFlags }} | |
ls | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Build scummvm | |
run: | | |
cd build-scummvm | |
ls | |
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@v4 | |
if: matrix.buildArtifacts == 'true' | |
with: | |
name: scummvm-${{ matrix.arch }} | |
path: build-scummvm/${{ env.CONFIGURATION }}${{ matrix.arch }}/*.exe | |
- name: Upload scummvm libs | |
uses: actions/upload-artifact@v4 | |
if: matrix.buildArtifacts == 'true' | |
with: | |
name: scummvm-${{ matrix.arch }} | |
path: ${{ env.VCPKG_INSTALLED_DIR }}\\${{ matrix.triplet }}\\bin\\*.dll | |
- name: Upload scummvm symbols | |
uses: actions/upload-artifact@v4 | |
if: matrix.buildArtifacts == 'true' | |
with: | |
name: symbols-${{ matrix.arch }} | |
path: build-scummvm/${{ env.CONFIGURATION }}${{ matrix.arch }}/*.pdb | |
- name: Upload scummvm libs symbols | |
uses: actions/upload-artifact@v4 | |
if: matrix.buildArtifacts == 'true' | |
with: | |
name: symbols-${{ matrix.arch }} | |
path: ${{ env.VCPKG_INSTALLED_DIR }}\\${{ matrix.triplet }}\\bin\\*.pdb | |
xcode: | |
name: Xcode | |
# macos-14 is arm64. macosx build currently fails on macos-14. | |
runs-on: macos-13 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: macosx | |
buildFlags: -scheme ScummVM-macOS -destination 'platform=macOS,arch=x86_64' | |
configFlags: --disable-nasm --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx | |
brewPackages: a52dec faad2 flac fluid-synth freetype fribidi giflib jpeg mad libmikmod libmpeg2 libogg libpng libvorbis libvpx sdl2 sdl2_net theora | |
- platform: ios7 | |
buildFlags: -scheme ScummVM-iOS CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED=NO | |
configFlags: --use-xcframework --enable-faad --enable-gif --enable-mikmod --enable-mpeg2 --enable-vpx --disable-nasm --disable-taskbar --disable-tts | |
packagesUrl: https://downloads.scummvm.org/frs/build/scummvm-ios7-libs-v3.zip | |
env: | |
BUILDCACHE_MAX_CACHE_SIZE: 2000000000 | |
BUILDCACHE_HARD_LINKS: true | |
defaults: | |
run: | |
# Must be explicit for proper pipefail support | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install packages | |
if: ${{ matrix.brewPackages }} | |
run: brew install ${{ matrix.brewPackages }} | |
- name: Download libraries | |
if: ${{ matrix.packagesUrl }} | |
run: | | |
curl -L -o libs.zip ${{ matrix.packagesUrl }} | |
unzip libs.zip | |
ls | |
- name: Build create_project | |
run: | | |
cd devtools/create_project/xcode | |
xcodebuild | |
ls | |
cd ../../../ | |
- name: Call create_project | |
run: | | |
./devtools/create_project/xcode/build/Release/create_project . --xcode --enable-all-engines ${{ matrix.configFlags }} | |
ls | |
- name: Build cache | |
uses: mikehardy/buildcache-action@v2 | |
with: | |
cache_key: ${{ matrix.platform }} | |
- name: Build scummvm | |
run: | | |
xcodebuild CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ build -project scummvm.xcodeproj ${{ matrix.buildFlags }} | awk '$1 !~ /^(export|cd|clang++)/' | |
ls | |
ubuntu: | |
name: Ubuntu | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: ubuntu-latest | |
sdlConfig: sdl2-config | |
cxx: ccache g++ | |
aptPackages: 'liba52-dev libcurl4-openssl-dev libfaad-dev libflac-dev libfluidsynth-dev libfreetype6-dev libfribidi-dev libgif-dev libgtk-3-dev libjpeg-turbo8-dev libmad0-dev libmikmod-dev libmpeg2-4-dev libogg-dev libpng-dev libsdl2-dev libsdl2-net-dev libsndio-dev libspeechd-dev libtheora-dev libunity-dev libvorbis-dev libvpx-dev zlib1g-dev' | |
configFlags: --enable-discord --with-discord-prefix=/usr/local | |
- platform: ubuntu-20.04 | |
sdlConfig: sdl-config | |
cxx: ccache g++-4.8 | |
aptPackages: 'g++-4.8 liba52-dev libcurl4-openssl-dev libfaad-dev libflac-dev libfluidsynth-dev libfreetype6-dev libfribidi-dev libgif-dev libgtk-3-dev libjpeg-turbo8-dev libmad0-dev libmikmod-dev libmpeg2-4-dev libogg-dev libpng-dev libsdl-net1.2-dev libsdl1.2-dev libsndio-dev libspeechd-dev libtheora-dev libunity-dev libvorbis-dev libvpx-dev zlib1g-dev' | |
configFlags: --enable-discord --with-discord-prefix=/usr/local | |
env: | |
SDL_CONFIG: ${{ matrix.sdlConfig }} | |
defaults: | |
run: | |
# Must be explicit for proper pipefail support | |
shell: bash | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Add Ubuntu Xenial package sources | |
if: matrix.platform == 'ubuntu-20.04' | |
run: | | |
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial main' | |
sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu/ xenial universe' | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install ${{ matrix.aptPackages }} | |
- name: Download and install Discord RPC libraries | |
run: | | |
curl -L -o discord-rpc-linux.zip https://github.com/discord/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip | |
echo 'dac1f5dc6bedaeab1cc3c2c7fd4261e00838c81619c3ee325f3723c3d55ee03a discord-rpc-linux.zip' | sha256sum --check && unzip discord-rpc-linux.zip | |
sudo cp -v -pR discord-rpc/linux-dynamic/include/*.* /usr/local/include/ | |
sudo cp -v -pR discord-rpc/linux-dynamic/lib/*.* /usr/local/lib/ | |
- name: ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ matrix.platform }} | |
max-size: 1G | |
- name: Call configure | |
run: | | |
CXX='${{ matrix.cxx }}' ./configure --enable-all-engines ${{ matrix.configFlags }} | |
- name: Build scummvm | |
run: | | |
make -j2 | |
- name: Build tests | |
run: | | |
make test | |
- name: Build devtools | |
run: | | |
make devtools |