mirror of
https://github.com/zen-browser/desktop.git
synced 2025-12-24 07:08:52 +00:00
feat: add 'use-sccache' input to build workflows for improved caching options
This commit is contained in:
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@@ -38,6 +38,11 @@ on:
|
||||
required: true
|
||||
default: 'release'
|
||||
type: 'string'
|
||||
use-sccache:
|
||||
description: 'Use sccache'
|
||||
required: true
|
||||
type: 'boolean'
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
debug-inputs:
|
||||
@@ -282,6 +287,7 @@ jobs:
|
||||
contents: write
|
||||
secrets: inherit
|
||||
with:
|
||||
use-sccache: ${{ inputs.use-sccache }}
|
||||
build-version: ${{ needs.build-data.outputs.version }}
|
||||
generate-gpo: true
|
||||
profile-data-path-archive: zen-windows-profile-data-and-jarlog.zip
|
||||
@@ -312,6 +318,7 @@ jobs:
|
||||
generate-gpo: false
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
use-sccache: ${{ inputs.use-sccache }}
|
||||
|
||||
linux:
|
||||
name: Linux build
|
||||
@@ -324,6 +331,7 @@ jobs:
|
||||
build-version: ${{ needs.build-data.outputs.version }}
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
use-sccache: ${{ inputs.use-sccache }}
|
||||
|
||||
mac:
|
||||
name: macOS build
|
||||
@@ -336,6 +344,7 @@ jobs:
|
||||
build-version: ${{ needs.build-data.outputs.version }}
|
||||
release-branch: ${{ inputs.update_branch }}
|
||||
MOZ_BUILD_DATE: ${{needs.buildid.outputs.buildids}}
|
||||
use-sccache: ${{ inputs.use-sccache }}
|
||||
|
||||
mac-uni:
|
||||
name: macOS build (Universal)
|
||||
|
||||
10
.github/workflows/linux-release-build.yml
vendored
10
.github/workflows/linux-release-build.yml
vendored
@@ -15,6 +15,11 @@ on:
|
||||
type: string
|
||||
required: true
|
||||
default: ''
|
||||
use-sccache:
|
||||
description: 'Use sccache'
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
@@ -27,9 +32,9 @@ jobs:
|
||||
matrix:
|
||||
arch: [x86_64, aarch64]
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: 'true'
|
||||
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache }
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTC_WRAPPER: 'sccache'
|
||||
RUSTC_WRAPPER: ${ inputs.use-sccache && 'sccache' || '' }
|
||||
CARGO_INCREMENTAL: 0
|
||||
name: Build Linux - ${{ matrix.arch }}
|
||||
|
||||
@@ -56,6 +61,7 @@ jobs:
|
||||
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@main
|
||||
if: ${{ inputs.use-sccache }}
|
||||
with:
|
||||
disable_annotations: true
|
||||
|
||||
|
||||
10
.github/workflows/macos-release-build.yml
vendored
10
.github/workflows/macos-release-build.yml
vendored
@@ -15,6 +15,11 @@ on:
|
||||
type: string
|
||||
required: true
|
||||
default: ''
|
||||
use-sccache:
|
||||
description: 'Use sccache'
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
mac-build:
|
||||
@@ -26,9 +31,9 @@ jobs:
|
||||
matrix:
|
||||
arch: [x86_64, aarch64]
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: 'true'
|
||||
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache }
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTC_WRAPPER: 'sccache'
|
||||
RUSTC_WRAPPER: ${ inputs.use-sccache && 'sccache' || '' }
|
||||
CARGO_INCREMENTAL: 0
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -44,6 +49,7 @@ jobs:
|
||||
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@main
|
||||
if: ${{ inputs.use-sccache }}
|
||||
with:
|
||||
disable_annotations: true
|
||||
|
||||
|
||||
@@ -10,6 +10,11 @@ on:
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
use-sccache:
|
||||
description: 'Use sccache'
|
||||
required: false
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
twilight-release-schedule:
|
||||
@@ -20,6 +25,7 @@ jobs:
|
||||
with:
|
||||
create_release: ${{ github.event_name != 'workflow_dispatch' && true || inputs.create_release }}
|
||||
update_branch: twilight
|
||||
use-sccache: ${{ github.event_name != 'workflow_dispatch' && false || inputs.use-sccache }}
|
||||
update_version: false
|
||||
|
||||
post-build:
|
||||
|
||||
10
.github/workflows/windows-release-build.yml
vendored
10
.github/workflows/windows-release-build.yml
vendored
@@ -22,6 +22,11 @@ on:
|
||||
type: string
|
||||
required: true
|
||||
default: ''
|
||||
use-sccache:
|
||||
description: 'Use sccache'
|
||||
required: true
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
windows-build:
|
||||
@@ -29,9 +34,9 @@ jobs:
|
||||
# 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' || 'ubuntu-latest' }}
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: 'true'
|
||||
SCCACHE_GHA_ENABLED: ${ inputs.use-sccache }
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTC_WRAPPER: 'sccache'
|
||||
RUSTC_WRAPPER: ${ inputs.use-sccache && 'sccache' || '' }
|
||||
CARGO_INCREMENTAL: 0
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -62,6 +67,7 @@ jobs:
|
||||
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@main
|
||||
if: ${{ inputs.use-sccache }}
|
||||
with:
|
||||
disable_annotations: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user