mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-21 03:49:30 +00:00
feat(ci): cache native c deps through sccache
This commit is contained in:
@@ -74,6 +74,10 @@ jobs:
|
||||
# Keep the server alive through post-compile test/lint phases so
|
||||
# "Show sccache stats" reflects the real counters.
|
||||
echo "SCCACHE_IDLE_TIMEOUT=0"
|
||||
# Also cache the C/C++ compilation of -sys crates. These jobs are
|
||||
# native Linux builds, so plain CC/CXX select the target compiler.
|
||||
echo "CC=${SCCACHE_PATH} cc"
|
||||
echo "CXX=${SCCACHE_PATH} c++"
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Rust cache
|
||||
@@ -384,6 +388,10 @@ jobs:
|
||||
# Keep the server alive through post-compile test/lint phases so
|
||||
# "Show sccache stats" reflects the real counters.
|
||||
echo "SCCACHE_IDLE_TIMEOUT=0"
|
||||
# Also cache the C/C++ compilation of -sys crates. These jobs are
|
||||
# native Linux builds, so plain CC/CXX select the target compiler.
|
||||
echo "CC=${SCCACHE_PATH} cc"
|
||||
echo "CXX=${SCCACHE_PATH} c++"
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Rust cache
|
||||
@@ -464,6 +472,10 @@ jobs:
|
||||
# Keep the server alive through post-compile test/lint phases so
|
||||
# "Show sccache stats" reflects the real counters.
|
||||
echo "SCCACHE_IDLE_TIMEOUT=0"
|
||||
# Also cache the C/C++ compilation of -sys crates. These jobs are
|
||||
# native Linux builds, so plain CC/CXX select the target compiler.
|
||||
echo "CC=${SCCACHE_PATH} cc"
|
||||
echo "CXX=${SCCACHE_PATH} c++"
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Rust cache
|
||||
|
||||
@@ -346,6 +346,19 @@ jobs:
|
||||
# Keep the server alive through the post-compile packaging tail so
|
||||
# "Show sccache stats" reflects the real counters.
|
||||
echo "SCCACHE_IDLE_TIMEOUT=0"
|
||||
# Also cache the C/C++ compilation of -sys crates. All matrix legs
|
||||
# are native builds, so plain CC/CXX select the target compiler;
|
||||
# MSVC stays unwrapped. SCCACHE_PATH avoids depending on PATH.
|
||||
case "${RUNNER_OS}" in
|
||||
Linux)
|
||||
echo "CC=${SCCACHE_PATH} cc"
|
||||
echo "CXX=${SCCACHE_PATH} c++"
|
||||
;;
|
||||
macOS)
|
||||
echo "CC=${SCCACHE_PATH} clang"
|
||||
echo "CXX=${SCCACHE_PATH} clang++"
|
||||
;;
|
||||
esac
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Rust cache
|
||||
@@ -567,6 +580,19 @@ jobs:
|
||||
# Keep the server alive through the post-compile packaging tail so
|
||||
# "Show sccache stats" reflects the real counters.
|
||||
echo "SCCACHE_IDLE_TIMEOUT=0"
|
||||
# Also cache the C/C++ compilation of -sys crates. All matrix legs
|
||||
# are native builds, so plain CC/CXX select the target compiler;
|
||||
# MSVC stays unwrapped. SCCACHE_PATH avoids depending on PATH.
|
||||
case "${RUNNER_OS}" in
|
||||
Linux)
|
||||
echo "CC=${SCCACHE_PATH} cc"
|
||||
echo "CXX=${SCCACHE_PATH} c++"
|
||||
;;
|
||||
macOS)
|
||||
echo "CC=${SCCACHE_PATH} clang"
|
||||
echo "CXX=${SCCACHE_PATH} clang++"
|
||||
;;
|
||||
esac
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Rust cache
|
||||
|
||||
@@ -184,6 +184,19 @@ jobs:
|
||||
# rustc call; the server's 10-minute default idle timeout would
|
||||
# exit first and zero the counters shown by "Show sccache stats".
|
||||
echo "SCCACHE_IDLE_TIMEOUT=0"
|
||||
# Also cache the C/C++ compilation of -sys crates. All matrix legs
|
||||
# are native builds, so plain CC/CXX select the target compiler;
|
||||
# MSVC stays unwrapped. SCCACHE_PATH avoids depending on PATH.
|
||||
case "${RUNNER_OS}" in
|
||||
Linux)
|
||||
echo "CC=${SCCACHE_PATH} cc"
|
||||
echo "CXX=${SCCACHE_PATH} c++"
|
||||
;;
|
||||
macOS)
|
||||
echo "CC=${SCCACHE_PATH} clang"
|
||||
echo "CXX=${SCCACHE_PATH} clang++"
|
||||
;;
|
||||
esac
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Compute Rust dependency hash
|
||||
@@ -330,6 +343,19 @@ jobs:
|
||||
# rustc call; the server's 10-minute default idle timeout would
|
||||
# exit first and zero the counters shown by "Show sccache stats".
|
||||
echo "SCCACHE_IDLE_TIMEOUT=0"
|
||||
# Also cache the C/C++ compilation of -sys crates. All matrix legs
|
||||
# are native builds, so plain CC/CXX select the target compiler;
|
||||
# MSVC stays unwrapped. SCCACHE_PATH avoids depending on PATH.
|
||||
case "${RUNNER_OS}" in
|
||||
Linux)
|
||||
echo "CC=${SCCACHE_PATH} cc"
|
||||
echo "CXX=${SCCACHE_PATH} c++"
|
||||
;;
|
||||
macOS)
|
||||
echo "CC=${SCCACHE_PATH} clang"
|
||||
echo "CXX=${SCCACHE_PATH} clang++"
|
||||
;;
|
||||
esac
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Compute Rust dependency hash
|
||||
|
||||
Reference in New Issue
Block a user