1111 - main
1212 types : [ labeled, opened, synchronize, reopened ]
1313jobs :
14+ # Prime a single LFS cache and expose the exact key for the matrix
15+ WarmLFS :
16+ runs-on : ubuntu-latest
17+ outputs :
18+ lfs_key : ${{ steps.expose-key.outputs.lfs_key }}
19+ steps :
20+ - name : Git Config
21+ shell : bash
22+ run : |
23+ git config --global core.autocrlf false
24+ git config --global core.longpaths true
25+
26+ - name : Git Checkout
27+ uses : actions/checkout@v4
28+ with :
29+ fetch-depth : 0
30+ submodules : recursive
31+
32+ # Deterministic list of LFS object IDs, then compute a portable key:
33+ # - `git lfs ls-files -l` lists all tracked LFS objects with their SHA-256
34+ # - `awk '{print $1}'` extracts just the SHA field
35+ # - `sort` sorts in byte order (hex hashes sort the same everywhere)
36+ # This ensures the file content is identical regardless of OS or locale
37+ - name : Git Create LFS id list
38+ shell : bash
39+ run : git lfs ls-files -l | awk '{print $1}' | sort > .lfs-assets-id
40+
41+ - name : Git Expose LFS cache key
42+ id : expose-key
43+ shell : bash
44+ env :
45+ LFS_KEY : lfs-${{ hashFiles('.lfs-assets-id') }}-v1
46+ run : echo "lfs_key=$LFS_KEY" >> "$GITHUB_OUTPUT"
47+
48+ - name : Git Setup LFS Cache
49+ uses : actions/cache@v4
50+ with :
51+ path : .git/lfs
52+ key : ${{ steps.expose-key.outputs.lfs_key }}
53+
54+ - name : Git Pull LFS
55+ shell : bash
56+ run : git lfs pull
57+
1458 Build :
59+ needs : WarmLFS
1560 strategy :
1661 matrix :
1762 isARM :
1863 - ${{ contains(github.event.pull_request.labels.*.name, 'arch:arm32') || contains(github.event.pull_request.labels.*.name, 'arch:arm64') }}
1964 options :
2065 - os : ubuntu-latest
21- framework : net7 .0
22- sdk : 7 .0.x
66+ framework : net9 .0
67+ sdk : 9 .0.x
2368 sdk-preview : true
2469 runtime : -x64
2570 codecov : false
2671 - os : macos-13 # macos-latest runs on arm64 runners where libgdiplus is unavailable
27- framework : net7 .0
28- sdk : 7 .0.x
72+ framework : net9 .0
73+ sdk : 9 .0.x
2974 sdk-preview : true
3075 runtime : -x64
3176 codecov : false
3277 - os : windows-latest
33- framework : net7 .0
34- sdk : 7 .0.x
78+ framework : net9 .0
79+ sdk : 9 .0.x
3580 sdk-preview : true
3681 runtime : -x64
3782 codecov : false
3883 - os : buildjet-4vcpu-ubuntu-2204-arm
39- framework : net7 .0
40- sdk : 7 .0.x
84+ framework : net9 .0
85+ sdk : 9 .0.x
4186 sdk-preview : true
4287 runtime : -x64
4388 codecov : false
89+
4490 - os : ubuntu-latest
45- framework : net6 .0
46- sdk : 6 .0.x
91+ framework : net8 .0
92+ sdk : 8 .0.x
4793 runtime : -x64
4894 codecov : false
4995 - os : macos-13 # macos-latest runs on arm64 runners where libgdiplus is unavailable
50- framework : net6 .0
51- sdk : 6 .0.x
96+ framework : net8 .0
97+ sdk : 8 .0.x
5298 runtime : -x64
5399 codecov : false
54100 - os : windows-latest
55- framework : net6.0
56- sdk : 6.0.x
101+ framework : net8.0
102+ sdk : 8.0.x
103+ runtime : -x64
104+ codecov : false
105+ - os : buildjet-4vcpu-ubuntu-2204-arm
106+ framework : net8.0
107+ sdk : 8.0.x
57108 runtime : -x64
58- codecov : true
109+ codecov : false
59110 exclude :
60111 - isARM : false
61112 options :
@@ -65,8 +116,10 @@ jobs:
65116
66117 steps :
67118 - name : Install libgdi+, which is required for tests running on ubuntu
68- if : ${{ matrix.options.os == 'buildjet-4vcpu-ubuntu-2204-arm' }}
69- run : sudo apt-get -y install libgdiplus libgif-dev libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev
119+ if : ${{ contains(matrix.options.os, 'ubuntu') }}
120+ run : |
121+ sudo apt-get update
122+ sudo apt-get -y install libgdiplus libgif-dev libglib2.0-dev libcairo2-dev libtiff-dev libexif-dev
70123
71124 - name : Git Config
72125 shell : bash
@@ -80,16 +133,12 @@ jobs:
80133 fetch-depth : 0
81134 submodules : recursive
82135
83- # See https://github.com/actions/checkout/issues/165#issuecomment-657673315
84- - name : Git Create LFS FileList
85- run : git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
86-
136+ # Use the warmed key from WarmLFS. Do not recompute or recreate .lfs-assets-id here.
87137 - name : Git Setup LFS Cache
88138 uses : actions/cache@v4
89- id : lfs-cache
90139 with :
91140 path : .git/lfs
92- key : ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
141+ key : ${{ needs.WarmLFS.outputs.lfs_key }}
93142
94143 - name : Git Pull LFS
95144 run : git lfs pull
@@ -110,14 +159,14 @@ jobs:
110159 uses : actions/setup-dotnet@v4
111160 with :
112161 dotnet-version : |
113- 6 .0.x
162+ 8 .0.x
114163
115164 - name : DotNet Setup Preview
116165 if : ${{ matrix.options.sdk-preview == true }}
117166 uses : actions/setup-dotnet@v4
118167 with :
119168 dotnet-version : |
120- 7 .0.x
169+ 9 .0.x
121170
122171 - name : DotNet Build
123172 if : ${{ matrix.options.sdk-preview != true }}
0 commit comments