Skip to content

Commit 0cf5625

Browse files
dsymegithub-actions[bot]Copilot
committed
Speed up PR CI: use RunTests target, add NuGet cache, upgrade actions to v4 (#1656)
- 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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c1cf2d3 commit 0cf5625

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

.github/workflows/pull-requests.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,46 @@ jobs:
1111

1212
runs-on: windows-latest
1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v4
1515
- name: Setup .NET Core 8
16-
uses: actions/setup-dotnet@v1
16+
uses: actions/setup-dotnet@v4
1717
with:
1818
dotnet-version: 8.0.400
19+
- name: Cache NuGet packages
20+
uses: actions/cache@v4
21+
with:
22+
path: ~/.nuget/packages
23+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/paket.lock') }}
24+
restore-keys: |
25+
${{ runner.os }}-nuget-
1926
- name: Restore .NET local tools
2027
run: dotnet tool restore
2128
- name: Restore packages
2229
run: dotnet paket restore
2330
- name: Build and test (Release)
2431
env:
2532
FAKE_DETAILED_ERRORS: true
26-
run: dotnet run --project build/build.fsproj -- -t All
27-
- name: Build (Debug)
28-
run: dotnet build -c Debug -v n
33+
run: dotnet run --project build/build.fsproj -- -t RunTests
2934

3035
build-ubuntu:
3136

3237
runs-on: ubuntu-latest
3338
steps:
34-
- uses: actions/checkout@v1
39+
- uses: actions/checkout@v4
3540
- name: Setup .NET Core 8
36-
uses: actions/setup-dotnet@v1
41+
uses: actions/setup-dotnet@v4
3742
with:
3843
dotnet-version: 8.0.400
44+
- name: Cache NuGet packages
45+
uses: actions/cache@v4
46+
with:
47+
path: ~/.nuget/packages
48+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/paket.lock') }}
49+
restore-keys: |
50+
${{ runner.os }}-nuget-
3951
- name: Restore .NET local tools
4052
run: dotnet tool restore
4153
- name: Restore packages
4254
run: dotnet paket restore
4355
- name: Build and test
4456
run: dotnet run --project build/build.fsproj -- -t RunTests
45-
- name: Build (Debug)
46-
run: dotnet build -c Debug -v n

0 commit comments

Comments
 (0)