Skip to content

Commit

Permalink
[ci] 引入 cache 机制, 加速构建
Browse files Browse the repository at this point in the history
  • Loading branch information
WentsingNee committed Feb 27, 2024
1 parent 9a4d593 commit 450ee19
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,23 @@ jobs:
- name: Show Generator Support
run: cmake --help

- name: Cache Source Directory
uses: actions/cache@v4
with:
path: |
${{github.workspace}}/Kerbal
${{github.workspace}}/KerbalTest
key: KerbalBuildTest_source_cache-${{github.run_id}}
restore-keys: KerbalBuildTest_source_cache

- name: Cache Build Directory
uses: actions/cache@v4
with:
path: |
${{github.workspace}}/KerbalTest-build
key: KerbalBuildTest_build_cache-${{matrix.os}}-${{matrix.compiler}}-${{matrix.cxx_standard}}-${{github.run_id}}
restore-keys: KerbalBuildTest_build_cache-${{matrix.os}}-${{matrix.compiler}}-${{matrix.cxx_standard}}

- name: Clone Kerbal
uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 450ee19

Please sign in to comment.