Skip to content

ci: explore using ReFS drive to speed up Windows CI jobs #29

ci: explore using ReFS drive to speed up Windows CI jobs

ci: explore using ReFS drive to speed up Windows CI jobs #29

Workflow file for this run

name: Check Docker images
on:
pull_request:
paths:
- Dockerfile
- Dockerfile.windows
- Makefile
- 'tools/make/*'
jobs:
# NOTE(rfratto): We only test building the Docker images for the host
# platform, but we're really only looking for issues that are
# architecture-independent.
linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build image
run: |
docker build -t alloy-test:latest -f Dockerfile .
windows:
runs-on: windows-latest
steps:
- name: Create Dev Drive using ReFS
run: |
$Volume = New-VHD -Path C:/dev_drive.vhdx -SizeBytes 10GB |
Mount-VHD -Passthru |
Initialize-Disk -Passthru |
New-Partition -AssignDriveLetter -UseMaximumSize |
Format-Volume -FileSystem ReFS -Confirm:$false -Force
Write-Output $Volume
Write-Output "DEV_DRIVE=$($Volume.DriveLetter):" >> $env:GITHUB_ENV
# actions/checkout does not let us clone anywhere outside the workspace
# so we have to copy the clone repository into the Dev drive.
- uses: actions/checkout@v4
- name: Copy repo to Dev Drive
run: |
Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.DEV_DRIVE }}/work" -Recurse
- name: Build image
working-directory: ${{ env.DEV_DRIVE }}/work
run: |
docker build -t alloy-test:latest -f Dockerfile.windows .