-
-
Notifications
You must be signed in to change notification settings - Fork 39
78 lines (77 loc) · 2.87 KB
/
a339x-experimental.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
name: A339X - Experimental
on:
push:
branches:
- experimental
paths:
- '.github/workflows/a339x-experimental.yml'
- 'hdw-common/**'
- 'hdw-a339x/**'
- 'scripts/build-a339x.js'
- 'scripts/build-a339x.sh'
- 'scripts/build-cmake-a339x.sh'
- 'scripts/copy_a339x.sh'
- 'scripts/fragment-a339x.js'
- 'scripts/install-source-a339x.js'
- 'a339x-igniter.config.mjs'
- 'package.json'
- 'package-lock.json'
- 'flybywire'
- 'Cargo-A339X.toml'
jobs:
build:
runs-on: ubuntu-latest
env:
HDW_PRODUCTION_BUILD: 1
STANDALONE_ZIP_NAME: headwindsim-aircraft-a330-900-dev.zip
BUILD_DIR_NAME: experimental
CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }}
CDN_BUCKET_DESTINATION: addons/a339x/experimental
AIRCRAFT_PROJECT_PREFIX: a339x
AIRCRAFT_VARIANT: a330-941
steps:
- name: Maximize build space
uses: AdityaGarg8/[email protected]
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: true
lfs: true
- name: Set BUILT_DATE_TIME
run: echo "BUILT_DATE_TIME=$(date -u -Iseconds)" >> $GITHUB_ENV
- name: Create .env file
run: |
echo HDW_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 AIRCRAFT_PROJECT_PREFIX=${{ env.AIRCRAFT_PROJECT_PREFIX }} >> hdw-a339x/.env
echo AIRCRAFT_VARIANT=${{ env.AIRCRAFT_VARIANT }} >> 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 Fragmenter modules
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
- name: Upload to CloudFlare CDN
run: |
./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/build-modules