Skip to content

Commit

Permalink
improve build cache
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Jan 14, 2025
1 parent e9a835f commit c12998a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion xmake/modules/private/cache/build_cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,15 @@ function is_enabled(target)
end
-- disable ccache on ci
if result == nil and ci_is_running() then
result = false
local action_build_cache = _g._ACTION_BUILD_CACHE
if action_build_cache == nil then
action_build_cache = os.getenv("XMAKE_ACTION_BUILD_CACHE")
_g._ACTION_BUILD_CACHE = action_build_cache or false
end
-- we cannot disable it if github-action-setup-xmake/build-cache is enabled
if not action_build_cache then
result = false
end
end
-- disable ccache for msvc, because cl.exe preprocessor is too slower
-- @see https://github.com/xmake-io/xmake/issues/3532
Expand Down

0 comments on commit c12998a

Please sign in to comment.