Skip to content

Commit

Permalink
ci: workflows for A380X release
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxtrotSierra6829 committed Oct 31, 2024
1 parent 5411052 commit 2fe8911
Show file tree
Hide file tree
Showing 4 changed files with 426 additions and 45 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/a380x-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ jobs:
run: |
rm -rf ./fbw-a380x/
rm -rf ./large-files/fbw-a380x/
- name: Show disk usage
run: |
du -h -x / | sort -hr
- name: Build ZIP files
run: |
df -h
Expand Down
204 changes: 202 additions & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
AIRCRAFT_VARIANT: a320-251n
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.LARGE_FILES_TEMPORARY_PAT }}
- name: Create .env file
run: |
echo FBW_PRODUCTION_BUILD=1 >> fbw-a32nx/.env
Expand All @@ -32,9 +35,13 @@ jobs:
- name: Build A32NX
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
./scripts/dev-env/run.sh ./scripts/build.sh --no-tty -j 4
./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 file
run: |
cd ./fbw-a32nx/out/
Expand All @@ -59,3 +66,196 @@ jobs:
asset_path: ./${{ env.BUILD_DIR_NAME }}/${{ env.RELEASE_ZIP_NAME }}
asset_name: ${{ env.RELEASE_ZIP_NAME }}
asset_content_type: application/zip

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/[email protected]
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/rc-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/[email protected]
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/rc-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
Loading

0 comments on commit 2fe8911

Please sign in to comment.