@@ -10,42 +10,45 @@ inputs:
1010runs :
1111 using : " composite"
1212 steps :
13- - name : Cache on Linux
14- if : runner.os == 'Linux'
15- uses : actions/cache@v5
16- with :
17- path : .apt
18- key : mono-${{ runner.os }}-${{ inputs.arch }}
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
1920
2021 - name : Cache on Windows
2122 if : runner.os == 'Windows'
2223 uses : actions/cache@v5
2324 with :
24- path : ${{ env.TEMP }}\chocolatey
25+ path : .choco-cache
2526 key : mono-${{ runner.os }}-${{ inputs.arch }}
2627
27- # - name: Cache on macOS (x86_64)
28- # if: runner.os == 'Linux'
29- # uses: actions/cache@v5
30- # with:
31- # path: .apt
32- # key: mono-${{ runner.os }}-${{ inputs.arch }}
33- #
34- # - name: Cache on macOS (arm64)
35- # if: runner.os == 'Linux'
36- # uses: actions/cache@v5
37- # with:
38- # path: .apt
39- # 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 }}
4042
4143 # ===================================
4244
4345 - name : Install on Linux
4446 if : runner.os == 'Linux'
45- run : |
46- sudo apt-get -o Dir::Cache=".apt" update
47- sudo apt-get -o Dir::Cache=".apt" install -y mono-runtime-sgen
48- shell : sh
47+ uses : awalsh128/cache-apt-pkgs-action@v1
48+ with :
49+ packages : mono-runtime-sgen
50+
51+ # ===================================
4952
5053 - name : Install on Windows (x86)
5154 if : runner.os == 'Windows' && inputs.arch == 'x86'
@@ -57,17 +60,19 @@ runs:
5760 run : choco install -y mono
5861 shell : sh
5962
63+ # ===================================
64+ #
6065 - name : Install on macOS (x86_64)
6166 if : runner.os == 'macOS' && inputs.arch == 'x64'
6267 run : |
6368 arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
64- arch -x86_64 /usr/local/bin/brew install mono
69+ arch -x86_64 /usr/local/bin/brew install --ignore-dependencies mono
6570 shell : sh
6671
6772 - name : Install on macOS (arm64)
6873 if : runner.os == 'macOS' && inputs.arch != 'x64'
6974 run : |
7075 brew update
71- brew install mono
76+ brew install --ignore-dependencies mono
7277 shell : sh
7378
0 commit comments