From b2aedbb44e56c06ecd25dfe80ae33bc596093d07 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 25 Feb 2026 18:07:01 +0000 Subject: [PATCH] Speed up PR CI: use RunTests target, add NuGet cache, upgrade actions to v4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Change build-windows from '-t All' to '-t RunTests': skips doc generation and pack steps that aren't needed for PR validation (~4-5 min saved) - Remove redundant 'Build (Debug)' step from both jobs (~2 min combined) - Add NuGet package caching via actions/cache@v4 (~30-40s saved on cache hits) - Upgrade actions/checkout v1 → v4 and actions/setup-dotnet v1 → v4 These changes should reduce total PR CI time from ~12 min to ~6-7 min. Closes #1649 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/pull-requests.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index 2163b6ae8..2c7e5b6f5 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -11,11 +11,18 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Setup .NET Core 8 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.400 + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/paket.lock') }} + restore-keys: | + ${{ runner.os }}-nuget- - name: Restore .NET local tools run: dotnet tool restore - name: Restore packages @@ -23,24 +30,27 @@ jobs: - name: Build and test (Release) env: FAKE_DETAILED_ERRORS: true - run: dotnet run --project build/build.fsproj -- -t All - - name: Build (Debug) - run: dotnet build -c Debug -v n + run: dotnet run --project build/build.fsproj -- -t RunTests build-ubuntu: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Setup .NET Core 8 - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: 8.0.400 + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/paket.lock') }} + restore-keys: | + ${{ runner.os }}-nuget- - name: Restore .NET local tools run: dotnet tool restore - name: Restore packages run: dotnet paket restore - name: Build and test run: dotnet run --project build/build.fsproj -- -t RunTests - - name: Build (Debug) - run: dotnet build -c Debug -v n