-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
273 lines (268 loc) · 11 KB
/
a380x-stable.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
# Build-script for the aircraft a380x-experimental branch
# Builds the A32NX and the A380X and uploads them to the CloudFlare CDN
name: a380x-stable
on:
push:
branches:
- v0.12
jobs:
build_a32nx:
name: Build and deploy A32NX
# Prevent running this on forks
if: github.repository_owner == 'flybywiresim'
runs-on: ubuntu-latest
env:
FBW_PRODUCTION_BUILD: 1
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
BUILD_DIR_NAME: stable-a32nx
AIRCRAFT_PROJECT_PREFIX: a32nx
AIRCRAFT_VARIANT: a320-251n
steps:
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v4.1
with:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-large-packages: 'true'
remove-cached-tools: 'true'
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.LARGE_FILES_TEMPORARY_PAT }}
- name: Set BUILT_DATE_TIME
run: echo "BUILT_DATE_TIME=$(date -u -Iseconds)" >> $GITHUB_ENV
- name: Create .env file
run: |
echo FBW_PRODUCTION_BUILD=1 >> fbw-a32nx/.env
echo CLIENT_ID=\"${{ secrets.NAVIGRAPH_CLIENT_ID }}\" >> fbw-a32nx/.env
echo CLIENT_SECRET=\"${{ secrets.NAVIGRAPH_CLIENT_SECRET }}\" >> fbw-a32nx/.env
echo CHARTFOX_SECRET=\"${{ secrets.CHARTFOX_SECRET }}\" >> fbw-a32nx/.env
echo SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\" >> fbw-a32nx/.env
echo AIRCRAFT_PROJECT_PREFIX=${{ env.AIRCRAFT_PROJECT_PREFIX }} >> fbw-a32nx/.env
echo AIRCRAFT_VARIANT=${{ env.AIRCRAFT_VARIANT }} >> fbw-a32nx/.env
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/build_a32nx.sh --no-tty -j 4
rm -rf fbw-a32nx/src
docker system prune -af
- name: Remove A380X source files
run: |
rm -rf ./fbw-a380x/
rm -rf ./large-files/fbw-a380x/
- name: Build ZIP files
run: |
df -h
node ./scripts/fragment_a32nx.js
cp ./fbw-a32nx/out/build-modules/modules.json ./fbw-a32nx/out/flybywire-aircraft-a320-neo/install.json
node ./scripts/install-source_a32nx.js
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./fbw-a32nx/out/
7z a -t7z -m0=lzma2 -mx=7 ../../${{ env.BUILD_DIR_NAME }}/${{ env.MASTER_ZIP_NAME }} ./flybywire-aircraft-a320-neo/
cd ../../
df -h
- name: Upload to CloudFlare CDN
env:
CLOUDFLARE_BUCKET_PASSWORD: ${{ secrets.CLOUDFLARE_BUCKET_PASSWORD }}
CDN_BUCKET_DESTINATION: addons/a32nx/v0.12
run: |
./scripts/cf-cdn.sh $CDN_BUCKET_DESTINATION ./fbw-a32nx/out/build-modules
build_a380x_8k:
name: Build and deploy A380X (8K)
# Prevent running this on forks
if: github.repository_owner == 'flybywiresim'
runs-on: ubuntu-latest
env:
FBW_PRODUCTION_BUILD: 1
BUILD_DIR_NAME: stable-a380x
AIRCRAFT_PROJECT_PREFIX: a380x
STANDALONE_ZIP_NAME: A380X-stable-8K.7z
AIRCRAFT_VARIANT: a380-842
steps:
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v4.1
with:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-large-packages: 'true'
remove-cached-tools: 'true'
- name: Force even more disk space
run: |
sudo rm -rf /usr/local/julia1.11.0
sudo rm -rf /usr/share/swift
sudo rm -rf /opt/microsoft/msedge
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/share/miniconda
sudo rm -rf /opt/pipx
sudo rm -rf /usr/lib/heroku
sudo rm -rf /usr/share/kotlinc
sudo rm -rf /usr/local/aws-cli
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/lib/jvm
sudo rm -rf /usr/local/sqlpackage
sudo rm -rf /usr/share/gradle-8.10.2
sudo rm -rf /usr/lib/python3
sudo rm -rf /usr/lib/python3.10
sudo rm -rf /usr/lib/mono
sudo npm uninstall -g netlify-cli --save
sudo npm uninstall -g parcel --save
df -h
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.LARGE_FILES_TEMPORARY_PAT }}
- name: Set BUILT_DATE_TIME
run: echo "BUILT_DATE_TIME=$(date -u -Iseconds)" >> $GITHUB_ENV
- name: Create .env file
run: |
echo FBW_PRODUCTION_BUILD=1 >> fbw-a380x/.env
echo CLIENT_ID=\"${{ secrets.NAVIGRAPH_CLIENT_ID_A380X }}\" >> fbw-a380x/.env
echo CLIENT_SECRET=\"${{ secrets.NAVIGRAPH_CLIENT_SECRET_A380X }}\" >> fbw-a380x/.env
echo CHARTFOX_SECRET=\"${{ secrets.CHARTFOX_SECRET }}\" >> fbw-a380x/.env
echo SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\" >> fbw-a380x/.env
echo AIRCRAFT_PROJECT_PREFIX=${{ env.AIRCRAFT_PROJECT_PREFIX }} >> fbw-a380x/.env
echo AIRCRAFT_VARIANT=${{ env.AIRCRAFT_VARIANT }} >> fbw-a380x/.env
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
- name: Build A380X
run: |
./scripts/dev-env/run.sh ./scripts/build_a380x.sh --no-tty -j 4
rm -rf fbw-a380x/src
docker system prune -af
- name: Remove A32NX source files
run: |
rm -rf ./fbw-a32nx/
rm -rf ./large-files/fbw-a32nx/
- name: Remove A380X 4K textures
run: |
rm -rf ./large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture-4k/
- name: Build Fragmenter modules
run: |
df -h
node ./scripts/fragment_a380x.js
cp ./fbw-a380x/out/build-modules/modules.json ./fbw-a380x/out/flybywire-aircraft-a380-842/install.json
node ./scripts/install-source_a380x.js
df -h
- name: Upload to CloudFlare CDN (Installer)
env:
CLOUDFLARE_BUCKET_PASSWORD: ${{ secrets.CLOUDFLARE_BUCKET_PASSWORD }}
CDN_BUCKET_DESTINATION: addons/a380x/${{ secrets.A380X_EXP_DIRECTORY }}/stable-8k
run: |
./scripts/cf-cdn.sh $CDN_BUCKET_DESTINATION ./fbw-a380x/out/build-modules
- name: Build Standalone Download files
run: |
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./fbw-a380x/out/
rm -rf build-modules
7z a -t7z -m0=lzma2 -mx=7 -v2g ../../${{ env.BUILD_DIR_NAME }}/${{ env.STANDALONE_ZIP_NAME }} ./flybywire-aircraft-a380-842/
cd ../../
df -h
build_a380x_4k:
name: Build and deploy A380X (4K)
# Prevent running this on forks
if: github.repository_owner == 'flybywiresim'
runs-on: ubuntu-latest
env:
FBW_PRODUCTION_BUILD: 1
BUILD_DIR_NAME: stable-a380x
AIRCRAFT_PROJECT_PREFIX: a380x
STANDALONE_ZIP_NAME: A380X-stable-4K.7z
AIRCRAFT_VARIANT: a380-842
steps:
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v4.1
with:
remove-android: 'true'
remove-dotnet: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-large-packages: 'true'
remove-cached-tools: 'true'
- name: Force even more disk space
run: |
sudo rm -rf /usr/local/julia1.11.0
sudo rm -rf /usr/share/swift
sudo rm -rf /opt/microsoft/msedge
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/share/miniconda
sudo rm -rf /opt/pipx
sudo rm -rf /usr/lib/heroku
sudo rm -rf /usr/share/kotlinc
sudo rm -rf /usr/local/aws-cli
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/lib/jvm
sudo rm -rf /usr/local/sqlpackage
sudo rm -rf /usr/share/gradle-8.10.2
sudo rm -rf /usr/lib/python3
sudo rm -rf /usr/lib/python3.10
sudo rm -rf /usr/lib/mono
sudo npm uninstall -g netlify-cli --save
sudo npm uninstall -g parcel --save
df -h
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.LARGE_FILES_TEMPORARY_PAT }}
- name: Set BUILT_DATE_TIME
run: echo "BUILT_DATE_TIME=$(date -u -Iseconds)" >> $GITHUB_ENV
- name: Create .env file
run: |
echo FBW_PRODUCTION_BUILD=1 >> fbw-a380x/.env
echo CLIENT_ID=\"${{ secrets.NAVIGRAPH_CLIENT_ID_A380X }}\" >> fbw-a380x/.env
echo CLIENT_SECRET=\"${{ secrets.NAVIGRAPH_CLIENT_SECRET_A380X }}\" >> fbw-a380x/.env
echo CHARTFOX_SECRET=\"${{ secrets.CHARTFOX_SECRET }}\" >> fbw-a380x/.env
echo SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\" >> fbw-a380x/.env
echo AIRCRAFT_PROJECT_PREFIX=${{ env.AIRCRAFT_PROJECT_PREFIX }} >> fbw-a380x/.env
echo AIRCRAFT_VARIANT=${{ env.AIRCRAFT_VARIANT }} >> fbw-a380x/.env
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
- name: Build A380X
run: |
./scripts/dev-env/run.sh ./scripts/build_a380x.sh --no-tty -j 4 -4k
rm -rf fbw-a380x/src
docker system prune -af
- name: Remove A32NX source files
run: |
rm -rf ./fbw-a32nx/
rm -rf ./large-files/fbw-a32nx/
- name: Build Fragmenter modules
run: |
df -h
node ./scripts/fragment_a380x.js
cp ./fbw-a380x/out/build-modules/modules.json ./fbw-a380x/out/flybywire-aircraft-a380-842/install.json
node ./scripts/install-source_a380x.js
df -h
- name: Upload to CloudFlare CDN (Installer)
env:
CLOUDFLARE_BUCKET_PASSWORD: ${{ secrets.CLOUDFLARE_BUCKET_PASSWORD }}
CDN_BUCKET_DESTINATION: addons/a380x/${{ secrets.A380X_EXP_DIRECTORY }}/stable-4k
run: |
./scripts/cf-cdn.sh $CDN_BUCKET_DESTINATION ./fbw-a380x/out/build-modules
- name: Build Standalone Download files
run: |
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./fbw-a380x/out/
rm -rf build-modules
7z a -t7z -m0=lzma2 -mx=7 -v2g ../../${{ env.BUILD_DIR_NAME }}/${{ env.STANDALONE_ZIP_NAME }} ./flybywire-aircraft-a380-842/
cd ../../
df -h