-
Notifications
You must be signed in to change notification settings - Fork 325
168 lines (167 loc) · 4.93 KB
/
main.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
name: Build Julius
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Linux Flatpak
os: ubuntu-20.04
BUILD_TARGET: flatpak
DEPLOY: flatpak
- name: Linux AppImage
os: ubuntu-20.04
BUILD_TARGET: appimage
DEPLOY: appimage
- name: Linux x64
os: ubuntu-20.04
cache-key: linux-x64
SDL_VERSION: 2.30.9
SDL_MIXER_VERSION: 2.8.0
BUILD_TARGET: linux
DEPLOY: linux
- name: Linux x64 (old SDL versions)
os: ubuntu-20.04
cache-key: linux-x64
SDL_VERSION: 2.0.0
SDL_MIXER_VERSION: 2.0.0
BUILD_TARGET: linux
DEPLOY: linux
SKIP_UPLOAD: true
- name: macOS
os: macos-latest
cache-key: macos
SDL_VERSION: 2.30.9
SDL_MIXER_VERSION: 2.8.0
BUILD_TARGET: mac
DEPLOY: mac
- name: Nintendo Switch
os: ubuntu-20.04
BUILD_TARGET: switch
DEPLOY: switch
- name: PS Vita
os: ubuntu-20.04
BUILD_TARGET: vita
DEPLOY: vita
- name: Android
os: ubuntu-20.04
cache-key: android
SDL_VERSION: 2.30.9
SDL_MIXER_VERSION: 2.8.0
BUILD_TARGET: android
DEPLOY: android
- name: Emscripten
os: ubuntu-22.04
cache-key: emscripten
BUILD_TARGET: emscripten
DEPLOY: emscripten
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
SDL_VERSION: ${{ matrix.SDL_VERSION }}
SDL_MIXER_VERSION: ${{ matrix.SDL_MIXER_VERSION }}
BUILD_TARGET: ${{ matrix.BUILD_TARGET }}
DEPLOY: ${{ matrix.DEPLOY }}
SKIP_UPLOAD: ${{ matrix.SKIP_UPLOAD }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache dependencies
uses: actions/cache@v4
if: ${{ matrix.cache-key }}
with:
path: deps
key: ${{ matrix.cache-key }}-${{ env.SDL_VERSION }}-${{ env.SDL_MIXER_VERSION }}
- name: Setup JDK 17
if: matrix.BUILD_TARGET == 'android'
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Set up environment
env:
FILE_ENCRYPTION_IV: ${{ secrets.FILE_ENCRYPTION_IV }}
FILE_ENCRYPTION_KEY: ${{ secrets.FILE_ENCRYPTION_KEY }}
run: |
./.ci_scripts/setup_environment.sh
./.ci_scripts/install_dependencies.sh
- name: Build and test
env:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_KEYSTORE_KEY_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_KEY_PASSWORD }}
run: |
./.ci_scripts/run_cmake.sh
./.ci_scripts/run_build.sh
- name: Upload development artifacts
env:
UPLOAD_TOKEN: ${{ secrets.UPLOAD_TOKEN }}
run: |
./.ci_scripts/build_upload.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: deploy/
windows:
strategy:
fail-fast: false
matrix:
include:
- name: Windows 32-bit
cache-key: mingw
COMPILER: mingw-32
- name: Windows 64-bit
cache-key: mingw
COMPILER: mingw-64
SKIP_UPLOAD: true
- name: Windows MSVC
cache-key: msvc
COMPILER: msvc
SKIP_UPLOAD: true
name: ${{ matrix.name }}
runs-on: windows-latest
env:
SDL_VERSION: 2.30.9
SDL_MIXER_VERSION: 2.8.0
COMPILER: ${{ matrix.COMPILER }}
SKIP_UPLOAD: ${{ matrix.SKIP_UPLOAD }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache dependencies
uses: actions/cache@v4
with:
path: deps
key: windows-${{ matrix.cache-key }}-${{ env.SDL_VERSION }}-${{ env.SDL_MIXER_VERSION }}
- name: Set up MSYS2
if: matrix.COMPILER == 'mingw-32'
uses: msys2/setup-msys2@v2
with:
msystem: mingw32
location: D:\
install: mingw-w64-i686-gcc
update: true
- name: Set up environment
run: ./.ci_scripts/install_sdl.ps1
- name: Build and test
run: ./.ci_scripts/run_build.ps1
- name: Upload development artifacts
env:
UPLOAD_TOKEN: ${{ secrets.UPLOAD_TOKEN }}
run: ./.ci_scripts/build_upload.ps1
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: deploy\