diff --git a/.github/workflows/a380x-stable.yml b/.github/workflows/a380x-stable.yml index e811d6a2947..aacab1283c7 100644 --- a/.github/workflows/a380x-stable.yml +++ b/.github/workflows/a380x-stable.yml @@ -16,7 +16,7 @@ jobs: env: FBW_PRODUCTION_BUILD: 1 A32NX_INSTRUMENTS_BUILD_WORKERS: 2 - BUILD_DIR_NAME: a380x-experimental-a32nx + BUILD_DIR_NAME: stable-a32nx AIRCRAFT_PROJECT_PREFIX: a32nx AIRCRAFT_VARIANT: a320-251n steps: @@ -82,16 +82,16 @@ jobs: run: | ./scripts/cf-cdn.sh $CDN_BUCKET_DESTINATION ./fbw-a32nx/out/build-modules - build_a380x: - name: Build and deploy A380X + 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: a380x-experimental-a380x + BUILD_DIR_NAME: stable-a380x AIRCRAFT_PROJECT_PREFIX: a380x - STANDALONE_ZIP_NAME: A380X-exp.7z + STANDALONE_ZIP_NAME: A380X-stable-8K.7z AIRCRAFT_VARIANT: a380-842 steps: - name: Maximize build space @@ -165,7 +165,102 @@ jobs: - name: Upload to CloudFlare CDN (Installer) env: CLOUDFLARE_BUCKET_PASSWORD: ${{ secrets.CLOUDFLARE_BUCKET_PASSWORD }} - CDN_BUCKET_DESTINATION: addons/a380x/${{ secrets.A380X_EXP_DIRECTORY }}/stable + 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 diff --git a/ci.igniter.config.mjs b/ci.igniter.config.mjs deleted file mode 100644 index 4945a26a818..00000000000 --- a/ci.igniter.config.mjs +++ /dev/null @@ -1,225 +0,0 @@ -import { ExecTask, TaskOfTasks } from '@flybywiresim/igniter'; -import { getInstrumentsIgniterTasks as getA320InstrumentsIgniterTasks } from './fbw-a32nx/src/systems/instruments/buildSrc/igniter/tasks.mjs'; -import { getInstrumentsIgniterTasks as getA380InstrumentsIgniterTasks } from './fbw-a380x/src/systems/instruments/buildSrc/igniter/tasks.mjs'; - -export default new TaskOfTasks('all', [ - // A32NX Task - new TaskOfTasks('a32nx', [ - // Prepare the out folder and any other pre tasks. - // Currently, these can be run in parallel, but in the future, we may need to run them in sequence if there are any dependencies. - new TaskOfTasks( - 'preparation', - [ - new ExecTask('copy-base-files', 'npm run build-a32nx:copy-base-files'), - new TaskOfTasks( - 'localization', - [ - new ExecTask('efb-translation', 'npm run build-a32nx:efb-translation'), - new ExecTask('locPak-translation', 'npm run build-a32nx:locPak-translation'), - ], - true, - ), - ], - false, - ), - - // Group all typescript and react build tasks together. - new TaskOfTasks( - 'build', - [ - new ExecTask('model', 'npm run build-a32nx:model', [ - 'fbw-a32nx/src/model', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model', - ]), - new ExecTask('behavior', 'npm run build-a32nx:behavior', [ - 'fbw-a32nx/src/behavior', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/ModelBehaviorDefs/A32NX/generated', - ]), - - new TaskOfTasks('atsu', [ - new ExecTask('common', 'npm run build-a32nx:atsu-common', [ - 'fbw-a32nx/src/systems/atsu/common', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/JS/fbw-a32nx/atsu/common.js', - ]), - new ExecTask('fmsclient', 'npm run build-a32nx:atsu-fms-client', [ - 'fbw-a32nx/src/systems/atsu/common', - 'fbw-a32nx/src/systems/atsu/fmsclient', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/JS/fbw-a32nx/atsu/fmsclient.js', - ]), - ]), - new ExecTask('extras-host', 'npm run build-a32nx:extras-host', [ - 'fbw-a32nx/src/systems/extras-host', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX/ExtrasHost', - ]), - new ExecTask('failures', 'npm run build-a32nx:failures', [ - 'fbw-a32nx/src/systems/failures', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/JS/fbw-a32nx/failures/failures.js', - ]), - new ExecTask('fmgc', 'npm run build-a32nx:fmgc', [ - 'fbw-a32nx/src/systems/fmgc', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/JS/fbw-a32nx/fmgc', - ]), - new ExecTask('sentry-client', 'npm run build-a32nx:sentry-client', [ - 'fbw-a32nx/src/systems/sentry-client', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/JS/fbw-a32nx/sentry-client', - ]), - new ExecTask('simbridge-client', 'npm run build-a32nx:simbridge-client', [ - 'fbw-a32nx/src/systems/simbridge-client', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/JS/fbw-a32nx/simbridge-client', - ]), - new ExecTask('systems-host', 'npm run build-a32nx:systems-host', [ - 'fbw-a32nx/src/systems/systems-host', - 'fbw-common/src/systems/datalink', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX/SystemsHost', - ]), - new ExecTask('tcas', 'npm run build-a32nx:tcas', [ - 'fbw-a32nx/src/systems/tcas', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/html_ui/JS/fbw-a32nx/tcas', - ]), - - new TaskOfTasks('instruments', getA320InstrumentsIgniterTasks(), true), - ], - true, - ), - - // Group all WASM build tasks together but separate from the rest of the tasks as build run more stable like this. - new TaskOfTasks( - 'wasm', - [ - new ExecTask('systems', 'npm run build-a32nx:systems', [ - 'fbw-a32nx/src/wasm/systems', - 'fbw-common/src/wasm/systems', - 'Cargo.lock', - 'Cargo.toml', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/systems.wasm', - ]), - new ExecTask('systems-fbw', 'npm run build-a32nx:fbw', [ - 'fbw-a32nx/src/wasm/fbw_a320', - 'fbw-common/src/wasm/fbw_common', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/fbw.wasm', - ]), - new ExecTask( - 'systems-terronnd', - ['npm run build-a32nx:terronnd'], - [ - 'fbw-common/src/wasm/terronnd', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/terronnd.wasm', - 'fbw-common/src/wasm/terronnd/out/terronnd.wasm', - ], - ), - new ExecTask('cpp-wasm-cmake', 'npm run build:cpp-wasm-cmake', [ - 'fbw-common/src/wasm/cpp-msfs-framework', - 'fbw-common/src/wasm/extra-backend', - 'fbw-common/src/wasm/fadec_common', - 'fbw-a32nx/src/wasm/extra-backend-a32nx', - 'fbw-a32nx/src/wasm/fadec_a32nx', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/extra-backend-a32nx.wasm', - 'fbw-a32nx/out/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/fadec-a32nx.wasm', - ]), - ], - true, - ), - - // Create final package meta files. - new TaskOfTasks('dist', [ - new ExecTask('metadata', 'npm run build-a32nx:metadata'), - new ExecTask('manifests', 'npm run build-a32nx:manifest'), - ]), - ]), - - // A380X Tasks - new TaskOfTasks('a380x', [ - new TaskOfTasks( - 'preparation', - [ - new ExecTask('copy-base-files', [ - 'npm run build-a380x:link-base-files', - 'npm run unchunkLargeFiles', - 'npm run build-a380x:link-large-files', - // temporary until folder exists - 'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/', - ]), - new TaskOfTasks( - 'localization', - [new ExecTask('locPak-translation', 'npm run build-a380x:locPak-translation')], - true, - ), - ], - false, - ), - - // Group all typescript and react build tasks together. - new TaskOfTasks( - 'build', - [ - new ExecTask('extras-host', 'npm run build-a380x:extras-host', [ - 'fbw-a380x/src/systems/extras-host', - 'fbw-a380x/out/flybywire-aircraft-a380-842/html_ui/Pages/VCockpit/Instruments/A380X/ExtrasHost', - ]), - new ExecTask('systems-host', 'npm run build-a380x:systems-host', [ - 'fbw-a380x/src/systems/systems-host', - 'fbw-a380x/src/systems/shared/src', - 'fbw-common/src/systems/shared/src', - 'fbw-a380x/out/flybywire-aircraft-a380-842/html_ui/Pages/VCockpit/Instruments/A380X/SystemsHost', - ]), - new TaskOfTasks('instruments', getA380InstrumentsIgniterTasks(), true), - ], - true, - ), - - new TaskOfTasks( - 'wasm', - [ - new ExecTask('systems', 'npm run build-a380x:systems', [ - 'fbw-common/src/wasm/systems', - 'Cargo.lock', - 'Cargo.toml', - 'fbw-a380x/src/wasm/systems', - 'fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/systems.wasm', - ]), - new ExecTask('systems-fbw', 'npm run build-a380x:fbw', [ - 'fbw-common/src/wasm/fbw_common', - 'fbw-a380x/src/wasm/fbw_a380', - 'fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/fbw.wasm', - ]), - new ExecTask( - 'systems-terronnd', - ['npm run build-a380x:terronnd'], - [ - 'fbw-common/src/wasm/terronnd', - 'fbw-common/src/wasm/terronnd/out/terronnd.wasm', - 'fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/terronnd.wasm', - ], - ), - new ExecTask('cpp-wasm-cmake', 'npm run build:cpp-wasm-cmake', [ - 'fbw-common/src/wasm/cpp-msfs-framework', - 'fbw-common/src/wasm/extra-backend', - 'fbw-common/src/wasm/fadec_common', - 'fbw-a380x/src/wasm/extra-backend-a380x', - 'fbw-a380x/src/wasm/fadec_a380x', - 'fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/extra-backend-a380x.wasm', - 'fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/fadec-a380x.wasm', - ]), - ], - true, - ), - - // Create final package meta files. - new TaskOfTasks('dist', [ - new ExecTask('metadata', 'npm run build-a380x:metadata'), - new ExecTask('manifests', 'npm run build-a380x:manifest'), - ]), - ]), - - // InGamePanels Checklist Fix Tasks - new TaskOfTasks('ingamepanels-checklist-fix', [ - // Prepare the out folder and any other pre tasks. - // Currently, these can be run in parallel, but in the future, we may need to run them in sequence if there are any dependencies. - new TaskOfTasks( - 'preparation', - [new ExecTask('copy-base-files', 'npm run build-ingamepanels-checklist-fix:copy-base-files')], - true, - ), - new TaskOfTasks('dist', [new ExecTask('manifests', 'npm run build-ingamepanels-checklist-fix:manifest')]), - ]), -]); diff --git a/igniter.config.mjs b/igniter.config.mjs index b98432847b5..cae21f410e9 100644 --- a/igniter.config.mjs +++ b/igniter.config.mjs @@ -132,14 +132,50 @@ export default new TaskOfTasks('all', [ new TaskOfTasks( 'preparation', [ - new ExecTask('copy-base-files', [ - 'npm run build-a380x:copy-base-files', - 'npm run unchunkLargeFiles', - 'npm run build-a380x:copy-large-files', - 'npm run chunkLargeFiles', - // temporary until folder exists - 'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/', - ]), + new TaskOfTasks( + 'ci-build', + [ + new ExecTask('copy-base-files (8K)', [ + 'npm run build-a380x:link-base-files', + 'npm run unchunkLargeFiles', + 'npm run build-a380x:link-large-files', + // temporary until folder exists + 'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/', + ]), + new ExecTask('copy-base-files (4K)', [ + 'npm run build-a380x:link-base-files', + 'npm run unchunkLargeFiles', + 'npm run build-a380x:link-large-files', + 'npm run build-a380x:copy-large-files-texture-4k', + // temporary until folder exists + 'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/', + ]), + ], + false, + ), + new TaskOfTasks( + 'local-build', + [ + new ExecTask('copy-base-files (8K)', [ + 'npm run build-a380x:copy-base-files', + 'npm run unchunkLargeFiles', + 'npm run build-a380x:copy-large-files', + 'npm run chunkLargeFiles', + // temporary until folder exists + 'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/', + ]), + new ExecTask('copy-base-files (4K)', [ + 'npm run build-a380x:copy-base-files', + 'npm run unchunkLargeFiles', + 'npm run build-a380x:copy-large-files', + 'npm run build-a380x:copy-large-files-texture-4k', + 'npm run chunkLargeFiles', + // temporary until folder exists + 'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/', + ]), + ], + false, + ), new TaskOfTasks( 'localization', [new ExecTask('locPak-translation', 'npm run build-a380x:locPak-translation')], diff --git a/large-files b/large-files index 1b053d0fc0c..7378a057d24 160000 --- a/large-files +++ b/large-files @@ -1 +1 @@ -Subproject commit 1b053d0fc0cac036340a60c5c35c5bf12d6f71fe +Subproject commit 7378a057d2450e96d8e548a1d2adc40468a4a024 diff --git a/package.json b/package.json index d9a886e508b..de2dd923868 100644 --- a/package.json +++ b/package.json @@ -45,9 +45,11 @@ "watch:instruments": "rollup --max-old-space-size=8192 -wc src/systems/instruments/buildSrc/simulatorBuild.mjs", "====== A380 =============================================================": "========================================================", "build-a380x:copy-base-files": "mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842 && (rsync -a fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/ || cp -a -u fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/)", - "build-a380x:copy-large-files": "mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842 && (rsync -a large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/ || cp -a -u large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/)", - "build-a380x:link-base-files": "mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842 && cp -l -r fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/", - "build-a380x:link-large-files": "mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842 && cp -l -r large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/", + "build-a380x:copy-large-files": "mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842 && (rsync -a --exclude='texture-4k' large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/ || (cp -a -u large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/ && rm -rf fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture-4k))", + "build-a380x:copy-large-files-texture-4k": "mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture && (rsync -a large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture-4k/ fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture/ || cp -a large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture-4k/* fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture/)", + "build-a380x:link-base-files": "mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842 && cp -l -r -f fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/", + "build-a380x:link-large-files": "mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842 && cp -l -r -f large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842 fbw-a380x/out/ && rm -rf fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture-4k", + "build-a380x:link-large-files-texture-4k": "mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture && cp -l -r -f large-files/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture-4k/* fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/texture/", "build-a380x:efb-translation": "cd fbw-common/src/systems/instruments/src/EFB/Localization && node build-flypad-translation.js", "build-a380x:locPak-translation": "cd fbw-a380x/src/localization && node build-locPak-translation.js", "build-a380x:extras-host": "node fbw-a380x/src/systems/extras-host/build.js", diff --git a/scripts/build.sh b/scripts/build.sh index d0f4212ec85..404a6c3e72a 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -6,6 +6,8 @@ set -e ORIGINAL_USER_ID=$(stat -c '%u' /external) ORIGINAL_GROUP_ID=$(stat -c '%g' /external) +USE_4K_TEXTURES="false" + # set ownership to root to fix cargo/rust build (when run as github action) if [ "${GITHUB_ACTIONS}" == "true" ]; then chown -R root:root /external @@ -21,14 +23,31 @@ for arg in "$@"; do rm -rf /external/fbw-a32nx/bundles rm -rf /external/fbw-a380x/out rm -rf /external/fbw-ingamepanels-checklist-fix/out + # If the argument is "-4k", build with 4k textures instead of maximum resolution + elif [ "$arg" = "-4k" ]; then + USE_4K_TEXTURES="true" else # Otherwise, add the arg it to the new array args+=("$arg") fi done -# run build with the new arguments -time npx igniter "${args[@]}" +#use ci config if github action +if [ "${GITHUB_ACTIONS}" == "true" ]; then + # select build tasks for assigned texture resolution + if [ "${USE_4K_TEXTURES}" == "true" ]; then + time npx igniter -r "^(?!.*local-build)(?!.*8K).*" "${args[@]}" + else + time npx igniter -r "^(?!.*local-build)(?!.*4K).*" "${args[@]}" + fi +else + # select build tasks for assigned texture resolution + if [ "${USE_4K_TEXTURES}" == "true" ]; then + time npx igniter -r "^(?!.*ci-build)(?!.*8K).*" "${args[@]}" + else + time npx igniter -r "^(?!.*ci-build)(?!.*4K).*" "${args[@]}" + fi +fi # restore ownership (when run as github action) if [ "${GITHUB_ACTIONS}" == "true" ]; then diff --git a/scripts/build_a380x.sh b/scripts/build_a380x.sh index 188a0ac124f..b6d95113a1c 100755 --- a/scripts/build_a380x.sh +++ b/scripts/build_a380x.sh @@ -7,6 +7,7 @@ ORIGINAL_USER_ID=$(stat -c '%u' /external) ORIGINAL_GROUP_ID=$(stat -c '%g' /external) AIRCRAFT_PROJECT_PREFIX="a380x" +USE_4K_TEXTURES="false" # set ownership to root to fix cargo/rust build (when run as github action) if [ "${GITHUB_ACTIONS}" == "true" ]; then @@ -21,19 +22,30 @@ for arg in "$@"; do echo "Removing out directories..." rm -rf /external/fbw-"${AIRCRAFT_PROJECT_PREFIX}"/out rm -rf /external/fbw-"${AIRCRAFT_PROJECT_PREFIX}"/bundles + # If the argument is "-4k", build with 4k textures instead of maximum resolution + elif [ "$arg" = "-4k" ]; then + USE_4K_TEXTURES="true" else # Otherwise, add the arg it to the new array args+=("$arg") fi done - +#use ci config if github action if [ "${GITHUB_ACTIONS}" == "true" ]; then - # run build - time npx igniter -c "ci.igniter.config.mjs" -r "${AIRCRAFT_PROJECT_PREFIX}" "${args[@]}" + # select build tasks for assigned texture resolution + if [ "${USE_4K_TEXTURES}" == "true" ]; then + time npx igniter -r "^(?!.*local-build)(?!.*8K).*${AIRCRAFT_PROJECT_PREFIX}.*" "${args[@]}" + else + time npx igniter -r "^(?!.*local-build)(?!.*4K).*${AIRCRAFT_PROJECT_PREFIX}.*" "${args[@]}" + fi else - # run build - time npx igniter -r "${AIRCRAFT_PROJECT_PREFIX}" "${args[@]}" + # select build tasks for assigned texture resolution + if [ "${USE_4K_TEXTURES}" == "true" ]; then + time npx igniter -r "^(?!.*ci-build)(?!.*8K).*${AIRCRAFT_PROJECT_PREFIX}.*" "${args[@]}" + else + time npx igniter -r "^(?!.*ci-build)(?!.*4K).*${AIRCRAFT_PROJECT_PREFIX}.*" "${args[@]}" + fi fi # restore ownership (when run as github action)