Skip to content

ci: Build Firefox with current neqo #42

ci: Build Firefox with current neqo

ci: Build Firefox with current neqo #42

Workflow file for this run

name: Firefox
on:
push:
branches: ["main"]
paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"]
pull_request:
branches: ["main"]
paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"]
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
firefox:
name: Build Firefox
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14, windows-latest]
type: [debug, release]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
MOZBUILD_STATE_PATH: ${{ github.workspace }}/mozbuild
CARGO_HOME: ${{ github.workspace }}/cargo
FIREFOX: Firefox
steps:
# We need to check out Neqo first, because the maximize-build-space action
# is vendored in.
- name: Check out Neqo
uses: actions/checkout@v4
- name: Maximize build space
if: runner.os == 'Linux'
uses: ./.github/actions/maximize-build-space
# The previous step blew it away, so we need to check it out again.
- name: Check out Neqo again
if: runner.os == 'Linux'
uses: actions/checkout@v4
- name: Check out Firefox
uses: actions/checkout@v4
with:
repository: mozilla/gecko-dev
path: mozilla-unified
- name: Use sccache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Enable sscache
run: echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
- name: Install deps (Windows)
if: runner.os == 'Windows'
run: choco install -y mozillabuild
- name: Bootstrap Firefox
run: |
cd mozilla-unified
{
echo "mk_add_options MOZ_OBJDIR=../$FIREFOX"
echo "ac_add_options --with-ccache=sccache"
echo "ac_add_options --enable-application=browser"
# Work around https://bugzilla.mozilla.org/show_bug.cgi?id=1894031
[ "${{ matrix.type}}" == "debug" ] || echo "ac_add_options --disable-tests"
echo "ac_add_options --enable-${{ matrix.type }}"
} >> mozconfig
./mach bootstrap --application-choice browser
- name: Plumb in Neqo
run: |
# Get qlog version used by neqo
cargo generate-lockfile
QLOG_VERSION=$(cargo pkgid qlog | cut -d@ -f2)
rm Cargo.lock
cd mozilla-unified
{
echo '[[audits.qlog]]'
echo 'who = "CI"'
echo 'criteria = "safe-to-deploy"'
echo "version = \"$QLOG_VERSION\""
} >> supply-chain/audits.toml
sed -i'' -e "s/qlog =.*/qlog = \"$QLOG_VERSION\"/" netwerk/socket/neqo_glue/Cargo.toml
{
echo '[patch."https://github.com/mozilla/neqo"]'
echo 'neqo-http3 = { path = "../neqo-http3" }'
echo 'neqo-transport = { path = "../neqo-transport" }'
echo 'neqo-common = { path = "../neqo-common" }'
echo 'neqo-qpack = { path = "../neqo-qpack" }'
echo 'neqo-crypto = { path = "../neqo-crypto" }'
} >> Cargo.toml
./mach vendor rust --ignore-modified
- name: Build Firefox
env:
NAME: ${{ runner.os == 'MacOS' && 'Nightly' || 'bin' }}
TYPE: ${{ runner.os == 'MacOS' && matrix.type == 'debug' && 'Debug' || '' }}
EXT: ${{ runner.os == 'MacOS' && '.app' || '' }}
run: |
cd mozilla-unified
./mach build
tar -cf "../$FIREFOX.tar" -C "../$FIREFOX/dist" "$NAME$TYPE$EXT"
- name: Export binary
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}-${{ env.FIREFOX }}-${{ matrix.type }}.tgz
path: ${{ env.FIREFOX }}.tar
compression-level: 9