another clcache attempt

develop
Myk Taylor 2023-07-30 23:50:47 -07:00
parent a0fae55c90
commit b6ececed2d
No known key found for this signature in database
1 changed files with 5 additions and 8 deletions

@ -11,9 +11,6 @@ on:
cache-id:
type: string
default: ''
platform-files:
type: boolean
default: true
common-files:
type: boolean
default: true
@ -24,11 +21,9 @@ jobs:
runs-on: windows-latest
steps:
- run: pip install clcache
if: inputs.platform-files
- run: pip install 'sphinx<4.4.0'
if: inputs.common-files
- name: Fetch clcache
if: inputs.platform-files
uses: actions/cache@v3
with:
path: clcache
@ -40,13 +35,15 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: ${{ !inputs.platform-files && 1 || 0 }}
fetch-depth: 0
- name: Configure DFHack
run: cmake -S . -B build -G "Visual Studio 17 2022" -DCMAKE_INSTALL_PREFIX=build/image ${{ inputs.platform-files && '-DCMAKE_C_COMPILER_LAUNCHER=clcache' || '' }} ${{ inputs.platform-files && '-DCMAKE_CXX_COMPILER_LAUNCHER=clcache' || '' }} -DBUILD_LIBRARY:BOOL=${{ inputs.platform-files }} -DBUILD_PLUGINS:BOOL=${{ inputs.platform-files }} -DBUILD_STONESENSE:BOOL=${{ inputs.platform-files }} -DBUILD_DOCS:BOOL=${{ inputs.common-files }} -DINSTALL_DATA_FILES:BOOL=${{ inputs.common-files }} -DINSTALL_SCRIPTS:BOOL=${{ inputs.common-files }}
env:
CC: clcache
CXX: clcache
run: cmake -S . -B build -G "Visual Studio 17 2022" -DCMAKE_INSTALL_PREFIX=build/image -DBUILD_STONESENSE:BOOL=1 -DBUILD_DOCS:BOOL=${{ inputs.common-files }} -DINSTALL_DATA_FILES:BOOL=${{ inputs.common-files }} -DINSTALL_SCRIPTS:BOOL=${{ inputs.common-files }}
- name: Build DFHack
run: cmake --build build -j 2 --config Release --target install
- name: Trim cache
if: inputs.platform-files
run: |
clcache -M 52428800
clcache -c