mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-17 08:01:12 +02:00
GH Actions: ccache on macOS & Linux; sccache on Windows
Signed-off-by: Be <be@mixxx.org>
This commit is contained in:
26
.github/workflows/cmake_build.yml
vendored
26
.github/workflows/cmake_build.yml
vendored
@@ -35,11 +35,15 @@ jobs:
|
||||
os: ubuntu-18.04
|
||||
arch: x86_64 # as reported by `arch` or `uname -m`
|
||||
generator: Unix Makefiles
|
||||
compiler_cache: ccache
|
||||
compiler_cache_path: ~/.ccache
|
||||
|
||||
- name: macOS_Intel
|
||||
os: macos-latest
|
||||
arch: Intel # as reported by Apple menu > About This Mac
|
||||
generator: Unix Makefiles
|
||||
compiler_cache: ccache
|
||||
compiler_cache_path: ~/Library/Caches/ccache
|
||||
|
||||
- name: Windows_32bit
|
||||
os: windows-latest
|
||||
@@ -48,6 +52,8 @@ jobs:
|
||||
cc: cl
|
||||
cxx: cl
|
||||
generator: Ninja
|
||||
compiler_cache: sccache
|
||||
compiler_cache_path: C:\Users\runneradmin\AppData\Local\Mozilla\sccache\cache
|
||||
|
||||
- name: Windows_64bit
|
||||
os: windows-latest
|
||||
@@ -56,6 +62,8 @@ jobs:
|
||||
cc: cl
|
||||
cxx: cl
|
||||
generator: Ninja
|
||||
compiler_cache: sccache
|
||||
compiler_cache_path: C:\Users\runneradmin\AppData\Local\Mozilla\sccache\cache
|
||||
|
||||
steps:
|
||||
|
||||
@@ -73,7 +81,7 @@ jobs:
|
||||
- name: Install Apple codesigning certificates
|
||||
uses: apple-actions/import-codesign-certs@v1
|
||||
if: startswith( matrix.config.os, 'macos' ) && github.event_name == 'push' && github.repository_owner == 'audacity'
|
||||
with:
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }}
|
||||
p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||
|
||||
@@ -84,6 +92,19 @@ jobs:
|
||||
with:
|
||||
arch: ${{ matrix.config.arch }}
|
||||
|
||||
- name: "[Windows] Install sccache"
|
||||
if: runner.os == 'Windows'
|
||||
run: choco install sccache
|
||||
|
||||
- name: "Set up compiler cache"
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ matrix.config.compiler_cache_path }}
|
||||
key: ${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.head_ref }}-${{ github.run_number }}
|
||||
restore-keys: |
|
||||
${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ github.head_ref }}-
|
||||
${{ matrix.config.os }}-${{ matrix.config.arch }}-
|
||||
|
||||
- name: Cache for .conan
|
||||
id: cache-conan
|
||||
uses: actions/cache@v2
|
||||
@@ -110,6 +131,9 @@ jobs:
|
||||
run: |
|
||||
exec bash "scripts/ci/build.sh"
|
||||
|
||||
- name: "Print compiler cache stats"
|
||||
run: ${{ matrix.config.compiler_cache }} -s
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
exec bash "scripts/ci/install.sh"
|
||||
|
Reference in New Issue
Block a user