From 3ae9dba60d34f3b1511d5c437bbe162c0c622015 Mon Sep 17 00:00:00 2001 From: LukeFZ <17146677+LukeFZ@users.noreply.github.com> Date: Wed, 3 Sep 2025 23:04:23 +0200 Subject: [PATCH] improve caching in workflow, remove duplicated .net install steps --- .github/workflows/build.yml | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 949f4fd..711a4fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: lts/* + cache: "pnpm" - name: Setup Rust uses: dtolnay/rust-toolchain@stable @@ -42,7 +43,8 @@ jobs: run: pnpm install working-directory: ./Il2CppInspector.Redux.GUI.UI - - uses: actions/cache@v4 + - name: Cache NuGet packages + uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-redux-gui-${{ hashFiles('**/packages.lock.json') }} @@ -80,23 +82,19 @@ jobs: with: submodules: true - - name: Setup .NET SDK + - name: Setup .NET SDK ${{ matrix.dotnet-version }} uses: actions/setup-dotnet@v4 with: - dotnet-version: '9.0.x' + dotnet-version: ${{ matrix.dotnet-version }} - - uses: actions/cache@v3 + - name: Cache NuGet packages + uses: actions/cache@v4 with: path: ~/.nuget/packages key: ${{ runner.os }}-nuget-cli-${{ matrix.rid }}-${{ hashFiles('**/packages.lock.json') }} restore-keys: | ${{ runner.os }}-nuget-cli-${{ matrix.rid }}- - - name: Setup .NET SDK ${{ matrix.dotnet-version }} - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ matrix.dotnet-version }} - - name: Install dependencies run: dotnet restore -r ${{ matrix.rid }} ./Il2CppInspector.Redux.CLI @@ -153,10 +151,10 @@ jobs: with: submodules: true - - name: Setup .NET SDK + - name: Setup .NET SDK ${{ matrix.dotnet-version }} uses: actions/setup-dotnet@v4 with: - dotnet-version: '9.0.x' + dotnet-version: ${{ matrix.dotnet-version }} - uses: actions/cache@v3 with: @@ -165,11 +163,6 @@ jobs: restore-keys: | ${{ runner.os }}-nuget-cli-${{ matrix.rid }}- - - name: Setup .NET SDK ${{ matrix.dotnet-version }} - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ matrix.dotnet-version }} - - name: Install dependencies run: dotnet restore -r ${{ matrix.rid }} ./Il2CppInspector.CLI