rip out tauri bundle (v2), swc -> esbuild, blacksmith -> warpbuild, FAST CI 🚀 (#5328)
- inline mac, windows, linux bundling in the cli - remove tauri bundle from our dep tree - trim down the rpm crate for fewer dependencies in tree - migrate from blacksmith to warpbuild - move off swc and instead use esbuild via tool - use dev drives in windows CI - use fork of nix action for faster caching - test bundling in CI - fix asset handling in linux - add default APPDATA location for webview2 installs for dioxus apps on windows
This commit is contained in:
1 parent
be7296f4f0
commit
b2d01e6779
83 files changed
+7756
-5403
No files matched your search
@@ -1,26 +1,74 @@
|
||||
# This creates a 20GB dev drive, and exports all required environment
|
||||
# variables so that rustup, uv and others all use the dev drive as much
|
||||
# as possible.
|
||||
$Volume = New-VHD -Path C:/uv_dev_drive.vhdx -SizeBytes 20GB |
|
||||
Mount-VHD -Passthru |
|
||||
Initialize-Disk -Passthru |
|
||||
New-Partition -AssignDriveLetter -UseMaximumSize |
|
||||
Format-Volume -FileSystem ReFS -Confirm:$false -Force
|
||||
# Configures a dev drive for Windows CI to speed up Rust builds.
|
||||
#
|
||||
# The main performance win is disabling Windows Defender antivirus scanning
|
||||
# on the build drive — AV scanning every .o, .rlib, .rmeta, and .exe during
|
||||
# a Rust build is extremely expensive.
|
||||
#
|
||||
# Three code paths:
|
||||
# 1. D: drive exists (some runners) — use it directly
|
||||
# 2. Hyper-V available — create a Dev Drive VHD (best perf, supports fsutil devdrv)
|
||||
# 3. No Hyper-V (Warp/EC2 runners) — use diskpart + ReFS format
|
||||
|
||||
Write-Output $Volume
|
||||
if (Test-Path "D:\") {
|
||||
Write-Output "Using existing drive at D:"
|
||||
$Drive = "D:"
|
||||
} elseif (Get-Command New-VHD -ErrorAction SilentlyContinue) {
|
||||
# Hyper-V is available — create a proper Dev Drive
|
||||
$Volume = New-VHD -Path C:/dev_drive.vhdx -SizeBytes 25GB |
|
||||
Mount-VHD -Passthru |
|
||||
Initialize-Disk -Passthru |
|
||||
New-Partition -AssignDriveLetter -UseMaximumSize |
|
||||
Format-Volume -DevDrive -Confirm:$false -Force
|
||||
|
||||
$Drive = "$($Volume.DriveLetter):"
|
||||
$Tmp = "$($Drive)/uv-tmp"
|
||||
$Drive = "$($Volume.DriveLetter):"
|
||||
|
||||
# Create the directory ahead of time in an attempt to avoid race-conditions
|
||||
New-Item $Tmp -ItemType Directory
|
||||
# Mark as trusted and disable antivirus filtering
|
||||
fsutil devdrv trust $Drive
|
||||
fsutil devdrv enable /disallowAv
|
||||
|
||||
# Remount so the changes take effect
|
||||
Dismount-VHD -Path C:/dev_drive.vhdx
|
||||
Mount-VHD -Path C:/dev_drive.vhdx
|
||||
|
||||
Write-Output $Volume
|
||||
fsutil devdrv query $Drive
|
||||
Write-Output "Created Dev Drive at $Drive"
|
||||
} else {
|
||||
# No Hyper-V — fall back to diskpart + ReFS
|
||||
Write-Output "No Hyper-V detected, creating ReFS drive via diskpart..."
|
||||
|
||||
$vhdPath = "C:\dev_drive.vhdx"
|
||||
@"
|
||||
create vdisk file="$vhdPath" maximum=25600 type=expandable
|
||||
attach vdisk
|
||||
create partition primary
|
||||
active
|
||||
assign letter=V
|
||||
"@ | diskpart
|
||||
|
||||
format V: /fs:ReFS /q /y
|
||||
$Drive = "V:"
|
||||
|
||||
Write-Output "Created ReFS drive at $Drive"
|
||||
}
|
||||
|
||||
$Tmp = "$($Drive)\tmp"
|
||||
|
||||
# Create directories ahead of time to avoid race conditions
|
||||
New-Item $Tmp -ItemType Directory -Force
|
||||
|
||||
# Move Cargo to the dev drive so registry/crate downloads also benefit
|
||||
New-Item -Path "$($Drive)/.cargo/bin" -ItemType Directory -Force
|
||||
if (Test-Path "C:/Users/runneradmin/.cargo") {
|
||||
Copy-Item -Path "C:/Users/runneradmin/.cargo/*" -Destination "$($Drive)/.cargo/" -Recurse -Force
|
||||
}
|
||||
|
||||
Write-Output `
|
||||
"DEV_DRIVE=$($Drive)" `
|
||||
"TMP=$($Tmp)" `
|
||||
"TEMP=$($Tmp)" `
|
||||
"RUSTUP_HOME=$($Drive)/.rustup" `
|
||||
"CARGO_HOME=$($Drive)/.cargo" `
|
||||
"UV_WORKSPACE=$($Drive)/uv" `
|
||||
"PATH=$($Drive)/.cargo/bin;$env:PATH" `
|
||||
>> $env:GITHUB_ENV
|
||||
"DEV_DRIVE=$($Drive)" `
|
||||
"TMP=$($Tmp)" `
|
||||
"TEMP=$($Tmp)" `
|
||||
"RUSTUP_HOME=$($Drive)/.rustup" `
|
||||
"CARGO_HOME=$($Drive)/.cargo" `
|
||||
"DIOXUS_WORKSPACE=$($Drive)/dioxus" `
|
||||
"PATH=$($Drive)/.cargo/bin;$env:PATH" `
|
||||
>> $env:GITHUB_ENV
|
||||
Reference in new issue
Block a user