mirror of
https://github.com/Mozilla-Actions/sccache-action.git
synced 2026-04-08 17:42:13 +08:00
Document how to use sccache action for C/C++ (#28)
This commit is contained in:
24
README.md
24
README.md
@@ -49,6 +49,30 @@ For Rust code, the following environment variables should be set:
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
```
|
||||
|
||||
### C/C++ code
|
||||
|
||||
For C/C++ code, the following environment variables should be set:
|
||||
|
||||
```
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
```
|
||||
|
||||
With cmake, add the following argument:
|
||||
|
||||
```
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=sccache
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
|
||||
```
|
||||
|
||||
With configure, call it with:
|
||||
```
|
||||
# With gcc
|
||||
./configure CC="sccache gcc" CXX=scache gcc"
|
||||
# With clang
|
||||
./configure CC="sccache clang" CXX=scache clang"
|
||||
```
|
||||
|
||||
## Prepare a new release
|
||||
|
||||
1. Update the example in README.md
|
||||
|
||||
Reference in New Issue
Block a user