Use sccache on non CI env

This commit is contained in:
LoveSy 2023-06-08 11:28:00 +08:00 committed by John Wu
parent bf6359abaa
commit d2fbcd07b7
2 changed files with 5 additions and 3 deletions

View File

@ -24,10 +24,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
env:
NDK_CCACHE: sccache
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: true
CARGO_INCREMENTAL: 0
steps:
- name: Check out

View File

@ -59,6 +59,11 @@ if not sys.version_info >= (3, 8):
if "ANDROID_SDK_ROOT" not in os.environ:
error("Please set Android SDK path to environment variable ANDROID_SDK_ROOT!")
if shutil.which("sccache") is not None:
os.environ["RUSTC_WRAPPER"] = "sccache"
os.environ["NDK_CCACHE"] = "sccache"
os.environ["CARGO_INCREMENTAL"] = "0"
cpu_count = multiprocessing.cpu_count()
os_name = platform.system().lower()