88      - " *" 
99    branches :
1010      - main 
11+ env :
12+   #  D: drive used to be disabled for some time (Jul-Aug 2025)
13+   #  Though it's back, and d:\ seems to be faster than c:\
14+   #  Note that we mount the d:\d.vhdx under c:\d but it'll still use d:\
15+   VHDX_FILE : d:/d.vhdx 
1116jobs :
1217  otel_sdk_build :
1318    name : build otel_sdk 
@@ -103,15 +108,15 @@ jobs:
103108          } 
104109       - uses : actions/cache/restore@v4 
105110        with :
106-           path : c:/d.vhdx 
111+           path : ${{ env.VHDX_FILE }} 
107112          enableCrossOsArchive : true 
108113          key : ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', 'MODULE.bazel.lock') }} 
109114          restore-keys : ${{ runner.os }}-bazel- 
110115      - name : mount cache disk 
111116        run : | 
112117          New-Item -Path c:/d -ItemType "directory" -Force -Verbose 
113-           If (-not(Test-Path c:/d.vhdx )) { 
114-             $vhd = New-VHD -Path c:/d.vhdx  -SizeBytes 137438953472 -Dynamic -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096 -Verbose 
118+           If (-not(Test-Path ${{ env.VHDX_FILE }} )) { 
119+             $vhd = New-VHD -Path ${{ env.VHDX_FILE }}  -SizeBytes 137438953472 -Dynamic -LogicalSectorSizeBytes 4096 -PhysicalSectorSizeBytes 4096 -Verbose 
115120            $vhd 
116121            $mnt = Mount-VHD -Path $vhd.path -NoDriveLetter -Verbose -PassThru | Out-Host 
117122            $mnt 
@@ -122,44 +127,44 @@ jobs:
122127            $part 
123128            $vol = Format-Volume -FileSystem ReFS -Partition $part -Verbose 
124129            $vol 
125-             Dismount-VHD -Path c:/d.vhdx  -Verbose 
130+             Dismount-VHD -Path ${{ env.VHDX_FILE }}  -Verbose 
126131          } 
127-           $part = Mount-VHD -Path c:/d.vhdx  -NoDriveLetter -Verbose -PassThru | Get-Disk | Get-Partition | Where-Object -Not IsHidden 
132+           $part = Mount-VHD -Path ${{ env.VHDX_FILE }}  -NoDriveLetter -Verbose -PassThru | Get-Disk | Get-Partition | Where-Object -Not IsHidden 
128133          $part 
129134          $part | Add-PartitionAccessPath -AccessPath c:/d -Verbose 
130-           ls c:/d.vhdx  
135+           ls ${{ env.VHDX_FILE }}  
131136          echo empty > c:\d\empty.txt 
132137          cmd /c "dir c:\d || echo swallowing errors" 
133-           refsutil dedup c:\d /s 
138+           rem  refsutil dedup c:\d /s 
134139       - name : build minimal otel_sdk 
135140        #  On the CI, the github runner does not have constant vs2022 msvc release, but has the same vs2019 (14.29.30133)
141+         #  echo "build:windows --action_env=BAZEL_VC_FULL_VERSION=14.29.30133" >> ../top.bazelrc
142+         #  echo "build:windows --host_action_env=BAZEL_VC_FULL_VERSION=14.42.34438" >> ../top.bazelrc
136143        run : | 
137-           echo "build:windows --action_env=BAZEL_VC_FULL_VERSION=14.29.30133" >> ../top.bazelrc 
138-           echo "build:windows --host_action_env=BAZEL_VC_FULL_VERSION=14.42.34438" >> ../top.bazelrc 
139144          echo "common --remote_download_minimal" >> ../top.bazelrc 
140145          echo "build --disk_cache=c:/d" >> ../top.bazelrc 
141-           echo "common --repository_cache=c :/r" >> ../top.bazelrc 
142-           echo "startup --output_user_root=c :/b" >> ../top.bazelrc 
146+           echo "common --repository_cache=d :/r" >> ../top.bazelrc 
147+           echo "startup --output_user_root=d :/b" >> ../top.bazelrc 
143148          ./otel_sdk_build.cmd minimal 
144149          ./otel_sdk_build.cmd shutdown 
145150       - run : | 
146151          cmd /c "dir c:\ || echo swallowing errors" 
147152          cmd /c "dir d:\ || echo swallowing errors" 
148153          cmd /c "dir c:\d || echo swallowing errors" 
149-           Dismount-VHD -Path "c:/d.vhdx " -Verbose 
150-           ls c:/d.vhdx  
151-           Resize-VHD -Path "c:/d.vhdx " -ToMinimumSize -Verbose -ErrorAction SilentlyContinue 
152-           ls c:/d.vhdx  
154+           Dismount-VHD -Path "${{ env.VHDX_FILE }} " -Verbose 
155+           ls ${{ env.VHDX_FILE }}  
156+           Resize-VHD -Path "${{ env.VHDX_FILE }} " -ToMinimumSize -Verbose -ErrorAction SilentlyContinue 
157+           ls ${{ env.VHDX_FILE }}  
153158       - uses : actions/cache/save@v4 
154159        #  Don't update cache on releases
155160        if : ${{ ! startsWith(github.ref, 'refs/tags/') }} 
156161        env :
157162          ZSTD_CLEVEL : 1  #  1 (fastest) .. 19 (slowest)
158163        with :
159-           path : c:/d.vhdx 
164+           path : ${{ env.VHDX_FILE }} 
160165          enableCrossOsArchive : true 
161166          key : ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'MODULE.bazel', 'MODULE.bazel.lock') }} 
162-       - run : Mount-VHD -Path "c:/d.vhdx " -NoDriveLetter -Verbose -PassThru | Out-Host 
167+       - run : Mount-VHD -Path "${{ env.VHDX_FILE }} " -NoDriveLetter -Verbose -PassThru | Out-Host 
163168      - uses : actions/upload-artifact@v4 
164169        with :
165170          name : tracing-profiles 
@@ -172,7 +177,7 @@ jobs:
172177      - run : ./otel_sdk_build.cmd shutdown 
173178      - run : cmd /c "dir c:\ || echo swallowing errors" 
174179      - run : cmd /c "dir d:\ || echo swallowing errors" 
175-       - run : ls c:/d.vhdx  
180+       - run : ls ${{ env.VHDX_FILE }}  
176181      - uses : actions/upload-artifact@v4 
177182        if : ${{ ! startsWith(github.ref, 'refs/tags/') }} 
178183        with :
0 commit comments