diff --git a/.gitattributes b/.gitattributes index 42b01886c..683555503 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,4 +5,4 @@ *.patch linguist-language=C++ *.d.ts linguist-language=TypeScript -src/zen/tests/*.js linguist-language=Test +src/zen/tests/** linguist-language=C++ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 095a91134..5cd9cd53a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -287,7 +287,7 @@ jobs: with: use-sccache: ${{ inputs.use-sccache }} build-version: ${{ needs.build-data.outputs.version }} - generate-gpo: true + generate-pgo: true profile-data-path-archive: zen-windows-profile-data-and-jarlog.zip release-branch: ${{ inputs.update_branch }} MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}} @@ -313,7 +313,7 @@ jobs: needs: [build-data, windows-step-2, start-self-host, buildid] with: build-version: ${{ needs.build-data.outputs.version }} - generate-gpo: false + generate-pgo: false release-branch: ${{ inputs.update_branch }} MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}} use-sccache: ${{ inputs.use-sccache }} @@ -331,15 +331,41 @@ jobs: MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}} use-sccache: ${{ inputs.use-sccache }} - mac: - name: macOS build + mac-step-1: + name: macOS build step 1 (PGO build) + uses: ./.github/workflows/macos-release-build.yml + needs: [build-data, buildid] + permissions: + contents: write + secrets: inherit + with: + use-sccache: ${{ inputs.use-sccache }} + build-version: ${{ needs.build-data.outputs.version }} + generate-pgo: true + release-branch: ${{ inputs.update_branch }} + MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}} + + mac-step-2: + name: macOS build step 2 (Generate profile data) + uses: ./.github/workflows/macos-profile-build.yml + permissions: + contents: write + secrets: inherit + needs: [mac-step-1, build-data] + with: + build-version: ${{ needs.build-data.outputs.version }} + release-branch: ${{ inputs.update_branch }} + + mac-step-3: + name: macOS build step 3 (build with profile data) uses: ./.github/workflows/macos-release-build.yml permissions: contents: write secrets: inherit - needs: [build-data, buildid] + needs: [build-data, mac-step-2, start-self-host, buildid] with: build-version: ${{ needs.build-data.outputs.version }} + generate-pgo: false release-branch: ${{ inputs.update_branch }} MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}} use-sccache: ${{ inputs.use-sccache }} @@ -350,7 +376,7 @@ jobs: permissions: contents: write secrets: inherit - needs: [build-data, mac] + needs: [build-data, mac-step-3] with: build-version: ${{ needs.build-data.outputs.version }} release-branch: ${{ inputs.update_branch }} diff --git a/.github/workflows/linux-release-build.yml b/.github/workflows/linux-release-build.yml index 5e5a32bff..baaea9dbf 100644 --- a/.github/workflows/linux-release-build.yml +++ b/.github/workflows/linux-release-build.yml @@ -105,6 +105,8 @@ jobs: SURFER_COMPAT: ${{ matrix.arch }} SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }} SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }} + SURFER_CERT_PATCH_NAME_PREV: ${{ secrets.SURFER_CERT_PATCH_NAME_PREV }} + SURFER_CERT_PATCH_ISSUER_PREV: ${{ secrets.SURFER_CERT_PATCH_ISSUER_PREV }} run: | . "$HOME/.cargo/env" npm run import diff --git a/.github/workflows/macos-profile-build.yml b/.github/workflows/macos-profile-build.yml new file mode 100644 index 000000000..43aa552b2 --- /dev/null +++ b/.github/workflows/macos-profile-build.yml @@ -0,0 +1,111 @@ +name: macOS PGO Builds + +permissions: + contents: read + +on: + workflow_call: + inputs: + build-version: + description: "The version to build" + required: true + type: string + release-branch: + description: "The branch to build" + required: true + type: string + +jobs: + macos-profile-build: + name: | + macOS Profile Build - ${{ matrix.arch }} + strategy: + fail-fast: false + matrix: + arch: [x86_64, aarch64] + + runs-on: ${{ matrix.arch == 'x86_64' && 'macos-15-intel' || 'macos-26' }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - name: Setup Python + uses: actions/setup-python@v5 + + - name: Setup Git + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + + - name: Setup Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(cat .rust-toolchain) + + - name: Install dependencies + run: npm ci + + - name: Load Surfer CI setup + run: npm run surfer -- ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }} + + - name: Download instrumented app + uses: actions/download-artifact@v4 + with: + path: ~/instrumented + name: macos-pgo-stage1-${{ matrix.arch }} + + - name: Download Firefox and dependencies + run: npm run download + + - name: Import patches + env: + SURFER_NO_BRANDING_PATCH: true + run: | + . "$HOME/.cargo/env" + npm run import + + - name: Bootstrap + run: | + cd engine + export SURFER_PLATFORM="darwin" + ./mach --no-interactive bootstrap --application-choice browser --exclude macos-sdk || true + + - name: Extract instrumented app + run: | + set -ex + cd engine + ./mach python -m mozbuild.action.unpack_dmg \ + "$HOME/instrumented/zen-macos-pgo-stage1-${{ matrix.arch }}.dmg" \ + "$HOME/instrumented/app" + APP=$(find "$HOME/instrumented/app" -maxdepth 1 -name "*.app" -type d | head -1) + codesign --force --deep --sign - "$APP" || true + + - name: Generate profile data + run: | + set -ex + export LLVM_PROFDATA="$HOME/.mozbuild/clang/bin/llvm-profdata" + export JARLOG_FILE=en-US.log + BINARY=$(find "$HOME/instrumented" -type f -path "*/Contents/MacOS/zen" | head -1) + test -n "$BINARY" + cd engine + ./mach python ../scripts/download_pgo_extended_corpus.py + ./mach python build/pgo/profileserver.py --binary "$BINARY" --extended-corpus ./pgo-extended-corpus + + - name: Move profile data + run: | + mv engine/merged.profdata merged.profdata + mv engine/en-US.log en-US.log + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + retention-days: 1 + path: | + merged.profdata + en-US.log + name: macos-profdata-${{ matrix.arch }} diff --git a/.github/workflows/macos-release-build.yml b/.github/workflows/macos-release-build.yml index b3395f0f1..0423c566e 100644 --- a/.github/workflows/macos-release-build.yml +++ b/.github/workflows/macos-release-build.yml @@ -1,10 +1,15 @@ name: macOS Release Build + permissions: contents: read on: workflow_call: inputs: + generate-pgo: + required: true + type: boolean + default: false build-version: description: "The version to build" required: true @@ -26,17 +31,22 @@ on: jobs: mac-build: name: Build macOS - ${{ matrix.arch }} - runs-on: ${{ (inputs.release-branch == 'release') && 'blacksmith-6vcpu-macos-latest' || 'macos-26' }} - - strategy: - fail-fast: false - matrix: - arch: [x86_64, aarch64] + runs-on: 'blacksmith-8vcpu-ubuntu-2404' env: SCCACHE_GHA_ENABLED: ${{ inputs.use-sccache && 'true' || 'false' }} CARGO_TERM_COLOR: always CARGO_INCREMENTAL: 0 + strategy: + fail-fast: false + matrix: + arch: [x86_64, aarch64] + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + - name: Checkout repository uses: actions/checkout@v4 with: @@ -44,16 +54,10 @@ jobs: token: ${{ secrets.DEPLOY_KEY }} - name: Setup Node.js - uses: actions/setup-node@v4 + uses: useblacksmith/setup-node@v5 with: node-version-file: ".nvmrc" - - name: Log SDK versions - run: | - ls /Library/Developer/CommandLineTools/SDKs/ - xcrun --show-sdk-version - xcrun --show-sdk-path - - name: Run sccache-cache uses: mozilla-actions/sccache-action@main if: ${{ inputs.use-sccache }} @@ -67,157 +71,158 @@ jobs: core.exportVariable('ACTIONS_CACHE_URL', process.env['ACTIONS_CACHE_URL']) core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']) - - name: Setup Python - uses: actions/setup-python@v5 - # note: This will use the version defined in '.python-version' by default - - name: Setup Git run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - - name: Install system dependencies + - name: Install dependencies run: | - brew update - brew install cairo gnu-tar mercurial - sudo pip install setuptools + npm ci + sudo apt-get update + sudo apt-get install -y python3 python3-pip zstd yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb --fix-missing - brew uninstall --ignore-dependencies python3.12 -f + - name: Load Surfer CI setup + run: npm run surfer -- ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }} - export PATH="$(python3 -m site --user-base)/bin":$PATH - python3 -m pip install --user mercurial + - name: Download Firefox and dependencies + run: npm run download - rm '/usr/local/bin/2to3-3.11' '/usr/local/bin/2to3-3.12' '/usr/local/bin/2to3' - rm '/usr/local/bin/idle3.11' '/usr/local/bin/idle3.12' '/usr/local/bin/idle3' - rm '/usr/local/bin/pydoc3.11' '/usr/local/bin/pydoc3.12' '/usr/local/bin/pydoc3' - rm '/usr/local/bin/python3.11' '/usr/local/bin/python3.12' '/usr/local/bin/python3' - rm '/usr/local/bin/python3.11-config' '/usr/local/bin/python3.12-config' '/usr/local/bin/python3-config' + - name: mac-cross Cache + env: + SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5 + id: cache-mac-cross + uses: useblacksmith/cache@v5 + with: + path: ${HOME}/mac-cross + key: mac-cross - brew install watchman + - name: Setup for macOS (cctools and DMG tools) + if: steps.cache-mac-cross.outputs.cache-hit != 'true' + run: | + set -ex + mkdir -p ~/mac-cross + cd engine/ + ./mach artifact toolchain --from-build linux64-cctools-port linux64-libdmg linux64-hfsplus + mv cctools dmg hfsplus ~/mac-cross/ + ls ~/mac-cross/cctools/bin/x86_64-apple-darwin-ld ~/mac-cross/cctools/bin/aarch64-apple-darwin-ld ~/mac-cross/dmg/dmg ~/mac-cross/hfsplus/newfs_hfs + - name: Setup Rust + run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(cat .rust-toolchain) source $HOME/.cargo/env - if test "${{ matrix.arch }}" = "aarch64"; then rustup target add aarch64-apple-darwin else rustup target add x86_64-apple-darwin fi - - name: Force usage of gnu-tar - run: | - echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bash_profile - echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.zsh - source ~/.bash_profile - - - name: Install dependencies - run: | - npm ci - - - name: Load surfer CI setup - run: npm run surfer -- ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }} - - - name: Download Firefox source and dependencies - run: npm run download - - name: Import env: SURFER_COMPAT: ${{ matrix.arch }} SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }} SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }} - run: npm run import + SURFER_CERT_PATCH_NAME_PREV: ${{ secrets.SURFER_CERT_PATCH_NAME_PREV }} + SURFER_CERT_PATCH_ISSUER_PREV: ${{ secrets.SURFER_CERT_PATCH_ISSUER_PREV }} + SURFER_PLATFORM: darwin + run: | + . "$HOME/.cargo/env" + npm run import -- --verbose - name: Bootstrap run: | - cd engine + set -x export SURFER_PLATFORM="darwin" - export PATH="$(python3 -m site --user-base)/bin":$PATH - # Always exist with 0, even if bootstrap fails - ./mach --no-interactive bootstrap --application-choice browser --exclude macos-sdk || true - cd .. + npm run bootstrap - name: Build language packs run: sh scripts/download-language-packs.sh - - name: Build Zen (PGO stage 1 - generate) + - name: Download artifact (if use profdata) + uses: actions/download-artifact@v4 + if: ${{ !inputs.generate-pgo }} + with: + path: ~/artifact + name: macos-profdata-${{ matrix.arch }} + + - name: Show artifact info + if: ${{ !inputs.generate-pgo }} + run: | + ls ~/artifact + ls ~/artifact/en-US.log + ls ~/artifact/merged.profdata + + - name: Build env: SURFER_COMPAT: ${{ matrix.arch }} ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }} - ZEN_GA_GENERATE_PROFILE: 1 ZEN_SAFEBROWSING_API_KEY: ${{ secrets.ZEN_SAFEBROWSING_API_KEY }} ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }} ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }} - run: | - export SURFER_PLATFORM="darwin" - if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then - export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }} - fi - bash .github/workflows/src/release-build.sh - - - name: Generate PGO profile data - env: - SURFER_COMPAT: ${{ matrix.arch }} run: | set -x - export LLVM_PROFDATA="$HOME/.mozbuild/clang/bin/llvm-profdata" - export JARLOG_FILE=en-US.log - mkdir -p "$HOME/artifact" - cd engine - ./mach python ../scripts/download_pgo_extended_corpus.py - ./mach package - ./mach python build/pgo/profileserver.py --extended-corpus ./pgo-extended-corpus - mv merged.profdata "$HOME/artifact/merged.profdata" - mv en-US.log "$HOME/artifact/en-US.log" - - - name: Build Zen - env: - SURFER_COMPAT: ${{ matrix.arch }} - ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }} - ZEN_SAFEBROWSING_API_KEY: ${{ secrets.ZEN_SAFEBROWSING_API_KEY }} - ZEN_MOZILLA_API_KEY: ${{ secrets.ZEN_MOZILLA_API_KEY }} - ZEN_GOOGLE_LOCATION_SERVICE_API_KEY: ${{ secrets.ZEN_GOOGLE_LOCATION_SERVICE_API_KEY }} - run: | export SURFER_PLATFORM="darwin" + export ZEN_CROSS_COMPILING=1 + if test ${{ inputs.generate-pgo }} = true; then + export ZEN_GA_GENERATE_PROFILE=1 + fi if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then export MOZ_BUILD_DATE=${{ inputs.MOZ_BUILD_DATE }} fi bash .github/workflows/src/release-build.sh + - name: Package instrumented app (PGO stage 1) + if: ${{ inputs.generate-pgo }} + env: + SURFER_COMPAT: ${{ matrix.arch }} + ZEN_RELEASE: 1 + SURFER_PLATFORM: darwin + ZEN_CROSS_COMPILING: 1 + ZEN_GA_GENERATE_PROFILE: 1 + run: | + set -ex + cd engine + ./mach package + mv obj-${{ matrix.arch }}-apple-darwin/dist/*.dmg "$GITHUB_WORKSPACE/zen-macos-pgo-stage1-${{ matrix.arch }}.dmg" + + - name: Upload artifact (PGO stage 1) + uses: actions/upload-artifact@v4 + if: ${{ inputs.generate-pgo }} + with: + retention-days: 2 + name: macos-pgo-stage1-${{ matrix.arch }} + path: ./zen-macos-pgo-stage1-${{ matrix.arch }}.dmg + - name: Package + if: ${{ !inputs.generate-pgo }} env: SURFER_COMPAT: ${{ matrix.arch }} ZEN_GA_DISABLE_PGO: true run: | + set -x export SURFER_PLATFORM="darwin" + export ZEN_CROSS_COMPILING=1 export ZEN_RELEASE=1 npm run package - name: Rename artifacts + if: ${{ !inputs.generate-pgo }} run: | - echo "Tarballing DMG" set -ex mv ./dist/*.dmg ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg - mv ./engine/obj-${{ matrix.arch }}-apple-darwin/dist/host/bin/mar ./zen-macos-host-mar mv ./engine/obj-${{ matrix.arch }}-apple-darwin/dist/bin/platform.ini ./platform.ini - name: Upload dist dmg uses: actions/upload-artifact@v4 + if: ${{ !inputs.generate-pgo }} with: retention-days: 1 name: zen-${{ matrix.arch }}-apple-darwin-dist.dmg path: ./zen-${{ matrix.arch }}-apple-darwin-dist.dmg - - name: Upload host mar - uses: actions/upload-artifact@v4 - if: matrix.arch == 'aarch64' - with: - retention-days: 1 - name: zen-macos-host-mar - path: ./zen-macos-host-mar - - name: Upload platform.ini uses: actions/upload-artifact@v4 - if: matrix.arch == 'x86_64' + if: ${{ !inputs.generate-pgo && matrix.arch == 'x86_64' }} with: retention-days: 1 name: platform.ini diff --git a/.github/workflows/macos-universal-release-build.yml b/.github/workflows/macos-universal-release-build.yml index 762a92a6d..101d39738 100644 --- a/.github/workflows/macos-universal-release-build.yml +++ b/.github/workflows/macos-universal-release-build.yml @@ -99,6 +99,16 @@ jobs: cd engine ./mach configure + - name: Build host mar tool + run: | + set -ex + cd engine + echo "ac_add_options --enable-project=tools/update-packaging" > mar-mozconfig + echo "mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-mar-tools" >> mar-mozconfig + MOZCONFIG=$PWD/mar-mozconfig ./mach build -v + cp obj-mar-tools/dist/host/bin/mar ../zen-macos-host-mar + rm -rf obj-mar-tools mar-mozconfig + - name: Download x86_64 DMG from artifacts uses: actions/download-artifact@v4 with: @@ -213,11 +223,6 @@ jobs: --wait xcrun stapler staple "zen.macos-universal.dmg" - - name: Download host mar - uses: actions/download-artifact@v4 - with: - name: zen-macos-host-mar - - name: Upload build artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/windows-release-build.yml b/.github/workflows/windows-release-build.yml index 56bd977a0..e27d50589 100644 --- a/.github/workflows/windows-release-build.yml +++ b/.github/workflows/windows-release-build.yml @@ -6,7 +6,7 @@ permissions: on: workflow_call: inputs: - generate-gpo: + generate-pgo: required: true type: boolean default: false @@ -35,7 +35,7 @@ jobs: windows-build: name: Build Windows - ${{ matrix.arch }} # aarch64 does not need full 16x, and we also dont use full LTO when generating GPO - runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-gpo && matrix.arch == 'x86_64') && 'self-hosted' || 'blacksmith-8vcpu-ubuntu-2404' }} + runs-on: ${{ (inputs.release-branch == 'release' && !inputs.generate-pgo && matrix.arch == 'x86_64') && 'self-hosted' || 'blacksmith-8vcpu-ubuntu-2404' }} env: SCCACHE_GHA_ENABLED: ${{ inputs.use-sccache && 'true' || 'false' }} CARGO_TERM_COLOR: always @@ -48,7 +48,7 @@ jobs: steps: - name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main - if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} + if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} with: tool-cache: false @@ -91,7 +91,7 @@ jobs: run: npm run surfer -- ci --brand ${{ inputs.release-branch }} --display-version ${{ inputs.build-version }} - name: Download Firefox and dependencies - if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} + if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} run: npm run download - name: win-cross Cache @@ -104,7 +104,7 @@ jobs: key: win-cross - name: Setup for Windows - if: steps.cache-win-cross.outputs.cache-hit != 'true' && !(inputs.generate-gpo && matrix.arch == 'aarch64') + if: steps.cache-win-cross.outputs.cache-hit != 'true' && !(inputs.generate-pgo && matrix.arch == 'aarch64') run: | set -x mkdir -p ~/win-cross @@ -154,24 +154,26 @@ jobs: zlib1g-dev \ aria2 echo Setup wine - aria2c "https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/dQz_aHy8Rl-Lt0xf2WlrMw/artifacts/public/build/wine.tar.zst" -o wine.tar.zst + aria2c "https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/gecko.cache.level-3.toolchains.v3.linux64-wine.latest/artifacts/public/build/wine.tar.zst" -o wine.tar.zst tar --zstd -xf wine.tar.zst -C ~/win-cross rm wine.tar.zst echo Setup Visual Studio ./mach python --virtualenv build taskcluster/scripts/misc/get_vs.py build/vs/vs2026.yaml ~/win-cross/vs2026 - name: Import - if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} + if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} env: SURFER_COMPAT: ${{ matrix.arch }} SURFER_CERT_PATCH_ISSUER: ${{ secrets.SURFER_CERT_PATCH_ISSUER }} SURFER_CERT_PATCH_NAME: ${{ secrets.SURFER_CERT_PATCH_NAME }} + SURFER_CERT_PATCH_NAME_PREV: ${{ secrets.SURFER_CERT_PATCH_NAME_PREV }} + SURFER_CERT_PATCH_ISSUER_PREV: ${{ secrets.SURFER_CERT_PATCH_ISSUER_PREV }} run: | . "$HOME/.cargo/env" npm run import -- --verbose - name: Bootstrap - if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} + if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} run: | set -x cd engine/ @@ -189,7 +191,7 @@ jobs: ls ~/win-cross/vs2026 || true - name: Setup Rust - if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} + if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(cat .rust-toolchain) source $HOME/.cargo/env @@ -208,18 +210,18 @@ jobs: echo "export MOZ_WINDOWS_RS_DIR=$(pwd)/windows-$WINDOWS_RS_VERSION" >> ../configs/common/mozconfig - name: Build language packs - if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} + if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} run: sh scripts/download-language-packs.sh - name: Download artifact (if use profdata) uses: actions/download-artifact@v4 - if: ${{ !inputs.generate-gpo && matrix.arch == 'x86_64' }} + if: ${{ !inputs.generate-pgo && matrix.arch == 'x86_64' }} with: path: ~/artifact name: windows-profdata-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }} - name: Show artifact info - if: ${{ !inputs.generate-gpo && matrix.arch == 'x86_64' }} + if: ${{ !inputs.generate-pgo && matrix.arch == 'x86_64' }} run: | ls ~/artifact ls ~/artifact/en-US.log @@ -228,7 +230,7 @@ jobs: chmod +x ~/artifact/merged.profdata - name: Build - if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} + if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} env: SURFER_COMPAT: ${{ matrix.arch }} ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }} @@ -241,7 +243,7 @@ jobs: dos2unix configs/windows/mozconfig export SURFER_PLATFORM="win32" export ZEN_CROSS_COMPILING=1 - if test ${{ inputs.generate-gpo }} = true; then + if test ${{ inputs.generate-pgo }} = true; then export ZEN_GA_GENERATE_PROFILE=1 fi if [[ -n ${{ inputs.MOZ_BUILD_DATE }} ]];then @@ -250,7 +252,7 @@ jobs: bash .github/workflows/src/release-build.sh - name: Package - if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }} + if: ${{ !(inputs.generate-pgo && matrix.arch == 'aarch64') }} env: SURFER_COMPAT: ${{ matrix.arch }} ZEN_GA_DISABLE_PGO: true @@ -265,13 +267,13 @@ jobs: ls . - name: Move package for PGO upload - if: ${{ inputs.generate-gpo && matrix.arch == 'x86_64' }} + if: ${{ inputs.generate-pgo && matrix.arch == 'x86_64' }} run: | set -x mv ./zen.win64.zip ./zen.win64-pgo-stage-1.zip - name: Rename artifacts - if: ${{ !inputs.generate-gpo }} + if: ${{ !inputs.generate-pgo }} run: | mv ./zen.win64.zip zen.win-${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}.zip mv ./dist/output.mar windows${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.mar @@ -279,14 +281,14 @@ jobs: - name: Upload artifact (PGO) uses: actions/upload-artifact@v4 - if: ${{ inputs.generate-gpo && matrix.arch == 'x86_64' }} + if: ${{ inputs.generate-pgo && matrix.arch == 'x86_64' }} with: retention-days: 2 name: ${{ matrix.arch == 'aarch64' && 'arm64' || matrix.arch }}-${{ inputs.profile-data-path-archive }} path: ./zen.win64-pgo-stage-1.zip - name: Remove unnecessary files from obj - if: ${{ !inputs.generate-gpo }} + if: ${{ !inputs.generate-pgo }} run: | set -x mkdir obj-${{ matrix.arch }}-pc-windows-msvc/ @@ -301,7 +303,7 @@ jobs: cp -r --no-dereference engine/obj-${{ matrix.arch }}-pc-windows-msvc/* obj-${{ matrix.arch }}-pc-windows-msvc/ || true - name: Upload dist object - if: ${{ !inputs.generate-gpo }} + if: ${{ !inputs.generate-pgo }} uses: actions/upload-artifact@v4 with: retention-days: 2 @@ -309,7 +311,7 @@ jobs: path: obj-${{ matrix.arch }}-pc-windows-msvc - name: Upload artifact (if Twilight branch, installer) - if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }} + if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-pgo }} uses: actions/upload-artifact@v4 with: retention-days: 5 @@ -317,7 +319,7 @@ jobs: path: ./zen.installer${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.exe - name: Upload artifact (if Twilight branch, .mar) - if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }} + if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-pgo }} uses: actions/upload-artifact@v4 with: retention-days: 5 @@ -325,7 +327,7 @@ jobs: path: ./windows${{ matrix.arch == 'aarch64' && '-arm64' || '' }}.mar - name: Upload artifact (if Twilight branch, update manifests) - if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-gpo }} + if: ${{ inputs.release-branch == 'twilight' && !inputs.generate-pgo }} uses: actions/upload-artifact@v4 with: retention-days: 5 diff --git a/README.md b/README.md index f3252b7ba..434e58315 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,8 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne ### Firefox Versions -- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `153.0.3`! 🚀 -- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 153.0.3`! +- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `154.0.1`! +- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 154.0.1`! ### Contributing diff --git a/build/firefox-cache/l10n-last-commit-hash b/build/firefox-cache/l10n-last-commit-hash index 18180d8e5..2dbfec531 100644 --- a/build/firefox-cache/l10n-last-commit-hash +++ b/build/firefox-cache/l10n-last-commit-hash @@ -1 +1 @@ -8a0a534248f80d8c53a8997f24683521c3a50ebc \ No newline at end of file +bf4b57fd7fe94054457be7018e8e7beaf754c520 \ No newline at end of file diff --git a/build/windows/sign.ps1 b/build/windows/sign.ps1 index 83f2ff040..4e0f345da 100644 --- a/build/windows/sign.ps1 +++ b/build/windows/sign.ps1 @@ -3,8 +3,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. param( - [string][Parameter(Mandatory=$true)]$SignIdentity, - [string][Parameter(Mandatory=$true)]$SignIdentityIssuer, [string][Parameter(Mandatory=$true)]$GithubRunId ) @@ -24,11 +22,15 @@ mkdir windsign-temp -ErrorAction SilentlyContinue # echo "Downloaded git objects repo to" #} -Verbose -ArgumentList $PWD -Debug +$token = gh auth token + $env:SURFER_MOZCONFIG_ONLY="1" $env:SURFER_SIGNING_MODE="" -$env:SURFER_CERT_PATCH_ISSUER=$SignIdentityIssuer -$env:SURFER_CERT_PATCH_NAME=$SignIdentity +get-content "$PSScriptRoot/../.env" | foreach { + $name, $value = $_.split('=') + set-content env:\$name $value +} Start-Job -Name "DownloadGitl10n" -ScriptBlock { param($PWD) @@ -46,7 +48,6 @@ npm run build echo "Downloading artifacts info" $artifactsInfo=gh api repos/zen-browser/desktop/actions/runs/$GithubRunId/artifacts -$token = gh auth token function New-TemporaryDirectory { $tmp = [System.IO.Path]::GetTempPath() # Not $env:TEMP, see https://stackoverflow.com/a/946017 @@ -215,20 +216,12 @@ SignAndPackage x86_64 $files = Get-ChildItem .\windsign-temp\windows-x64-signed-x86_64, .\windsign-temp\windows-x64-signed-arm64 -Recurse -Include *.exe signtool.exe sign /n "$SignIdentity" /t http://time.certum.pl/ /fd sha256 /v $files -# Compress each signed bundle into a single gzip tarball (`-C