-
Notifications
You must be signed in to change notification settings - Fork 0
190 lines (190 loc) · 8.21 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
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-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'
- platform: x64
arch: x64
triplet: x64-windows
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
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-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:
CONFIGURATION: Debug
PLATFORM: ${{ matrix.platform }}
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: ilammy/setup-nasm@v1
if: ${{ matrix.useNasm }} == 'true'
- name: Install vcpkg and packages
uses: lukka/run-vcpkg@v7
id: runvcpkg
with:
vcpkgGitCommitId: be5c4ef68b51142ba705f0678b45d284977de677
vcpkgTriplet: '${{ matrix.triplet }}'
vcpkgArguments: '${{ matrix.vcpkgPackages }}'
# - name: Upload libs
# uses: actions/upload-artifact@v2
# with:
# name: libs-${{ matrix.triplet }}
# path: ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}\\installed\\${{ 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 --enable-all-engines ${{ matrix.configflags }} --use-canonical-lib-names
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/[email protected]
- 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 }}
# - name: Upload scummvm
# uses: actions/upload-artifact@v2
# with:
# name: scummvm-${{ matrix.arch }}
# path: build-scummvm/${{ env.CONFIGURATION }}${{ matrix.arch }}/*.exe
# - name: Upload scummvm libs
# uses: actions/upload-artifact@v2
# with:
# name: scummvm-${{ matrix.arch }}
# path: ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}\\installed\\${{ matrix.triplet }}\\bin\\*.dll
# - name: Upload scummvm symbols
# uses: actions/upload-artifact@v2
# with:
# name: symbols-${{ matrix.arch }}
# path: build-scummvm/${{ env.CONFIGURATION }}${{ matrix.arch }}/*.pdb
# - name: Upload scummvm libs symbols
# uses: actions/upload-artifact@v2
# with:
# name: symbols-${{ matrix.arch }}
# path: ${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}\\installed\\${{ 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-mpeg2
brewPackages: a52dec faad2 flac fluid-synth freetype fribidi jpeg mad libmpeg2 libogg libpng libvorbis sdl2 sdl2_net theora giflib
- platform: ios7
buildFlags: -scheme ScummVM-iOS CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED=NO
configFlags: --disable-nasm --disable-opengl --disable-theoradec --disable-mpeg2 --disable-taskbar --disable-tts --disable-fribidi
packagesUrl: https://downloads.scummvm.org/frs/build/scummvm-ios7-libs-v2.zip
env:
BUILDCACHE_MAX_CACHE_SIZE: 2000000000
BUILDCACHE_HARD_LINKS: true
steps:
- name: Checkout
uses: actions/checkout@v2
- 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@v1
with:
cache_key: ${{ matrix.platform }}
- name: Build scummvm
run: |
set -o pipefail && 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: 'libsdl2-dev libsdl2-net-dev liba52-dev libjpeg-turbo8-dev libmpeg2-4-dev libogg-dev libvorbis-dev libflac-dev libmad0-dev libpng-dev libtheora-dev libfaad-dev libfluidsynth-dev libfreetype6-dev zlib1g-dev libfribidi-dev libcurl4-openssl-dev libgtk-3-dev libspeechd-dev libsndio-dev libunity-dev'
- platform: ubuntu-20.04
sdlConfig: sdl-config
cxx: ccache g++-4.8
aptPackages: 'g++-4.8 libsdl1.2-dev libsdl-net1.2-dev liba52-dev libjpeg-turbo8-dev libmpeg2-4-dev libogg-dev libvorbis-dev libflac-dev libmad0-dev libpng-dev libtheora-dev libfaad-dev libfluidsynth-dev libfreetype6-dev zlib1g-dev libfribidi-dev libcurl4-openssl-dev libgtk-3-dev libspeechd-dev libsndio-dev libunity-dev'
env:
SDL_CONFIG: ${{ matrix.sdlConfig }}
steps:
- name: Checkout
uses: actions/checkout@v2
- 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/ccache-action@v1
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