-
Notifications
You must be signed in to change notification settings - Fork 50
209 lines (187 loc) · 6.8 KB
/
check_pr.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
name: 🌈 Check Pull Request
on:
pull_request:
branches: "*"
# Global Settings
env:
PROJECT_FOLDER: fmod-gdextension
TARGET_PATH: demo/addons/fmod/libs/
TARGET_NAME: libGodotFmod
GODOT_VERSION: 4.2.2
FMOD_VERSION: 20212
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows Editor Compilation
os: "windows-2022"
platform: windows
target: editor
artifact-extension: dll
additional-python-packages: pywin32
fmod-executable-suffix: win-installer.exe
shell: pwsh
- name: Windows Debug Compilation
os: "windows-2022"
platform: windows
target: template_debug
artifact-extension: dll
additional-python-packages: pywin32
fmod-executable-suffix: win-installer.exe
shell: pwsh
- name: Windows Release Compilation
os: "windows-2022"
platform: windows
target: template_release
artifact-extension: dll
additional-python-packages: pywin32
fmod-executable-suffix: win-installer.exe
shell: pwsh
- name: Ubuntu Editor Compilation
os: "ubuntu-20.04"
platform: linux
target: editor
artifact-extension: so
fmod-executable-suffix: linux.tar.gz
fmod-core-platform-folder: linux/core/lib/x86_64
fmod-studio-platform-folder: linux/studio/lib/x86_64
fmod-library-suffix: so
godot-executable-download-suffix: linux.x86_64.zip
godot-executable: Godot_v$GODOT_VERSION-stable_linux.x86_64
shell: bash
- name: Ubuntu Debug Compilation
os: "ubuntu-20.04"
platform: linux
target: template_debug
artifact-extension: so
fmod-executable-suffix: linux.tar.gz
shell: bash
- name: Ubuntu Release Compilation
os: "ubuntu-20.04"
platform: linux
target: template_release
artifact-extension: so
fmod-executable-suffix: linux.tar.gz
shell: bash
- name: MacOS Editor Compilation
os: "macos-11"
platform: macos
target: editor
artifact-extension: framework
fmod-executable-suffix: osx.dmg
fmod-core-platform-folder: osx/core/lib
fmod-studio-platform-folder: osx/studio/lib
fmod-library-suffix: dylib
godot-executable-download-suffix: macos.universal.zip
godot-executable: Godot.app/Contents/MacOs/Godot
shell: bash
- name: MacOS Debug Compilation
os: "macos-11"
platform: macos
target: template_debug
artifact-extension: framework
fmod-executable-suffix: osx.dmg
shell: bash
- name: MacOS Release Compilation
os: "macos-11"
platform: macos
target: template_release
artifact-extension: framework
fmod-executable-suffix: osx.dmg
shell: bash
- name: Android Editor Compilation
os: "ubuntu-20.04"
platform: android
target: editor
artifact-extension: so
fmod-executable-suffix: android.tar.gz
flags: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64
shell: bash
- name: Android Debug Compilation
os: "ubuntu-20.04"
platform: android
target: template_debug
artifact-extension: so
fmod-executable-suffix: android.tar.gz
flags: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64
shell: bash
- name: Android Release Compilation
os: "ubuntu-20.04"
platform: android
target: template_release
artifact-extension: so
fmod-executable-suffix: android.tar.gz
flags: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME arch=arm64
shell: bash
- name: iOS Debug Compilation
os: "macos-11"
platform: ios
target: template_debug
artifact-extension: dylib
fmod-executable-suffix: ios.dmg
flags: arch=arm64
shell: bash
- name: iOS Release Compilation
os: "macos-11"
platform: ios
target: template_release
artifact-extension: dylib
fmod-executable-suffix: ios.dmg
flags: arch=arm64
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
- name: Android dependencies
if: ${{ matrix.platform == 'android' }}
uses: nttld/setup-ndk@v1
with:
ndk-version: r23c
link-to-sdk: true
- name: Compile native plugin
uses: ./.github/actions/create-native-build
with:
platform: ${{ matrix.platform }}
target: ${{ matrix.target }}
artifact-extension: ${{ matrix.artifact-extension }}
additional-python-packages: ${{ matrix.additional-python-packages }}
flags: ${{ matrix.flags }}
fmod-executable-suffix: ${{ matrix.fmod-executable-suffix }}
fmod-user: ${{ secrets.FMODUSER }}
fmod-password: ${{ secrets.FMODPASS }}
shell: ${{ matrix.shell }}
- name: Download godot engine
if: matrix.platform != 'android' && matrix.platform != 'ios' && matrix.platform != 'windows' && matrix.target == 'editor'
run: |
wget https://downloads.tuxfamily.org/godotengine/${{env.GODOT_VERSION}}/Godot_v${{env.GODOT_VERSION}}-stable_${{ matrix.godot-executable-download-suffix }}
unzip Godot_v${{env.GODOT_VERSION}}-stable_${{ matrix.godot-executable-download-suffix }}
rm Godot_v${{env.GODOT_VERSION}}-stable_${{ matrix.godot-executable-download-suffix }}
- name: Run tests
if: matrix.platform != 'android' && matrix.platform != 'ios' && matrix.platform != 'windows' && matrix.target == 'editor'
run: |
cd demo
chmod +x run_tests.sh
chmod +x ../${{ matrix.godot-executable }}
./run_tests.sh ../${{ matrix.godot-executable }}
create-android-plugin:
needs: [ build ]
strategy:
matrix:
include:
- os: "ubuntu-20.04"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
lfs: true
submodules: recursive
- name: Create android plugin
uses: ./.github/actions/create-android-plugin