diff --git a/.github/workflows/firefox.yml b/.github/workflows/firefox.yml index 45639c096..d058995a3 100644 --- a/.github/workflows/firefox.yml +++ b/.github/workflows/firefox.yml @@ -22,18 +22,12 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - type: [debug, release] - flavor: [browser] + type: [debug] + flavor: [browser, glue] include: - - os: ubuntu-latest - type: debug - flavor: glue - - os: macos-latest - type: debug - flavor: glue - - os: windows-latest - type: debug - flavor: glue + - type: ${{ github.event.pull_request.draft == false && 'release' || '' }} + exclude: + - flavor: ${{github.event.pull_request.draft == true && 'browser' || ''}} runs-on: ${{ matrix.os }} defaults: run: @@ -44,11 +38,10 @@ jobs: steps: - name: Check out Neqo - if: matrix.flavor != 'browser' || github.event.pull_request.draft == true uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Maximize build space - if: runner.os == 'Linux' && matrix.flavor == 'browser' + if: runner.os == 'Linux' run: | sudo rm -rf /usr/local/lib/android || true sudo rm -rf /usr/share/dotnet || true @@ -64,25 +57,22 @@ jobs: df -h - name: Check out Firefox - if: matrix.flavor != 'browser' || github.event.pull_request.draft == true uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 with: repository: mozilla/gecko-dev path: mozilla-unified - name: Install deps (Windows) - if: runner.os == 'Windows' && (matrix.flavor != 'browser' || github.event.pull_request.draft == true) + if: runner.os == 'Windows' run: choco install -y mozillabuild --version 4.0.2 - name: Install Rust - if: matrix.flavor != 'browser' || github.event.pull_request.draft == true uses: ./.github/actions/rust with: version: stable token: ${{ secrets.GITHUB_TOKEN }} - name: Bootstrap Firefox - if: matrix.flavor != 'browser' || github.event.pull_request.draft == true run: | cd mozilla-unified { @@ -98,7 +88,6 @@ jobs: ./mach bootstrap --application-choice browser - name: Plumb in Neqo - if: matrix.flavor != 'browser' || github.event.pull_request.draft == true run: | # Get qlog version used by neqo cargo generate-lockfile @@ -124,7 +113,7 @@ jobs: ./mach vendor rust --ignore-modified - name: Build Firefox - if: matrix.flavor == 'browser' && github.event.pull_request.draft == false + if: matrix.flavor == 'browser' env: NAME: ${{ runner.os == 'macOS' && 'Nightly' || 'bin' }} TYPE: ${{ runner.os == 'macOS' && matrix.type == 'debug' && 'Debug' || '' }} @@ -146,7 +135,7 @@ jobs: ./mach build netwerk - name: Export binary - if: matrix.flavor == 'browser' && github.event.pull_request.draft == false + if: matrix.flavor == 'browser' id: upload uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: @@ -154,11 +143,11 @@ jobs: path: ${{ env.FIREFOX }}.tar compression-level: 9 - - if: matrix.flavor == 'browser' && github.event.pull_request.draft == false + - if: matrix.flavor == 'browser' run: echo "${{ steps.upload.outputs.artifact-url }}" >> artifact - name: Export artifact URL - if: matrix.flavor == 'browser' && github.event.pull_request.draft == false + if: matrix.flavor == 'browser' uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: artifact-${{ runner.os }}-${{ env.FIREFOX }}-${{ matrix.type }}