mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-17 17:26:48 +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
24
.github/workflows/cmake_build.yml
vendored
24
.github/workflows/cmake_build.yml
vendored
@ -35,11 +35,15 @@ jobs:
|
|||||||
os: ubuntu-18.04
|
os: ubuntu-18.04
|
||||||
arch: x86_64 # as reported by `arch` or `uname -m`
|
arch: x86_64 # as reported by `arch` or `uname -m`
|
||||||
generator: Unix Makefiles
|
generator: Unix Makefiles
|
||||||
|
compiler_cache: ccache
|
||||||
|
compiler_cache_path: ~/.ccache
|
||||||
|
|
||||||
- name: macOS_Intel
|
- name: macOS_Intel
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
arch: Intel # as reported by Apple menu > About This Mac
|
arch: Intel # as reported by Apple menu > About This Mac
|
||||||
generator: Unix Makefiles
|
generator: Unix Makefiles
|
||||||
|
compiler_cache: ccache
|
||||||
|
compiler_cache_path: ~/Library/Caches/ccache
|
||||||
|
|
||||||
- name: Windows_32bit
|
- name: Windows_32bit
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
@ -48,6 +52,8 @@ jobs:
|
|||||||
cc: cl
|
cc: cl
|
||||||
cxx: cl
|
cxx: cl
|
||||||
generator: Ninja
|
generator: Ninja
|
||||||
|
compiler_cache: sccache
|
||||||
|
compiler_cache_path: C:\Users\runneradmin\AppData\Local\Mozilla\sccache\cache
|
||||||
|
|
||||||
- name: Windows_64bit
|
- name: Windows_64bit
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
@ -56,6 +62,8 @@ jobs:
|
|||||||
cc: cl
|
cc: cl
|
||||||
cxx: cl
|
cxx: cl
|
||||||
generator: Ninja
|
generator: Ninja
|
||||||
|
compiler_cache: sccache
|
||||||
|
compiler_cache_path: C:\Users\runneradmin\AppData\Local\Mozilla\sccache\cache
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
@ -84,6 +92,19 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
arch: ${{ matrix.config.arch }}
|
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
|
- name: Cache for .conan
|
||||||
id: cache-conan
|
id: cache-conan
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@ -110,6 +131,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
exec bash "scripts/ci/build.sh"
|
exec bash "scripts/ci/build.sh"
|
||||||
|
|
||||||
|
- name: "Print compiler cache stats"
|
||||||
|
run: ${{ matrix.config.compiler_cache }} -s
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
run: |
|
||||||
exec bash "scripts/ci/install.sh"
|
exec bash "scripts/ci/install.sh"
|
||||||
|
@ -18,6 +18,7 @@ elif [[ "${OSTYPE}" == darwin* ]]; then # macOS
|
|||||||
brew_packages=(
|
brew_packages=(
|
||||||
bash # macOS ships with Bash v3 for licensing reasons so upgrade it now
|
bash # macOS ships with Bash v3 for licensing reasons so upgrade it now
|
||||||
conan
|
conan
|
||||||
|
ccache
|
||||||
)
|
)
|
||||||
brew install "${brew_packages[@]}"
|
brew install "${brew_packages[@]}"
|
||||||
|
|
||||||
@ -41,10 +42,10 @@ else # Linux & others
|
|||||||
libgtk2.0-dev
|
libgtk2.0-dev
|
||||||
gettext
|
gettext
|
||||||
python3-pip
|
python3-pip
|
||||||
|
ccache
|
||||||
)
|
)
|
||||||
sudo apt-get update -y
|
sudo apt-get update -y
|
||||||
sudo apt-get install -y --no-install-recommends "${apt_packages[@]}"
|
sudo apt-get install -y --no-install-recommends "${apt_packages[@]}"
|
||||||
sudo apt-get remove -y ccache
|
|
||||||
else
|
else
|
||||||
echo >&2 "$0: Error: You don't have a recognized package manager installed."
|
echo >&2 "$0: Error: You don't have a recognized package manager installed."
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user