Skip to content

Commit 4662833

Browse files
committed
update(xmake): Add Cache
1 parent 7e9174c commit 4662833

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ jobs:
2020
with:
2121
path: swiftly
2222

23+
- name: Set up cache for Xmake
24+
id: xmake-cache
25+
uses: actions/cache@v2
26+
with:
27+
path: ${{ github.workspace }}/swiftly/build/.build_cache
28+
key: ${{ runner.os }}-xmake-${{ hashFiles('**/*') }}
29+
restore-keys: |
30+
${{ runner.os }}-xmake-
31+
2332
- name: Generate Documentation
2433
working-directory: swiftly/docgen
2534
run: |
@@ -71,7 +80,7 @@ jobs:
7180
shell: bash
7281
run: |
7382
sudo apt update
74-
sudo apt install -y libreadline-dev libboost-all-dev fdupes unzip
83+
sudo apt install -y libreadline-dev libboost-all-dev fdupes unzip ccache
7584
bash ./setup.sh
7685
7786
- name: Build - Windows

xmake.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ includes("@builtin/xpack")
44
includes("core.base.option")
55
includes("platform.os")
66

7+
set_policy("build.ccache", true)
8+
79
local SDK_PATH = os.getenv("HL2SDKCS2")
810
local MM_PATH = os.getenv("MMSOURCE112")
911
local GITHUB_SHA = os.getenv("GITHUB_SHA") or "Local"
@@ -21,6 +23,8 @@ end
2123
target(PROJECT_NAME.."-Xmake")
2224
set_kind("shared")
2325

26+
set_policy("build.cache", true)
27+
2428
--[[ Source Files ]]
2529
add_files("src/**.cpp")
2630
add_files("vendor/luacpp/src/**.cpp")

0 commit comments

Comments
 (0)