forked from scummvm/scummvm
-
Notifications
You must be signed in to change notification settings - Fork 0
201 lines (201 loc) · 7.83 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
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 --disable-opengl
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@v3
- uses: ilammy/setup-nasm@v1
if: ${{ matrix.useNasm }} == 'true'
- name: Install vcpkg
uses: lukka/run-vcpkg@v11
id: runvcpkg
with:
vcpkgGitCommitId: 56954f1db97f38635782d5ad7cdfd45d2731c854
- name: Integrate vcpkg
run: |
${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}/vcpkg integrate install
- name: Upload libs
uses: actions/upload-artifact@v3
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/[email protected]
- 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@v3
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@v3
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@v3
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@v3
if: ${{ matrix.buildArtifacts }} == 'true'
with:
name: symbols-${{ matrix.arch }}
path: ${{ env.VCPKG_INSTALLED_DIR }}\\${{ matrix.triplet }}\\bin\\*.pdb
xcode:
name: Xcode
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- platform: macosx
buildFlags: -scheme ScummVM-macOS
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@v3
- 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'
- 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'
env:
SDL_CONFIG: ${{ matrix.sdlConfig }}
defaults:
run:
# Must be explicit for proper pipefail support
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
- 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: 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