ADD: github actions

This commit is contained in:
Kolyah35
2026-03-19 18:53:13 +03:00
parent e469e03366
commit 04d892c926
2 changed files with 180 additions and 0 deletions

31
.github/actions/setup-cache/action.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Setup cache
description: Sets up sccache, CPM cache, etc.
inputs:
host:
description: 'Host platform: win or linux'
required: true
target:
description: 'Target platform: win, linux'
required: true
use-ccache:
description: 'Whether to use ccache/sccache'
required: true
runs:
using: "composite"
steps:
- name: Setup sccache
uses: hendrikmuhs/ccache-action@v1.2.13
with:
variant: sccache
key: ${{ inputs.target }}-v1
if: inputs.use-ccache
- name: Setup CPM Cache
uses: actions/cache@v4
with:
path: cpm-cache
key: cpm-${{ inputs.target }}-v1-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
restore-keys: |
cpm-${{ inputs.target }}-v1-