forked from bvschaik/julius
-
Notifications
You must be signed in to change notification settings - Fork 0
198 lines (197 loc) · 6.02 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
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
name: Build Augustus
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-22.04
cache-key: linux-x64
SDL_VERSION: 2.30.2
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.2
SDL_MIXER_VERSION: 2.8.0
BUILD_TARGET: mac
DEPLOY: mac
- name: PS Vita
os: ubuntu-20.04
BUILD_TARGET: vita
DEPLOY: vita
- name: Nintendo Switch
os: ubuntu-20.04
BUILD_TARGET: switch
DEPLOY: switch
- name: Android
os: ubuntu-20.04
cache-key: android
SDL_VERSION: 2.30.2
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/pack_assets.sh
./.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
continue-on-error: true
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: deploy/
windows:
strategy:
fail-fast: false
matrix:
include:
- name: Windows MinGW x86
cache-key: mingw
COMPILER: mingw-32
- name: Windows MinGW x64
cache-key: mingw
COMPILER: mingw-64
SKIP_UPLOAD: true
- name: Windows MSVC x64
cache-key: msvc
COMPILER: msvc
SKIP_UPLOAD: true
- name: Windows MSVC ARM64
cache-key: msvc-arm64
COMPILER: msvc-arm64
name: ${{ matrix.name }}
runs-on: windows-latest
env:
SDL_VERSION: 2.28.5
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: Install cv2pdb
if: matrix.COMPILER == 'mingw-32' || matrix.COMPILER == 'mingw-64'
uses: robinraju/[email protected]
with:
repository: "rainers/cv2pdb"
tag: "v0.52"
fileName: "cv2pdb-0.52.zip"
out-file-path: "build"
extract: 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
continue-on-error: true
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
path: deploy\
- uses: ruby/setup-ruby@v1
if: matrix.COMPILER == 'mingw-64'
with:
ruby-version: '3.0'
- name: Send Webhook Notification
if: matrix.COMPILER == 'mingw-64'
env:
JOB_STATUS: ${{ job.status }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
run: |
git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
shell: bash