Skip to content

Commit

Permalink
final fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal committed Aug 28, 2024
1 parent 4d67b3d commit 5614b81
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,24 @@ jobs:
with:
key: MyKey-0

- name: Configure and build HelloWorld
- name: Setup directories
working-directory: ${{github.workspace}}/HelloWorld
shell: bash
run: |
mkdir build
cd build
cmake -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache ../
cmake --build .
run: mkdir build

- name: Configure
working-directory: ${{github.workspace}}/HelloWorld/build
shell: bash
run: >
cmake ../
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_C_COMPILER_LAUNCHER=sccache
${{ runner.os == 'Windows' && '-G Ninja' || null }}
- name: Build
working-directory: ${{github.workspace}}/HelloWorld/build
shell: bash
run: cmake --build .

- name: Show and check sccache
shell: bash
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Example usage:
key: MyKey-0
```



Then during the configuration of your build, add sccache as a launcher, eg, for CMake:

```
Expand All @@ -39,3 +37,6 @@ To check the sccache action is behaving as expected, it is possible to add the f
shell: bash
run: sccache --show-stats
```

Please note sccache does not work with Visual Studio Generator on Windows but requires ninja-build in that case:
https://github.com/mozilla/sccache/issues/957

0 comments on commit 5614b81

Please sign in to comment.