-
-
Notifications
You must be signed in to change notification settings - Fork 39
181 lines (180 loc) · 6.99 KB
/
development.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
name: development
on:
push:
branches:
- main
jobs:
build-a333x:
runs-on: ubuntu-latest
env:
A32NX_PRODUCTION_BUILD: 1
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
ZIP_NAME: headwindsim-aircraft-a330-300-dev.zip
BUILD_DIR_NAME: development
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: false
haskell: false
large-packages: false
docker-images: false
swap-storage: false
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set BUILT_DATE_TIME
run: echo "BUILT_DATE_TIME=$(date -u -Iseconds)" >> $GITHUB_ENV
- name: Create .env file
run: |
echo A32NX_PRODUCTION_BUILD=1 >> hdw-a333x/.env
echo CLIENT_ID=\"${{ secrets.NAVIGRAPH_CLIENT_ID }}\" >> hdw-a333x/.env
echo CLIENT_SECRET=\"${{ secrets.NAVIGRAPH_CLIENT_SECRET }}\" >> hdw-a333x/.env
echo SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\" >> hdw-a333x/.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: Setup Package
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
- name: Copy Sources
run: |
./scripts/dev-env/run.sh ./scripts/copy_a333x.sh
- name: Build A339X Package
run: |
./scripts/dev-env/run.sh ./scripts/build_a333x.sh --no-tty -j 4
docker system prune -af
- name: Build ZIP files
run: |
node ./scripts/fragment-a333x.js
cp ./build-a333x/out/build-modules/modules.json ./build-a333x/out/headwindsim-aircraft-a330-300/install.json
node ./scripts/install-source-a333x.js
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./build-a333x/out/
zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.ZIP_NAME }} ./headwindsim-aircraft-a330-300/
cd ../../
- name: Upload to CloudFlare CDN
env:
CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }}
CDN_BUCKET_DESTINATION: addons/a333x/development
run: |
./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/build-modules
build-a339x:
runs-on: ubuntu-latest
env:
A32NX_PRODUCTION_BUILD: 1
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
ZIP_NAME: headwindsim-aircraft-a330-900-dev.zip
BUILD_DIR_NAME: development
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: false
haskell: false
large-packages: false
docker-images: false
swap-storage: false
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set BUILT_DATE_TIME
run: echo "BUILT_DATE_TIME=$(date -u -Iseconds)" >> $GITHUB_ENV
- name: Create .env file
run: |
echo A32NX_PRODUCTION_BUILD=1 >> hdw-a339x/.env
echo CLIENT_ID=\"${{ secrets.NAVIGRAPH_CLIENT_ID }}\" >> hdw-a339x/.env
echo CLIENT_SECRET=\"${{ secrets.NAVIGRAPH_CLIENT_SECRET }}\" >> hdw-a339x/.env
echo SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\" >> hdw-a339x/.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: Setup Package
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
- name: Copy Sources
run: |
./scripts/dev-env/run.sh ./scripts/copy_a339x.sh
- name: Build A339X Package
run: |
./scripts/dev-env/run.sh ./scripts/build_a339x.sh --no-tty -j 4
docker system prune -af
- name: Build ZIP files
run: |
node ./scripts/fragment-a339x.js
cp ./build-a339x/out/build-modules/modules.json ./build-a339x/out/headwindsim-aircraft-a330-900/install.json
node ./scripts/install-source-a339x.js
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./build-a339x/out/
zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.ZIP_NAME }} ./headwindsim-aircraft-a330-900/
cd ../../
- name: Upload to CloudFlare CDN
env:
CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }}
CDN_BUCKET_DESTINATION: addons/a339x/development
run: |
./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/build-modules
build-su95x:
runs-on: ubuntu-latest
env:
A32NX_PRODUCTION_BUILD: 1
A32NX_INSTRUMENTS_BUILD_WORKERS: 2
ZIP_NAME: headwindsim-aircraft-su100-95-dev.zip
BUILD_DIR_NAME: development
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: false
haskell: false
large-packages: false
docker-images: false
swap-storage: false
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set BUILT_DATE_TIME
run: echo "BUILT_DATE_TIME=$(date -u -Iseconds)" >> $GITHUB_ENV
- name: Create .env file
run: |
echo A32NX_PRODUCTION_BUILD=1 >> hdw-su95x/.env
echo CLIENT_ID=\"${{ secrets.NAVIGRAPH_CLIENT_ID }}\" >> hdw-su95x/.env
echo CLIENT_SECRET=\"${{ secrets.NAVIGRAPH_CLIENT_SECRET }}\" >> hdw-su95x/.env
echo SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\" >> hdw-su95x/.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: Setup Package
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
- name: Copy Sources
run: |
./scripts/dev-env/run.sh ./scripts/copy_su95x.sh
- name: Build SU95X Package
run: |
./scripts/dev-env/run.sh ./scripts/build_su95x.sh --no-tty -j 4
docker system prune -af
- name: Build ZIP files
run: |
node ./scripts/fragment-su95x.js
cp ./build-su95x/out/build-modules/modules.json ./build-su95x/out/headwindsim-aircraft-su100-95/install.json
node ./scripts/install-source-su95x.js
mkdir ./${{ env.BUILD_DIR_NAME }}
cd ./build-su95x/out/
zip -r ../../${{ env.BUILD_DIR_NAME }}/${{ env.ZIP_NAME }} ./headwindsim-aircraft-su100-95/
cd ../../
- name: Upload to CloudFlare CDN
env:
CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }}
CDN_BUCKET_DESTINATION: addons/su95x/development
run: |
./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/build-modules