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: cache-id:
type: string type: string
default: '' default: ''
platform-files:
type: boolean
default: true
common-files: common-files:
type: boolean type: boolean
default: true default: true
@ -24,11 +21,9 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- run: pip install clcache - run: pip install clcache
if: inputs.platform-files
- run: pip install 'sphinx<4.4.0' - run: pip install 'sphinx<4.4.0'
if: inputs.common-files if: inputs.common-files
- name: Fetch clcache - name: Fetch clcache
if: inputs.platform-files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: clcache path: clcache
@ -40,13 +35,15 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
submodules: true submodules: true
fetch-depth: ${{ !inputs.platform-files && 1 || 0 }} fetch-depth: 0
- name: Configure DFHack - 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 - name: Build DFHack
run: cmake --build build -j 2 --config Release --target install run: cmake --build build -j 2 --config Release --target install
- name: Trim cache - name: Trim cache
if: inputs.platform-files
run: | run: |
clcache -M 52428800 clcache -M 52428800
clcache -c clcache -c