Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Oct 9, 2024
1 parent 9c4ae7d commit 45e3658
Showing 1 changed file with 11 additions and 22 deletions.
33 changes: 11 additions & 22 deletions .github/workflows/firefox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
{
Expand All @@ -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
Expand All @@ -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' || '' }}
Expand All @@ -146,19 +135,19 @@ 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:
name: ${{ runner.os }}-${{ env.FIREFOX }}-${{ matrix.type }}.tgz
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 }}
Expand Down

0 comments on commit 45e3658

Please sign in to comment.