forked from scummvm/scummvm
-
Notifications
You must be signed in to change notification settings - Fork 2
210 lines (210 loc) · 8.52 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
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/ccache-action@v1.2
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