feat(a32nx/fws): intermediate callouts #972
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Tests & Build (FS2024) | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - ready_for_review | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.draft == false | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout PR source | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: install | |
| run: ./scripts/dev-env/run.sh ./scripts/setup.sh --clean | |
| - name: npm run lint | |
| run: ./scripts/dev-env/run.sh npm run lint | |
| - name: lint-rust.sh | |
| run: | | |
| ./scripts/dev-env/run.sh scripts/lint-rust.sh | |
| test-rust: | |
| name: Tests (Rust) | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.draft == false | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout PR source | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: test-rust.sh | |
| run: | | |
| ./scripts/dev-env/run.sh scripts/test-rust.sh | |
| test-js: | |
| name: Tests (JS) | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.draft == false | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout PR source | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: npm install | |
| run: ./scripts/dev-env/run.sh ./scripts/setup.sh --clean | |
| - name: npm test | |
| run: npm test | |
| pr-metadata: | |
| name: Upload PR metadata | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.draft == false | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| actions: write | |
| steps: | |
| - name: Checkout PR source | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Save PR metadata | |
| env: | |
| PR_JSON: ${{ toJson(github.event.pull_request) }} | |
| run: | | |
| echo "$PR_JSON" > pr.json | |
| - name: Upload PR metadata as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pr-metadata | |
| path: pr.json | |
| retention-days: 1 | |
| build-a32nx: | |
| name: Build A32NX | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.draft == false | |
| permissions: | |
| contents: read | |
| actions: write | |
| env: | |
| FBW_PRODUCTION_BUILD: 1 | |
| AIRCRAFT_PROJECT_PREFIX: a32nx | |
| AIRCRAFT_VARIANT: a320-251n | |
| 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: Checkout PR source | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| submodules: recursive | |
| - name: Create .env file | |
| run: | | |
| echo FBW_PRODUCTION_BUILD=1 >> fbw-a32nx/.env | |
| echo FBW_TYPECHECK=1 >> fbw-a32nx/.env | |
| echo CLIENT_ID=\"${{ secrets.NAVIGRAPH_CLIENT_ID }}\" >> fbw-a32nx/.env | |
| echo CLIENT_SECRET=\"${{ secrets.NAVIGRAPH_CLIENT_SECRET }}\" >> fbw-a32nx/.env | |
| echo CHARTFOX_SECRET=\"${{ secrets.CHARTFOX_SECRET }}\" >> fbw-a32nx/.env | |
| echo SENTRY_DSN=\"${{ secrets.SENTRY_DSN }}\" >> fbw-a32nx/.env | |
| echo AIRCRAFT_PROJECT_PREFIX=${{ env.AIRCRAFT_PROJECT_PREFIX }} >> fbw-a32nx/.env | |
| echo AIRCRAFT_VARIANT=${{ env.AIRCRAFT_VARIANT }} >> fbw-a32nx/.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 A32NX | |
| run: | | |
| ./scripts/dev-env/run.sh ./scripts/build.sh -r "a32nx" --no-tty -j 4 | |
| docker system prune -af | |
| - name: Remove source files | |
| run: | | |
| rm -rf fbw-a32nx/src | |
| rm -rf ./fbw-a380x/ | |
| rm -rf ./large-files/fbw-a380x/ | |
| rm -rf ./fbw-common/ | |
| rm -rf ./.git/objects/ | |
| rm -rf ./.git/modules/aircraft-large-files/objects/ | |
| - name: Build Fragmenter modules | |
| if: github.event.pull_request.auto_merge == false | |
| run: | | |
| df -h | |
| node ./scripts/fragment_a32nx.js | |
| cp ./fbw-a32nx/out/build-modules/modules.json ./fbw-a32nx/out/flybywire-aircraft-a320-neo/install.json | |
| node ./scripts/install-source_a32nx.js | |
| df -h | |
| - name: Upload PR artifact (GitHub) | |
| uses: actions/upload-artifact@v4 | |
| if: github.event.pull_request.auto_merge == false | |
| with: | |
| name: flybywire-aircraft-a320-neo | |
| path: ./fbw-a32nx/out/flybywire-aircraft-a320-neo/ | |
| - name: Upload modules as artifact | |
| uses: actions/upload-artifact@v4 | |
| if: github.event.pull_request.auto_merge == false | |
| with: | |
| name: build-modules-a32nx | |
| path: ./fbw-a32nx/out/build-modules/ | |
| retention-days: 1 | |
| build_a380x: | |
| name: Build A380X | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.draft == false | |
| permissions: | |
| contents: read | |
| actions: write | |
| env: | |
| FBW_PRODUCTION_BUILD: 1 | |
| AIRCRAFT_PROJECT_PREFIX: a380x | |
| 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/mono | |
| sudo npm uninstall -g netlify-cli --save | |
| sudo npm uninstall -g parcel --save | |
| df -h | |
| - name: Checkout PR source | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| submodules: recursive | |
| - 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 FBW_TYPECHECK=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.sh -r "a380x" --no-tty -j 4 | |
| docker system prune -af | |
| - name: Remove source files | |
| run: | | |
| rm -rf fbw-a380x/src | |
| rm -rf ./fbw-a32nx/ | |
| rm -rf ./large-files/fbw-a32nx/ | |
| rm -rf ./fbw-common/ | |
| rm -rf ./.git/objects/ | |
| rm -rf ./.git/modules/aircraft-large-files/objects/ | |
| - name: Build Fragmenter modules | |
| if: github.event.pull_request.auto_merge == false | |
| 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 PR artifact (GitHub) | |
| uses: actions/upload-artifact@v4 | |
| if: github.event.pull_request.auto_merge == false | |
| with: | |
| name: flybywire-aircraft-a380-842 | |
| path: ./fbw-a380x/out/flybywire-aircraft-a380-842/ | |
| - name: Upload modules as artifact | |
| uses: actions/upload-artifact@v4 | |
| if: github.event.pull_request.auto_merge == false | |
| with: | |
| name: build-modules-a380x | |
| path: ./fbw-a380x/out/build-modules/ | |
| retention-days: 1 | |
| check_fdr2csv: | |
| name: Lint fdr2csv | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout PR source | |
| uses: actions/checkout@v7 | |
| with: | |
| persist-credentials: false | |
| submodules: false | |
| - name: Build fdr2csv | |
| run: | | |
| ./scripts/dev-env/run.sh cargo clippy --manifest-path=/external/tools/fdr2csv/Cargo.toml --all-targets --all-features --keep-going -- -D warnings |