Skip to content

Commit a273aa0

Browse files
Merge branch 'zen-browser:library' into library
2 parents a67189f + 2c11b92 commit a273aa0

862 files changed

Lines changed: 31856 additions & 4303 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126
permissions:
127127
contents: write
128128
name: Generate build data
129-
runs-on: blacksmith-2vcpu-ubuntu-2404
129+
runs-on: ubuntu-latest
130130
needs: buildid
131131
outputs:
132132
build_date: ${{ steps.data.outputs.builddate }}
@@ -359,7 +359,7 @@ jobs:
359359
name: AppImage build - Linux ${{ matrix.arch }}
360360
permissions:
361361
contents: write
362-
runs-on: blacksmith-2vcpu-ubuntu-2404
362+
runs-on: ubuntu-latest
363363
strategy:
364364
matrix:
365365
arch: [x86_64, aarch64]
@@ -439,7 +439,7 @@ jobs:
439439
path: ./dist/zen-${{ matrix.arch }}.AppImage.zsync
440440

441441
stop-self-hosted:
442-
runs-on: blacksmith-2vcpu-ubuntu-2404
442+
runs-on: ubuntu-latest
443443
needs: [windows-step-3, linux]
444444
if: always()
445445
steps:
@@ -505,10 +505,29 @@ jobs:
505505
run: |
506506
git clone https://github.com/zen-browser/windows-binaries.git .github/workflows/object --depth 1
507507
508+
- name: Sign MAR files
509+
env:
510+
SIGNMAR: ${{ github.workspace }}/linux-bin-x86_64/signmar
511+
ZEN_MAR_SIGNING_PASSWORD: ${{ secrets.ZEN_MAR_SIGNING_PASSWORD }}
512+
ZEN_SIGNING_CERT_PEM_BASE64: ${{ secrets.ZEN_SIGNING_CERT_PEM_BASE64 }}
513+
ZEN_SIGNING_PRIVATE_KEY_PEM_BASE64: ${{ secrets.ZEN_SIGNING_PRIVATE_KEY_PEM_BASE64 }}
514+
run: |
515+
bash scripts/mar_sign.sh -s
516+
517+
- name: Verify MARs and update manifests
518+
env:
519+
SIGNMAR: ${{ github.workspace }}/linux-bin-x86_64/signmar
520+
RELEASE_BRANCH: ${{ inputs.update_branch }}
521+
run: |
522+
bash scripts/mar_verify.sh
523+
508524
- name: Copy update manifests
509525
env:
510526
RELEASE_BRANCH: ${{ inputs.update_branch }}
511527
run: |
528+
# IMPORTANT: If changing any of these names,
529+
# make sure to also update the paths in the mar_sign.sh script
530+
512531
cd updates-server
513532
mkdir -p updates
514533
cp -a ../linux_update_manifest_x86_64/. updates/
@@ -551,8 +570,6 @@ jobs:
551570
./zen-x86_64.AppImage.zsync/*
552571
./zen-aarch64.AppImage/*
553572
./zen-aarch64.AppImage.zsync/*
554-
./zen.win-x86_64.zip/*
555-
./zen.win-arm64.zip/*
556573
./linux.mar/*
557574
./linux-aarch64.mar/*
558575
./windows.mar/*
@@ -590,8 +607,6 @@ jobs:
590607
./zen-x86_64.AppImage.zsync/*
591608
./zen-aarch64.AppImage/*
592609
./zen-aarch64.AppImage.zsync/*
593-
./.github/workflows/object/windows-x64-signed-x86_64/zen.win-x86_64.zip
594-
./.github/workflows/object/windows-x64-signed-arm64/zen.win-arm64.zip
595610
./linux.mar/*
596611
./linux-aarch64.mar/*
597612
./.github/workflows/object/windows-x64-signed-x86_64/windows.mar
@@ -606,7 +621,7 @@ jobs:
606621
permissions: write-all
607622
name: Prepare Flatpak
608623
needs: [release, linux, build-data]
609-
runs-on: blacksmith-2vcpu-ubuntu-2404
624+
runs-on: ubuntu-latest
610625

611626
steps:
612627
- name: Checkout Flatpak repository
@@ -665,7 +680,7 @@ jobs:
665680
permissions: write-all
666681
name: Release Flatpak
667682
needs: [prepare-flatpak, build-data]
668-
runs-on: blacksmith-2vcpu-ubuntu-2404
683+
runs-on: ubuntu-latest
669684

670685
steps:
671686
- name: Checkout Flatpak repository

.github/workflows/issue-metrics.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
echo "last_month_year=$previous_year" >> "$GITHUB_ENV"
4343
4444
- name: Run issue-metrics tool
45-
uses: github/issue-metrics@v2
45+
uses: github-community-projects/issue-metrics@v2
4646
env:
4747
GH_TOKEN: ${{ secrets.DEPLOY_KEY }}
4848
HIDE_AUTHOR: true

.github/workflows/linux-release-build.yml

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
env:
3535
SCCACHE_GHA_ENABLED: ${{ inputs.use-sccache && 'true' || 'false' }}
3636
CARGO_TERM_COLOR: always
37-
RUSTC_WRAPPER: ${{ inputs.use-sccache && 'sccache' || '' }}
3837
CARGO_INCREMENTAL: 0
3938
name: Build Linux - ${{ matrix.arch }}
4039

@@ -104,6 +103,8 @@ jobs:
104103
- name: Import
105104
env:
106105
SURFER_COMPAT: ${{ matrix.arch }}
106+
SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }}
107+
SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }}
107108
run: |
108109
. "$HOME/.cargo/env"
109110
npm run import
@@ -118,15 +119,45 @@ jobs:
118119
./mach --no-interactive bootstrap --application-choice browser
119120
cd ..
120121
121-
- name: Insert API Keys
122+
- name: Build (PGO stage 1 - generate)
123+
if: ${{ matrix.arch == 'x86_64' }}
124+
env:
125+
SURFER_COMPAT: ${{ matrix.arch }}
126+
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
127+
ZEN_GA_GENERATE_PROFILE: 1
128+
ZEN_SAFEBROWSING_API_KEY: ${{ secrets.ZEN_SAFEBROWSING_API_KEY }}
129+
ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }}
130+
ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }}
131+
continue-on-error: true
132+
run: |
133+
export SURFER_PLATFORM="linux"
134+
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
135+
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
136+
fi
137+
bash .github/workflows/src/release-build.sh
138+
139+
- name: Generate PGO profile data
140+
if: ${{ matrix.arch == 'x86_64' }}
122141
run: |
123-
mkdir -p ~/.zen-keys
124-
echo "${{ secrets.ZEN_SAFEBROWSING_API_KEY }}" > ~/.zen-keys/safebrowsing.dat
142+
set -x
143+
export DISPLAY=:2
144+
export LLVM_PROFDATA="$HOME/.mozbuild/clang/bin/llvm-profdata"
145+
export JARLOG_FILE=en-US.log
146+
mkdir -p "$HOME/artifact"
147+
cd engine
148+
./mach python ../scripts/download_pgo_extended_corpus.py
149+
./mach package
150+
./mach python build/pgo/profileserver.py --extended-corpus ./pgo-extended-corpus
151+
mv merged.profdata "$HOME/artifact/merged.profdata"
152+
mv en-US.log "$HOME/artifact/en-US.log"
125153
126154
- name: Build
127155
env:
128156
SURFER_COMPAT: ${{ matrix.arch }}
129157
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
158+
ZEN_SAFEBROWSING_API_KEY: ${{ secrets.ZEN_SAFEBROWSING_API_KEY }}
159+
ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }}
160+
ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }}
130161
continue-on-error: true
131162
run: |
132163
export SURFER_PLATFORM="linux"
@@ -144,10 +175,6 @@ jobs:
144175
export ZEN_RELEASE=1
145176
npm run package
146177
147-
- name: Remove API Keys
148-
run: |
149-
rm -rf ~/.zen-keys
150-
151178
- name: Rename artifacts
152179
run: |
153180
mv dist/zen-*.tar.xz "zen.linux-${{ matrix.arch }}.tar.xz"
@@ -173,3 +200,11 @@ jobs:
173200
retention-days: 5
174201
name: linux_update_manifest_${{ matrix.arch }}
175202
path: ./dist/update
203+
204+
- name: Upload linux bin
205+
if: ${{ matrix.arch == 'x86_64' }}
206+
uses: actions/upload-artifact@v4
207+
with:
208+
retention-days: 2
209+
name: linux-bin-x86_64
210+
path: engine/obj-x86_64-pc-linux-gnu/dist/bin/

.github/workflows/macos-release-build.yml

Lines changed: 41 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ on:
2626
jobs:
2727
mac-build:
2828
name: Build macOS - ${{ matrix.arch }}
29-
runs-on: macos-26
29+
runs-on: ${{ (inputs.release-branch == 'release') && 'blacksmith-6vcpu-macos-latest' || 'macos-26' }}
3030

3131
strategy:
3232
fail-fast: false
@@ -35,7 +35,6 @@ jobs:
3535
env:
3636
SCCACHE_GHA_ENABLED: ${{ inputs.use-sccache && 'true' || 'false' }}
3737
CARGO_TERM_COLOR: always
38-
RUSTC_WRAPPER: ${{ inputs.use-sccache && 'sccache' || '' }}
3938
CARGO_INCREMENTAL: 0
4039
steps:
4140
- name: Checkout repository
@@ -49,6 +48,12 @@ jobs:
4948
with:
5049
node-version-file: ".nvmrc"
5150

51+
- name: Log SDK versions
52+
run: |
53+
ls /Library/Developer/CommandLineTools/SDKs/
54+
xcrun --show-sdk-version
55+
xcrun --show-sdk-path
56+
5257
- name: Run sccache-cache
5358
uses: mozilla-actions/sccache-action@main
5459
if: ${{ inputs.use-sccache }}
@@ -118,7 +123,9 @@ jobs:
118123
- name: Import
119124
env:
120125
SURFER_COMPAT: ${{ matrix.arch }}
121-
run: npm run import -- --verbose
126+
SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }}
127+
SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }}
128+
run: npm run import
122129

123130
- name: Bootstrap
124131
run: |
@@ -132,15 +139,43 @@ jobs:
132139
- name: Build language packs
133140
run: sh scripts/download-language-packs.sh
134141

135-
- name: Insert API Keys
142+
- name: Build Zen (PGO stage 1 - generate)
143+
env:
144+
SURFER_COMPAT: ${{ matrix.arch }}
145+
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
146+
ZEN_GA_GENERATE_PROFILE: 1
147+
ZEN_SAFEBROWSING_API_KEY: ${{ secrets.ZEN_SAFEBROWSING_API_KEY }}
148+
ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }}
149+
ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }}
136150
run: |
137-
mkdir -p ~/.zen-keys
138-
echo "${{ secrets.ZEN_SAFEBROWSING_API_KEY }}" > ~/.zen-keys/safebrowsing.dat
151+
export SURFER_PLATFORM="darwin"
152+
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
153+
export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }}
154+
fi
155+
bash .github/workflows/src/release-build.sh
156+
157+
- name: Generate PGO profile data
158+
env:
159+
SURFER_COMPAT: ${{ matrix.arch }}
160+
run: |
161+
set -x
162+
export LLVM_PROFDATA="$HOME/.mozbuild/clang/bin/llvm-profdata"
163+
export JARLOG_FILE=en-US.log
164+
mkdir -p "$HOME/artifact"
165+
cd engine
166+
./mach python ../scripts/download_pgo_extended_corpus.py
167+
./mach package
168+
./mach python build/pgo/profileserver.py --extended-corpus ./pgo-extended-corpus
169+
mv merged.profdata "$HOME/artifact/merged.profdata"
170+
mv en-US.log "$HOME/artifact/en-US.log"
139171
140172
- name: Build Zen
141173
env:
142174
SURFER_COMPAT: ${{ matrix.arch }}
143175
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
176+
ZEN_SAFEBROWSING_API_KEY: ${{ secrets.ZEN_SAFEBROWSING_API_KEY }}
177+
ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }}
178+
ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }}
144179
run: |
145180
export SURFER_PLATFORM="darwin"
146181
if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then
@@ -157,10 +192,6 @@ jobs:
157192
export ZEN_RELEASE=1
158193
npm run package
159194
160-
- name: Remove API Keys
161-
run: |
162-
rm -rf ~/.zen-keys
163-
164195
- name: Rename artifacts
165196
run: |
166197
echo "Tarballing DMG"

.github/workflows/macos-universal-release-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
9393
env:
9494
SURFER_MOZCONFIG_ONLY: true
9595
ZEN_RELEASE: 1
96+
ZEN_GA_DISABLE_PGO: true
9697
run: |
9798
npm run build
9899
cd engine
@@ -232,6 +233,7 @@ jobs:
232233
- name: Package for mar
233234
env:
234235
JUST_MAR: true
236+
ZEN_GA_DISABLE_PGO: true
235237
run: |
236238
# we don't need it anymore
237239
set -ex

.github/workflows/src/generate_release_notes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fi
3535
if echo "$LATEST_RELEASE" | jq -e '.security != null and .security != ""' > /dev/null; then
3636
echo
3737
echo "## Security"
38-
echo "[Various security fixes]($(echo "$LATEST_RELEASE" | jq -r '.security'))"
38+
echo "$LATEST_RELEASE" | jq -r 'if (.security | type) == "string" then "- " + .security else .security[] | "- " + . end'
3939
fi
4040

4141
if echo "$LATEST_RELEASE" | jq -e '(.features // []) | length > 0' > /dev/null; then

.github/workflows/src/release-build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@ if command -v apt-get &> /dev/null; then
88
sudo apt-get install -y xvfb libnvidia-egl-wayland1 mesa-utils libgl1-mesa-dri
99
fi
1010

11+
mkdir -p ~/.zen-keys
12+
echo "$ZEN_SAFEBROWSING_API_KEY" > ~/.zen-keys/safebrowsing.dat
13+
echo "$ZEN_MOZILLA_API_KEY" > ~/.zen-keys/mozilla.dat
14+
echo "$ZEN_GOOGLE_LOCATION_SERVICE_API_KEY" > ~/.zen-keys/google_location_service.dat
15+
1116
. $HOME/.cargo/env
1217

18+
bash ./scripts/mar_sign.sh -i
19+
1320
ulimit -n 4096
1421

1522
if command -v Xvfb &> /dev/null; then
@@ -28,3 +35,6 @@ else
2835
export ZEN_RELEASE=1
2936
npm run build
3037
fi
38+
39+
echo "Build complete, removing API keys"
40+
rm -rf ~/.zen-keys

.github/workflows/sync-upstream.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ jobs:
103103
fi
104104
echo "version=$VERSION" >> $GITHUB_OUTPUT
105105
106+
- name: Import external patches
107+
if: steps.git-check.outputs.files_changed == 'true'
108+
run: python3 scripts/update_external_patches.py || true
109+
106110
- name: Check if patches got applied
107111
if: steps.git-check.outputs.files_changed == 'true'
108112
id: check-patches
@@ -115,10 +119,6 @@ jobs:
115119
if: steps.git-check.outputs.files_changed == 'true'
116120
run: python3 scripts/import_external_tests.py || true
117121

118-
- name: Import external patches
119-
if: steps.git-check.outputs.files_changed == 'true'
120-
run: python3 scripts/update_external_patches.py || true
121-
122122
- name: Create pull request
123123
uses: peter-evans/create-pull-request@v7
124124
if: steps.git-check.outputs.files_changed == 'true'
@@ -129,7 +129,7 @@ jobs:
129129
token: ${{ secrets.DEPLOY_KEY }}
130130
commit-message: "chore: Sync upstream to `Firefox ${{ steps.build-data.outputs.version }}`"
131131
branch: "chore/upstream-sync"
132-
title: "Sync upstream Firefox to version ${{ steps.build-data.outputs.version }}"
132+
title: "no-bug: Sync upstream Firefox to version ${{ steps.build-data.outputs.version }}"
133133
body: |
134134
This PR syncs the upstream Firefox to version ${{ steps.build-data.outputs.version }}.
135135

.github/workflows/twilight-release-schedule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
create_release: ${{ github.event_name != 'workflow_dispatch' && true || inputs.create_release }}
2222
update_branch: twilight
23-
use-sccache: false
23+
use-sccache: true
2424
update_version: false
2525

2626
post-build:

.github/workflows/windows-profile-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ jobs:
9393
echo "cd $workspace_dir" '' >> mozilla-build-run.sh
9494
echo 'export PATH=/c/mozilla-build/msys2/usr/bin:$PATH' '' >> mozilla-build-run.sh
9595
echo './mach --no-interactive bootstrap --application-choice browser' '' >> mozilla-build-run.sh
96-
echo 'LLVM_PROFDATA=/c/Users/runneradmin/.mozbuild/clang/bin/llvm-profdata.exe JARLOG_FILE=en-US.log ./mach python build/pgo/profileserver.py --binary /c/artifact/zen/zen.exe' '' >> mozilla-build-run.sh
96+
echo './mach python ../scripts/download_pgo_extended_corpus.py' '' >> mozilla-build-run.sh
97+
echo 'LLVM_PROFDATA=/c/Users/runneradmin/.mozbuild/clang/bin/llvm-profdata.exe JARLOG_FILE=en-US.log ./mach python build/pgo/profileserver.py --binary /c/artifact/zen/zen.exe --extended-corpus ./pgo-extended-corpus --' '' >> mozilla-build-run.sh
9798
C:\mozilla-build\start-shell.bat $workspace_dir_current\mozilla-build-run.sh
9899
99100
- name: Move profile data

0 commit comments

Comments
 (0)