android / android/ndk

[FR] create a sample showing how to use sccache

Open
#1,790 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
2.3k
Forks
310
PR merge metrics
No merged PRs in 30d

Description

### Description

It's actually trivially easy to use sccache with CMake:

```
find_program(SCCACHE_PATH sccache REQUIRED)
set(CMAKE_C_COMPILER_LAUNCHER "${SCCACHE_PATH}")
set(CMAKE_C_LINKER_LAUNCHER "${SCCACHE_PATH}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${SCCACHE_PATH}")
set(CMAKE_CXX_LINKER_LAUNCHER "${SCCACHE_PATH}")
```

Might be worthwhile to build a full sample that does that with a GCS bucket for caching a github action.

Contributor guide

Open the contributing guide

Research direction

Use the CMake snippet in the issue as the starting point, then identify where a complete sample and GitHub Actions workflow belong in the NDK repository. The sample should demonstrate sccache with C and C++ compiler and linker launchers, while the workflow uses a GCS bucket for caching. Confirm the result by running the sample build and workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake, cpp, github-actions, google-cloud
Domain
build-system, ci-cd, cloud, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.