Skip to content

Commit f9eacd1

Browse files
committed
Try to cache
1 parent fca6719 commit f9eacd1

1 file changed

Lines changed: 27 additions & 14 deletions

File tree

.github/actions/install-mono/action.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,35 @@ inputs:
1010
runs:
1111
using: "composite"
1212
steps:
13+
# Windows Cache
14+
- name: Cache setup on Windows
15+
if: runner.os == 'Windows'
16+
run: |
17+
mkdir -p .choco-cache
18+
choco config set cacheLocation $(pwd)/.choco-cache
19+
shell: bash
20+
1321
- name: Cache on Windows
1422
if: runner.os == 'Windows'
1523
uses: actions/cache@v5
1624
with:
17-
path: ${{ env.TEMP }}\chocolatey
25+
path: .choco-cache
1826
key: mono-${{ runner.os }}-${{ inputs.arch }}
1927

20-
# - name: Cache on macOS (x86_64)
21-
# if: runner.os == 'Linux'
22-
# uses: actions/cache@v5
23-
# with:
24-
# path: .apt
25-
# key: mono-${{ runner.os }}-${{ inputs.arch }}
26-
#
27-
# - name: Cache on macOS (arm64)
28-
# if: runner.os == 'Linux'
29-
# uses: actions/cache@v5
30-
# with:
31-
# path: .apt
32-
# key: mono-${{ runner.os }}-${{ inputs.arch }}
28+
# macOS Cache
29+
- name: Set Homebrew Cache Path
30+
if: runner.os == 'macOS'
31+
run: |
32+
mkdir -p .brew-cache
33+
echo "HOMEBREW_CACHE=$(pwd)/.brew-cache" >> $GITHUB_ENV
34+
shell: bash
35+
36+
- name: Cache Homebrew on macOS
37+
if: runner.os == 'macOS'
38+
uses: actions/cache@v5
39+
with:
40+
path: .brew-cache
41+
key: mono-brew-${{ runner.os }}-${{ inputs.arch }}
3342

3443
# ===================================
3544

@@ -39,6 +48,8 @@ runs:
3948
with:
4049
packages: mono-runtime-sgen
4150

51+
# ===================================
52+
4253
- name: Install on Windows (x86)
4354
if: runner.os == 'Windows' && inputs.arch == 'x86'
4455
run: choco install --x86 -y mono
@@ -49,6 +60,8 @@ runs:
4960
run: choco install -y mono
5061
shell: sh
5162

63+
# ===================================
64+
#
5265
- name: Install on macOS (x86_64)
5366
if: runner.os == 'macOS' && inputs.arch == 'x64'
5467
run: |

0 commit comments

Comments
 (0)