mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
123 lines
3.3 KiB
YAML
123 lines
3.3 KiB
YAML
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
build-version:
|
|
description: 'The version to build'
|
|
required: true
|
|
type: string
|
|
jobs:
|
|
mac-build:
|
|
name: Build macOS - ${{ matrix.arch }}
|
|
environment: production
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: aarch64
|
|
os: macos-14
|
|
- arch: x64
|
|
os: macos-13
|
|
|
|
steps:
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
token: ${{ secrets.DEPLOY_KEY }}
|
|
|
|
- name: Setup git
|
|
run: |
|
|
git config --global user.email "mauro-balades@users.noreply.github.com"
|
|
git config --global user.name "mauro-balades"
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
brew install cairo sccache gnu-tar mercurial
|
|
sudo pip install setuptools
|
|
|
|
- name: Force usage fo 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 pnpm
|
|
run: npm install -g pnpm
|
|
|
|
- name: Get pnpm store directory
|
|
id: pnpm-cache
|
|
shell: bash
|
|
run: |
|
|
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Load surfer CI setup
|
|
run: pnpm surfer ci --brand alpha --display-version ${{ inputs.build-version }}
|
|
|
|
- name: Download firefox source and dependancies
|
|
run: pnpm surfer download
|
|
|
|
- name: Import
|
|
env:
|
|
SURFER_COMPAT: ${{ matrix.arch == 'x64' }}
|
|
run: |
|
|
pnpm surfer import
|
|
|
|
- name: Bootstrap
|
|
run: |
|
|
cd engine
|
|
./mach --no-interactive bootstrap --application-choice browser
|
|
cd ..
|
|
|
|
- name: build Zen
|
|
env:
|
|
SURFER_COMPAT: ${{ matrix.arch == 'x64' }}
|
|
run: |
|
|
if test "${{ matrix.arch }}" = "x64"; then
|
|
export ZEN_DISABLE_LTO=1
|
|
fi
|
|
sh .github/workflows/src/alpha-build.sh
|
|
|
|
- name: Rebuild Zen if failed
|
|
if: failure()
|
|
run: sh .github/workflows/src/alpha-build.sh
|
|
|
|
- name: Package
|
|
env:
|
|
SURFER_COMPAT: ${{ matrix.arch == 'x64' }}
|
|
run: pnpm package
|
|
|
|
- name: Rename artifacts
|
|
run: |
|
|
mv ./dist/*.dmg "zen.macos-${{ matrix.arch }}.dmg"
|
|
mv ./dist/output.mar macos-${{ matrix.arch }}.mar
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: zen.macos-${{ matrix.arch }}.dmg
|
|
path: ./zen.macos-${{ matrix.arch }}.dmg
|
|
|
|
- name: Upload mar
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos-${{ matrix.arch }}.mar
|
|
path: ./macos-${{ matrix.arch }}.mar
|
|
|
|
- name: Upload update manifests
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos_update_manifest_${{ matrix.arch }}
|
|
path: ./dist/update
|