switch to sccache

This commit is contained in:
ConfiG 2023-08-01 22:19:23 +03:00
parent 803bfadf2a
commit 0d6e62289f
No known key found for this signature in database
GPG key ID: 44DA1983F524C11B

View file

@ -13,6 +13,9 @@ on:
- '**' # every branch
- '!no-build-**' # unless marked as no-build
env:
SCCACHE_GHA_ENABLED: "true"
jobs:
build:
strategy:
@ -22,7 +25,6 @@ jobs:
- name: "Windows"
os_identifier: "win"
os: windows-latest
prefixes: ''
extra_flags: '-T host=x86 -A win32 -DGEODE_DEBUG=On'
cli_cmd: ''
package_cmd: 'makensis -WX -V3 ./installer/windows/installer.nsi'
@ -31,7 +33,6 @@ jobs:
- name: "macOS"
os_identifier: "mac"
os: macos-latest
prefixes: 'PATH="/usr/local/opt/ccache/libexec:$PATH"'
extra_flags: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DGEODE_DEBUG=On -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13"
cli_cmd: 'chmod +x $GITHUB_WORKSPACE/cli/geode'
package_cmd: './installer/mac/package.sh ./bin/nightly ./installer/mac/geode-installer-mac.pkg'
@ -45,16 +46,14 @@ jobs:
with:
submodules: recursive
- name: Configure sccache
uses: mozilla-actions/sccache-action@v0.0.3
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
if: matrix.config.os_identifier == 'win'
- name: Configure ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.config.os }}
- name: Download CLI
uses: robinraju/release-downloader@v1.5
with:
@ -73,12 +72,12 @@ jobs:
- name: Configure CMake
run: >
${{ matrix.config.prefixes }} cmake -B
cmake -B
${{ github.workspace }}/build
${{ matrix.config.extra_flags }}
-DCLI_PATH="${{ github.workspace }}/cli"
-D CMAKE_C_COMPILER_LAUNCHER=ccache
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
- name: Build
run: |