Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/actions/setup-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,28 @@ runs:
restore-keys: nuget-

# The AppHost projects resolve DCP and the dashboard from the Aspire CLI bundle
# (AspireUseCliBundle); the build downloads it (~300 MB) into ~/.aspire when it is
# missing. The bundle version follows Aspire.AppHost.Sdk in global.json, hence the key.
# (AspireUseCliBundle) in ~/.aspire. The bundle version follows Aspire.AppHost.Sdk in
# global.json, hence the key.
- uses: actions/cache@v6
id: aspire-bundle
with:
path: |
~/.aspire/versions
~/.aspire/bundle
key: aspire-bundle-${{ runner.os }}-${{ hashFiles('global.json') }}

# On a cache miss the bundle (~300 MB) is prepared here, in one process. Left to the
# build, every AppHost of the parallel build runs the setup itself, and their concurrent
# dnx downloads of the same CLI package collide in the NuGet cache ("being used by
# another process"), which fails the build with ASPIRE009.
- name: Prepare the Aspire CLI bundle
if: steps.aspire-bundle.outputs.cache-hit != 'true'
shell: bash
run: >-
"$DOTNET_ROOT/dnx" --yes
"aspire.cli@$(jq -r '."msbuild-sdks"."Aspire.AppHost.Sdk"' global.json)"
-- setup --install-path "$HOME/.aspire"

- name: Restore local dotnet tools
shell: bash
run: dotnet tool restore
Loading