mirror of
https://github.com/zen-browser/desktop.git
synced 2026-01-28 23:56:11 +00:00
Update CI workflows to conditionally use optimized runners and adjust LTO settings based on release branch
This commit is contained in:
3
.github/workflows/linux-release-build.yml
vendored
3
.github/workflows/linux-release-build.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
build-linux:
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ inputs.release-branch == 'release' && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -125,6 +125,7 @@ jobs:
|
||||
- name: Build
|
||||
env:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
|
||||
continue-on-error: true
|
||||
run: |
|
||||
export SURFER_PLATFORM="linux"
|
||||
|
||||
12
.github/workflows/macos-release-build.yml
vendored
12
.github/workflows/macos-release-build.yml
vendored
@@ -15,7 +15,7 @@ on:
|
||||
jobs:
|
||||
mac-build:
|
||||
name: Build macOS - ${{ matrix.arch }}
|
||||
runs-on: macos-14
|
||||
runs-on: ${{ inputs.release-branch == 'release' && 'warp-macos-14-arm64-6x' || 'macos-14' }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -115,15 +115,7 @@ jobs:
|
||||
- name: Build Zen
|
||||
env:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
run: |
|
||||
export SURFER_PLATFORM="darwin"
|
||||
if test "${{ matrix.arch }}" = "x86_64"; then
|
||||
export ZEN_DISABLE_LTO=1
|
||||
fi
|
||||
sh .github/workflows/src/release-build.sh
|
||||
|
||||
- name: Rebuild Zen if failed
|
||||
if: failure()
|
||||
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
|
||||
run: |
|
||||
export SURFER_PLATFORM="darwin"
|
||||
sh .github/workflows/src/release-build.sh
|
||||
|
||||
3
.github/workflows/windows-release-build.yml
vendored
3
.github/workflows/windows-release-build.yml
vendored
@@ -22,7 +22,7 @@ on:
|
||||
jobs:
|
||||
windows-build:
|
||||
name: Build Windows - ${{ matrix.arch }}
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ (inputs.release-branch == 'release' && !(inputs.generate-gpo && matrix.arch == 'aarch64')) && 'warp-ubuntu-latest-x64-8x' || 'ubuntu-latest' }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -156,6 +156,7 @@ jobs:
|
||||
if: ${{ !(inputs.generate-gpo && matrix.arch == 'aarch64') }}
|
||||
env:
|
||||
SURFER_COMPAT: ${{ matrix.arch }}
|
||||
ZEN_RELEASE_BRANCH: ${{ inputs.release-branch }}
|
||||
run: |
|
||||
set -x
|
||||
dos2unix configs/windows/mozconfig
|
||||
|
||||
@@ -54,8 +54,14 @@ if test "$ZEN_RELEASE"; then
|
||||
ac_add_options --disable-default-browser-agent
|
||||
|
||||
if ! test "$ZEN_DISABLE_LTO"; then
|
||||
export MOZ_LTO=cross,thin
|
||||
ac_add_options --enable-lto=cross,thin
|
||||
# only enable full LTO when ZEN_RELEASE_BRANCH is 'release'
|
||||
if test "$ZEN_RELEASE_BRANCH" = "release"; then
|
||||
export MOZ_LTO=cross,full
|
||||
ac_add_options --enable-lto=cross,full
|
||||
else
|
||||
export MOZ_LTO=cross,thin
|
||||
ac_add_options --enable-lto=cross,thin
|
||||
fi
|
||||
fi
|
||||
|
||||
ac_add_options --enable-jemalloc
|
||||
|
||||
@@ -16,13 +16,10 @@ if test "$SURFER_COMPAT" = "x86_64"; then
|
||||
ac_add_options MOZ_PGO=1
|
||||
|
||||
# Optimization flags for SURFER_COMPAT
|
||||
ac_add_options --enable-optimize="-O3 -march=x86-64"
|
||||
ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -Qvec -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf"
|
||||
|
||||
export CFLAGS="$CFLAGS -O3 -ffp-contract=fast -march=x86-64"
|
||||
export CPPFLAGS="$CPPFLAGS -O3 -ffp-contract=fast -march=x86-64"
|
||||
export CXXFLAGS="$CXXFLAGS -O3 -flto=thin -ffp-contract=fast -march=x86-64"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-O3 -Wl,-mllvm,-fp-contract=fast -march=x86-64"
|
||||
export RUSTFLAGS="$RUSTFLAGS -C target-cpu=x86-64 -C codegen-units=1 -Clink-args=--icf=safe"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-O3"
|
||||
export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
|
||||
elif test "$SURFER_COMPAT" = "aarch64"; then
|
||||
ac_add_options --target=aarch64-linux-gnu
|
||||
|
||||
@@ -32,7 +29,7 @@ elif test "$SURFER_COMPAT" = "aarch64"; then
|
||||
export CPPFLAGS="$CPPFLAGS -O3"
|
||||
export CXXFLAGS="$CXXFLAGS -O3"
|
||||
export LDFLAGS="$LDFLAGS -Wl,-O3"
|
||||
export RUSTFLAGS="$RUSTFLAGS -C codegen-units=1 -Clink-args=--icf=safe"
|
||||
export RUSTFLAGS="$RUSTFLAGS -Clink-args=--icf=safe"
|
||||
fi
|
||||
|
||||
export VERBOSE=1
|
||||
|
||||
@@ -21,7 +21,7 @@ if test "$SURFER_COMPAT" = "x86_64"; then
|
||||
export CPPFLAGS="-O3 -march=nehalem"
|
||||
export CXXFLAGS="-O3 -march=nehalem"
|
||||
export LDFLAGS="-Wl,-O3 -march=nehalem"
|
||||
export RUSTFLAGS="-Ctarget-cpu=nehalem -C codegen-units=1"
|
||||
export RUSTFLAGS="-Ctarget-cpu=nehalem"
|
||||
else
|
||||
ac_add_options --target=aarch64-apple-darwin
|
||||
|
||||
@@ -34,7 +34,7 @@ else
|
||||
export CPPFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
|
||||
export CXXFLAGS="-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
|
||||
export LDFLAGS="-Wl,-O3 -march=armv8.3-a+simd -mcpu=apple-m1"
|
||||
export RUSTFLAGS="-C target-feature=+v8.3a -C codegen-units=1 -Ctarget-cpu=apple-m1"
|
||||
export RUSTFLAGS="-C target-feature=+v8.3a -Ctarget-cpu=apple-m1"
|
||||
fi
|
||||
|
||||
export VERBOSE=1
|
||||
|
||||
@@ -32,11 +32,8 @@ if test "$SURFER_COMPAT" = "x86_64"; then
|
||||
ac_add_options --target=x86_64-pc-windows-msvc
|
||||
ac_add_options --enable-eme=widevine
|
||||
|
||||
ac_add_options --enable-optimize="-O3 -w -ftree-vectorize"
|
||||
ac_add_options --enable-optimize="-O3 -w -ftree-vectorize -Qvec -mfpmath=sse -mprfchw -msse3 -mcx16 -msahf"
|
||||
|
||||
export CFLAGS="-O3 -Qvec -w"
|
||||
export CPPFLAGS="-O3 -Qvec -w"
|
||||
export CXXFLAGS="-O3 -Qvec -w"
|
||||
export LDFLAGS="-Wl,-O3"
|
||||
export RUSTFLAGS="-Clink-args=--icf=safe"
|
||||
elif test "$SURFER_COMPAT" = "aarch64"; then
|
||||
@@ -49,7 +46,7 @@ elif test "$SURFER_COMPAT" = "aarch64"; then
|
||||
export CPPFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55"
|
||||
export CXXFLAGS="-O2 -march=armv8.2-a+simd -mtune=cortex-a55"
|
||||
export LDFLAGS="-Wl,-O2 -march=armv8.2-a+simd -mtune=cortex-a55"
|
||||
export RUSTFLAGS="-C target-feature=+v8.2a -C codegen-units=1 -Ctarget-cpu=cortex-a55"
|
||||
export RUSTFLAGS="-C target-feature=+v8.2a -Ctarget-cpu=cortex-a55"
|
||||
fi
|
||||
|
||||
#export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine"
|
||||
|
||||
Reference in New Issue
Block a user