mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
52
.github/workflows/windows-profile-build.yml
vendored
52
.github/workflows/windows-profile-build.yml
vendored
@@ -1,4 +1,5 @@
|
||||
name: Windows PGO Builds
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
@@ -17,37 +18,44 @@ on:
|
||||
|
||||
jobs:
|
||||
windows-profile-build:
|
||||
name: Windows Profile Build - ${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'arm64' }}
|
||||
name: |
|
||||
Windows Profile Build - ${{ matrix.arch == 'x86_64' && 'generic' ||
|
||||
matrix.arch == 'x86_64-v3' && 'specific' ||
|
||||
matrix.arch == 'aarch64' && 'arm64' }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [x86_64, x86_64-v3, aarch64]
|
||||
|
||||
runs-on: windows-latest
|
||||
# Script edited from https://github.com/Floorp-Projects/Floorp/blob/ESR115/.github/workflows/window-generate-profile-data-and-jarlog.yml
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Node.js and pnpm
|
||||
uses: actions/setup-node@v3
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Setup git
|
||||
- name: Setup Git
|
||||
run: |
|
||||
git config --global user.email "mauro-balades@users.noreply.github.com"
|
||||
git config --global user.name "mauro-balades"
|
||||
- name: Install pnpm
|
||||
|
||||
- name: Setup pnpm
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Install Surfer
|
||||
run: |
|
||||
npm i -g @zen-browser/surfer
|
||||
- uses: actions/download-artifact@v4
|
||||
name: Download artifact
|
||||
run: npm i -g @zen-browser/surfer
|
||||
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: C:\artifact
|
||||
name: ${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'generic' }}-zen-windows-profile-data-and-jarlog.zip
|
||||
name: ${{ matrix.arch == 'x86_64' && 'generic' ||
|
||||
matrix.arch == 'x86_64-v3' && 'specific' ||
|
||||
matrix.arch == 'aarch64' && 'generic' }}-zen-windows-profile-data-and-jarlog.zip
|
||||
|
||||
- name: Unpack artifact
|
||||
run: |
|
||||
@@ -55,11 +63,13 @@ jobs:
|
||||
ls
|
||||
Expand-Archive -Path .\${{ inputs.profile-data-path-archive }} -DestinationPath C:\artifact
|
||||
ls
|
||||
|
||||
- name: Setup
|
||||
run: |
|
||||
(New-Object System.Net.WebClient).DownloadFile("https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe","C:\MozillaBuildSetup-Latest.exe")
|
||||
(New-Object System.Net.WebClient).DownloadFile("https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe", "C:\MozillaBuildSetup-Latest.exe")
|
||||
C:\MozillaBuildSetup-Latest.exe /S | out-null
|
||||
- name: Download firefox
|
||||
|
||||
- name: Download Firefox
|
||||
run: |
|
||||
git config --global core.safecrlf false
|
||||
pnpm surfer download
|
||||
@@ -67,13 +77,13 @@ jobs:
|
||||
- name: Import patches
|
||||
env:
|
||||
SURFER_NO_BRANDING_PATCH: true
|
||||
run: pnpm surfer import
|
||||
run: pnpm surfer import
|
||||
|
||||
- name: Generate
|
||||
run: |
|
||||
ls
|
||||
$Env:USE_MINTTY = "0"
|
||||
$workspace_dir_current = [regex]::replace($env:GITHUB_WORKSPACE, "^([A-Z]):", { "/" + $args.value.Substring(0, 1).toLower() }) -replace "\\","/"
|
||||
$workspace_dir_current = [regex]::replace($env:GITHUB_WORKSPACE, "^([A-Z]):", { "/" + $args.value.Substring(0, 1).toLower() }) -replace "\\", "/"
|
||||
$workspace_dir = $workspace_dir_current + "/engine"
|
||||
echo $workspace_dir
|
||||
echo "cd $workspace_dir" '' >> mozilla-build-run.sh
|
||||
@@ -83,9 +93,9 @@ jobs:
|
||||
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
|
||||
C:\mozilla-build\start-shell.bat $workspace_dir_current\mozilla-build-run.sh
|
||||
|
||||
- name: 🐛 Debug Session
|
||||
- name: Debug session
|
||||
if: ${{ failure() }}
|
||||
uses: Warpbuilds/gha-debug@v1.3
|
||||
uses: WarpBuilds/action-debugger@v1.3
|
||||
timeout-minutes: 15
|
||||
|
||||
- name: Move profile data
|
||||
@@ -95,10 +105,12 @@ jobs:
|
||||
mv engine/merged.profdata merged.profdata
|
||||
mv engine/en-US.log en-US.log
|
||||
|
||||
- name: Publish artifacts
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: |
|
||||
merged.profdata
|
||||
en-US.log
|
||||
name: windows-profdata-${{ matrix.arch == 'x86_64' && 'generic' || matrix.arch == 'x86_64-v3' && 'specific' || matrix.arch == 'aarch64' && 'arm64' }}
|
||||
name: windows-profdata-${{ matrix.arch == 'x86_64' && 'generic' ||
|
||||
matrix.arch == 'x86_64-v3' && 'specific' ||
|
||||
matrix.arch == 'aarch64' && 'arm64' }}
|
||||
|
Reference in New Issue
Block a user