mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 23:29:41 +02:00
GH Actions: ccache on macOS & Linux; sccache on Windows
Signed-off-by: Be <be@mixxx.org>
This commit is contained in:
parent
9c4fecd913
commit
e2864f5efc
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"
|
||||
|
@ -18,6 +18,7 @@ elif [[ "${OSTYPE}" == darwin* ]]; then # macOS
|
||||
brew_packages=(
|
||||
bash # macOS ships with Bash v3 for licensing reasons so upgrade it now
|
||||
conan
|
||||
ccache
|
||||
)
|
||||
brew install "${brew_packages[@]}"
|
||||
|
||||
@ -41,10 +42,10 @@ else # Linux & others
|
||||
libgtk2.0-dev
|
||||
gettext
|
||||
python3-pip
|
||||
ccache
|
||||
)
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y --no-install-recommends "${apt_packages[@]}"
|
||||
sudo apt-get remove -y ccache
|
||||
else
|
||||
echo >&2 "$0: Error: You don't have a recognized package manager installed."
|
||||
exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user