Skip to content

Commit

Permalink
switch to sccache
Browse files Browse the repository at this point in the history
  • Loading branch information
cgytrus committed Aug 1, 2023
1 parent 803bfad commit 0d6e622
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- '**' # every branch
- '!no-build-**' # unless marked as no-build

env:
SCCACHE_GHA_ENABLED: "true"

jobs:
build:
strategy:
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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:
Expand All @@ -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: |
Expand Down

0 comments on commit 0d6e622

Please sign in to comment.