Skip to content

Commit 71d830a

Browse files
committed
Determine LOCALAPPDATA path dynamically
1 parent 3071d39 commit 71d830a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/build-windows.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,13 @@ jobs:
115115
run: |
116116
mkdir output
117117
mkdir pdb
118+
- name: Get sccache path
119+
run: echo ("SCCACHE_DIR=" + $env:LOCALAPPDATA + "\Mozilla\sccache\cache") >> $env:GITHUB_ENV
118120
- name: Fetch ccache
119121
if: inputs.platform-files
120122
uses: actions/cache/restore@v4
121123
with:
122-
path: C:\\Users\\runneradmin\\AppData\\Local\\Mozilla\\sccache\\cache
124+
path: ${{ env.SCCACHE_DIR }}
123125
key: win-msvc-${{ inputs.cache-id }}-${{ github.sha }}
124126
restore-keys: |
125127
win-msvc-${{ inputs.cache-id }}
@@ -137,7 +139,7 @@ jobs:
137139
-DCMAKE_C_COMPILER_LAUNCHER=sccache `
138140
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache `
139141
-DBUILD_PDBS:BOOL=${{ inputs.cache-id == 'release' }} `
140-
-DDFHACK_RUN_URL='https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id}}' `
142+
-DDFHACK_RUN_URL='https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' `
141143
-DBUILD_LIBRARY=${{ inputs.platform-files }} `
142144
-DBUILD_PLUGINS:BOOL=${{ inputs.platform-files && inputs.plugins }} `
143145
-DBUILD_STONESENSE:BOOL=${{ inputs.stonesense }} `
@@ -148,7 +150,7 @@ jobs:
148150
-DBUILD_TESTS:BOOL=${{ inputs.tests }} `
149151
-DBUILD_XMLDUMP:BOOL=${{ inputs.xml-dump-type-sizes }} `
150152
${{ inputs.xml-dump-type-sizes && '-DINSTALL_XMLDUMP:BOOL=1' || '' }}
151-
- name: Cross-compile
153+
- name: Build DFHack
152154
env:
153155
SCCACHE_CACHE_SIZE: 500M
154156
run: |
@@ -162,7 +164,7 @@ jobs:
162164
if: inputs.platform-files && !inputs.cache-readonly
163165
uses: actions/cache/save@v4
164166
with:
165-
path: C:\\Users\\runneradmin\\AppData\\Local\\Mozilla\\sccache\\cache
167+
path: ${{ env.SCCACHE_DIR }}
166168
key: win-msvc-${{ inputs.cache-id }}-${{ github.sha }}
167169
- name: Format artifact name
168170
if: inputs.artifact-name

0 commit comments

Comments
 (0)