From 8704692ae50e84358dddcc65f0ef0aed0ec3d1fa Mon Sep 17 00:00:00 2001 From: Denis Freund Date: Wed, 13 Dec 2023 13:00:06 +0100 Subject: [PATCH] chore: isolate build actions to aircrafts --- .github/workflows/a333x-development.yml | 85 +++++++++ .github/workflows/a333x-experimental.yml | 85 +++++++++ .github/workflows/a339x-development.yml | 85 +++++++++ .github/workflows/a339x-experimental.yml | 85 +++++++++ .github/workflows/development.yml | 217 ----------------------- .github/workflows/experimental.yml | 217 ----------------------- .github/workflows/su95x-development.yml | 85 +++++++++ .github/workflows/su95x-experimental.yml | 85 +++++++++ 8 files changed, 510 insertions(+), 434 deletions(-) create mode 100644 .github/workflows/a333x-development.yml create mode 100644 .github/workflows/a333x-experimental.yml create mode 100644 .github/workflows/a339x-development.yml create mode 100644 .github/workflows/a339x-experimental.yml delete mode 100644 .github/workflows/development.yml delete mode 100644 .github/workflows/experimental.yml create mode 100644 .github/workflows/su95x-development.yml create mode 100644 .github/workflows/su95x-experimental.yml diff --git a/.github/workflows/a333x-development.yml b/.github/workflows/a333x-development.yml new file mode 100644 index 000000000..081b80134 --- /dev/null +++ b/.github/workflows/a333x-development.yml @@ -0,0 +1,85 @@ +name: A333X - Development +on: + push: + branches: + - main + paths: + - '.github/workflows/a333x-development.yml' + - 'hdw-a333x/**' + - 'scripts/build-a333x.js' + - 'scripts/build-a333x.sh' + - 'a333x-igniter.config.mjs' + - 'package.json' + - 'package-lock.json' + +jobs: + build: + 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 + CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} + CDN_BUCKET_DESTINATION: addons/a333x/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 + lfs: false + - 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 + run: | + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/build-modules + - name: Get short SHA + uses: benjlevesque/short-sha@v2.2 + id: short-sha + - name: Upload Release Config to CloudFlare CDN + env: + SHA: ${{ steps.short-sha.outputs.sha }} + run: | + mkdir -p ./build-a333x/out/config + echo "releases:" >> ./build-a333x/out/config/releases.yaml + echo " - name: $SHA" >> ./build-a333x/out/config/releases.yaml + echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a333x/out/config/releases.yaml + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/config diff --git a/.github/workflows/a333x-experimental.yml b/.github/workflows/a333x-experimental.yml new file mode 100644 index 000000000..4553d9c51 --- /dev/null +++ b/.github/workflows/a333x-experimental.yml @@ -0,0 +1,85 @@ +name: A333X - Experimental +on: + push: + branches: + - experimental + paths: + - '.github/workflows/a333x-experimental.yml' + - 'hdw-a333x/**' + - 'scripts/build-a333x.js' + - 'scripts/build-a333x.sh' + - 'a333x-igniter.config.mjs' + - 'package.json' + - 'package-lock.json' + +jobs: + build: + 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: experimental + CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} + CDN_BUCKET_DESTINATION: addons/a333x/experimental + 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 + lfs: false + - 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 + run: | + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/build-modules + - name: Get short SHA + uses: benjlevesque/short-sha@v2.2 + id: short-sha + - name: Upload Release Config to CloudFlare CDN + env: + SHA: ${{ steps.short-sha.outputs.sha }} + run: | + mkdir -p ./build-a333x/out/config + echo "releases:" >> ./build-a333x/out/config/releases.yaml + echo " - name: $SHA" >> ./build-a333x/out/config/releases.yaml + echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a333x/out/config/releases.yaml + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/config diff --git a/.github/workflows/a339x-development.yml b/.github/workflows/a339x-development.yml new file mode 100644 index 000000000..6bbb18e41 --- /dev/null +++ b/.github/workflows/a339x-development.yml @@ -0,0 +1,85 @@ +name: A339X - Development +on: + push: + branches: + - main + paths: + - '.github/workflows/a339x-development.yml' + - 'hdw-a339x/**' + - 'scripts/build-a339x.js' + - 'scripts/build-a339x.sh' + - 'a339x-igniter.config.mjs' + - 'package.json' + - 'package-lock.json' + +jobs: + build: + 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 + CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} + CDN_BUCKET_DESTINATION: addons/a339x/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 + lfs: true + - 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 + run: | + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/build-modules + - name: Get short SHA + uses: benjlevesque/short-sha@v2.2 + id: short-sha + - name: Upload Release Config to CloudFlare CDN + env: + SHA: ${{ steps.short-sha.outputs.sha }} + run: | + mkdir -p ./build-a339x/out/config + echo "releases:" >> ./build-a339x/out/config/releases.yaml + echo " - name: $SHA" >> ./build-a339x/out/config/releases.yaml + echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a339x/out/config/releases.yaml + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/config diff --git a/.github/workflows/a339x-experimental.yml b/.github/workflows/a339x-experimental.yml new file mode 100644 index 000000000..04c7d4e6a --- /dev/null +++ b/.github/workflows/a339x-experimental.yml @@ -0,0 +1,85 @@ +name: A339X - Experimental +on: + push: + branches: + - experimental + paths: + - '.github/workflows/a339x-experimental.yml' + - 'hdw-a339x/**' + - 'scripts/build-a339x.js' + - 'scripts/build-a339x.sh' + - 'a339x-igniter.config.mjs' + - 'package.json' + - 'package-lock.json' + +jobs: + build: + 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: experimental + CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} + CDN_BUCKET_DESTINATION: addons/a339x/experimental + 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 + lfs: true + - 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 + run: | + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/build-modules + - name: Get short SHA + uses: benjlevesque/short-sha@v2.2 + id: short-sha + - name: Upload Release Config to CloudFlare CDN + env: + SHA: ${{ steps.short-sha.outputs.sha }} + run: | + mkdir -p ./build-a339x/out/config + echo "releases:" >> ./build-a339x/out/config/releases.yaml + echo " - name: $SHA" >> ./build-a339x/out/config/releases.yaml + echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a339x/out/config/releases.yaml + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/config diff --git a/.github/workflows/development.yml b/.github/workflows/development.yml deleted file mode 100644 index 0779a44a1..000000000 --- a/.github/workflows/development.yml +++ /dev/null @@ -1,217 +0,0 @@ -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 - CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/a333x/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 - lfs: false - - 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 - run: | - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/build-modules - - name: Get short SHA - uses: benjlevesque/short-sha@v2.2 - id: short-sha - - name: Upload Release Config to CloudFlare CDN - env: - SHA: ${{ steps.short-sha.outputs.sha }} - run: | - mkdir -p ./build-a333x/out/config - echo "releases:" >> ./build-a333x/out/config/releases.yaml - echo " - name: $SHA" >> ./build-a333x/out/config/releases.yaml - echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a333x/out/config/releases.yaml - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/config - 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 - CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/a339x/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 - lfs: true - - 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 - run: | - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/build-modules - - name: Get short SHA - uses: benjlevesque/short-sha@v2.2 - id: short-sha - - name: Upload Release Config to CloudFlare CDN - env: - SHA: ${{ steps.short-sha.outputs.sha }} - run: | - mkdir -p ./build-a339x/out/config - echo "releases:" >> ./build-a339x/out/config/releases.yaml - echo " - name: $SHA" >> ./build-a339x/out/config/releases.yaml - echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a339x/out/config/releases.yaml - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/config - 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 - CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/su95x/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 - lfs: false - - 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 - run: | - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/build-modules - - name: Get short SHA - uses: benjlevesque/short-sha@v2.2 - id: short-sha - - name: Upload Release Config to CloudFlare CDN - env: - SHA: ${{ steps.short-sha.outputs.sha }} - run: | - mkdir -p ./build-su95x/out/config - echo "releases:" >> ./build-su95x/out/config/releases.yaml - echo " - name: $SHA" >> ./build-su95x/out/config/releases.yaml - echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-su95x/out/config/releases.yaml - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/config diff --git a/.github/workflows/experimental.yml b/.github/workflows/experimental.yml deleted file mode 100644 index ff2951f64..000000000 --- a/.github/workflows/experimental.yml +++ /dev/null @@ -1,217 +0,0 @@ -name: experimental -on: - push: - branches: - - experimental - -jobs: - build-a333x: - runs-on: ubuntu-latest - env: - A32NX_PRODUCTION_BUILD: 1 - A32NX_INSTRUMENTS_BUILD_WORKERS: 2 - ZIP_NAME: headwindsim-aircraft-a330-300-exp.zip - BUILD_DIR_NAME: experimental - CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/a333x/experimental - 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 - lfs: false - - 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 - run: | - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/build-modules - - name: Get short SHA - uses: benjlevesque/short-sha@v2.2 - id: short-sha - - name: Upload Release Config to CloudFlare CDN - env: - SHA: ${{ steps.short-sha.outputs.sha }} - run: | - mkdir -p ./build-a333x/out/config - echo "releases:" >> ./build-a333x/out/config/releases.yaml - echo " - name: $SHA" >> ./build-a333x/out/config/releases.yaml - echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a333x/out/config/releases.yaml - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a333x/out/config - build-a339x: - runs-on: ubuntu-latest - env: - A32NX_PRODUCTION_BUILD: 1 - A32NX_INSTRUMENTS_BUILD_WORKERS: 2 - ZIP_NAME: headwindsim-aircraft-a330-900-exp.zip - BUILD_DIR_NAME: experimental - CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/a339x/experimental - 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@v3 - with: - submodules: recursive - lfs: true - - 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 - - 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 - run: | - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/build-modules - - name: Get short SHA - uses: benjlevesque/short-sha@v2.2 - id: short-sha - - name: Upload Release Config to CloudFlare CDN - env: - SHA: ${{ steps.short-sha.outputs.sha }} - run: | - mkdir -p ./build-a339x/out/config - echo "releases:" >> ./build-a339x/out/config/releases.yaml - echo " - name: $SHA" >> ./build-a339x/out/config/releases.yaml - echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-a339x/out/config/releases.yaml - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-a339x/out/config - build-su95x: - runs-on: ubuntu-latest - env: - A32NX_PRODUCTION_BUILD: 1 - A32NX_INSTRUMENTS_BUILD_WORKERS: 2 - ZIP_NAME: headwindsim-aircraft-su100-95-exp.zip - BUILD_DIR_NAME: experimental - CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/su95x/experimental - 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 - lfs: false - - 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 - run: | - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/build-modules - - name: Get short SHA - uses: benjlevesque/short-sha@v2.2 - id: short-sha - - name: Upload Release Config to CloudFlare CDN - env: - SHA: ${{ steps.short-sha.outputs.sha }} - run: | - mkdir -p ./build-su95x/out/config - echo "releases:" >> ./build-su95x/out/config/releases.yaml - echo " - name: $SHA" >> ./build-su95x/out/config/releases.yaml - echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-su95x/out/config/releases.yaml - ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/config \ No newline at end of file diff --git a/.github/workflows/su95x-development.yml b/.github/workflows/su95x-development.yml new file mode 100644 index 000000000..e0c643940 --- /dev/null +++ b/.github/workflows/su95x-development.yml @@ -0,0 +1,85 @@ +name: SU95X - Development +on: + push: + branches: + - main + paths: + - '.github/workflows/su95x-development.yml' + - 'hdw-su95x/**' + - 'scripts/build-su95x.js' + - 'scripts/build-su95x.sh' + - 'su95x-igniter.config.mjs' + - 'package.json' + - 'package-lock.json' + +jobs: + build: + 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 + CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} + CDN_BUCKET_DESTINATION: addons/su95x/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 + lfs: false + - 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 + run: | + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/build-modules + - name: Get short SHA + uses: benjlevesque/short-sha@v2.2 + id: short-sha + - name: Upload Release Config to CloudFlare CDN + env: + SHA: ${{ steps.short-sha.outputs.sha }} + run: | + mkdir -p ./build-su95x/out/config + echo "releases:" >> ./build-su95x/out/config/releases.yaml + echo " - name: $SHA" >> ./build-su95x/out/config/releases.yaml + echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-su95x/out/config/releases.yaml + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/config diff --git a/.github/workflows/su95x-experimental.yml b/.github/workflows/su95x-experimental.yml new file mode 100644 index 000000000..9aa39511e --- /dev/null +++ b/.github/workflows/su95x-experimental.yml @@ -0,0 +1,85 @@ +name: SU95X - Experimental +on: + push: + branches: + - experimental + paths: + - '.github/workflows/su95x-experimental.yml' + - 'hdw-su95x/**' + - 'scripts/build-su95x.js' + - 'scripts/build-su95x.sh' + - 'su95x-igniter.config.mjs' + - 'package.json' + - 'package-lock.json' + +jobs: + build: + 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: experimental + CLOUDFLARE_WORKER_PASSWORD: ${{ secrets.CLOUDFLARE_WORKER_PASSWORD }} + CDN_BUCKET_DESTINATION: addons/su95x/experimental + 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 + lfs: false + - 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 + run: | + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/build-modules + - name: Get short SHA + uses: benjlevesque/short-sha@v2.2 + id: short-sha + - name: Upload Release Config to CloudFlare CDN + env: + SHA: ${{ steps.short-sha.outputs.sha }} + run: | + mkdir -p ./build-su95x/out/config + echo "releases:" >> ./build-su95x/out/config/releases.yaml + echo " - name: $SHA" >> ./build-su95x/out/config/releases.yaml + echo " date: $(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> ./build-su95x/out/config/releases.yaml + ./scripts/cdn.sh $CDN_BUCKET_DESTINATION ./build-su95x/out/config