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
+377
-171
@@ -1,34 +1,19 @@
|
||||
# Whenever an open PR is updated, the workflow will be triggered
|
||||
#
|
||||
# This can get expensive, so we do a lot of caching and checks to prevent unnecessary runs
|
||||
# Language linting (typos, link-check) runs on every push; Rust jobs are gated behind path checks
|
||||
|
||||
name: Rust CI
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- packages/**
|
||||
- examples/**
|
||||
- docs/guide/**
|
||||
- src/**
|
||||
- .github/**
|
||||
- lib.rs
|
||||
- Cargo.toml
|
||||
- Makefile.toml
|
||||
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- packages/**
|
||||
- examples/**
|
||||
- src/**
|
||||
- .github/**
|
||||
- lib.rs
|
||||
- Cargo.toml
|
||||
|
||||
# workflow_dispatch:
|
||||
concurrency:
|
||||
@@ -38,110 +23,113 @@ concurrency:
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
CARGO_INCREMENTAL: 0 # todo(jon): cargo-cache wipes incremental artifacts, but we eventually want to cache them
|
||||
# CARGO_PROFILE_DEV_PACKAGE_STAR_STRIP: debuginfo # strip debug info from deps to shrink cache
|
||||
RUST_BACKTRACE: 1
|
||||
rust_nightly: nightly-2025-10-05
|
||||
|
||||
jobs:
|
||||
check-msrv:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Check MSRV
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
# ---------------------------------------------------------------------------
|
||||
# Path gate — determines whether Rust jobs should run
|
||||
# ---------------------------------------------------------------------------
|
||||
check-paths:
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
outputs:
|
||||
rust: ${{ steps.filter.outputs.rust }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
# https://github.com/foresterre/cargo-msrv/blob/4345edfe3f4fc91cc8ae6c7d6804c0748fae92ae/.github/workflows/msrv.yml
|
||||
- name: install_cargo_msrv
|
||||
run: cargo install cargo-msrv --all-features --version 0.16.3 --locked
|
||||
- name: version_of_cargo_msrv
|
||||
run: cargo msrv --version
|
||||
- name: run_cargo_msrv
|
||||
run: cargo msrv --output-format json verify -- cargo check
|
||||
- name: run_cargo_msrv_on_verify_failure
|
||||
if: ${{ failure() }}
|
||||
run: cargo msrv --output-format json -- cargo check
|
||||
filters: |
|
||||
rust:
|
||||
- 'packages/**'
|
||||
- 'examples/**'
|
||||
- 'docs/guide/**'
|
||||
- 'src/**'
|
||||
- '.github/**'
|
||||
- 'lib.rs'
|
||||
- 'Cargo.toml'
|
||||
- 'Makefile.toml'
|
||||
|
||||
test:
|
||||
# ---------------------------------------------------------------------------
|
||||
# Language linting — runs on every push
|
||||
# ---------------------------------------------------------------------------
|
||||
typos:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Test Suite
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
name: "Lint | Typos"
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Check for typos
|
||||
uses: crate-ci/typos@master
|
||||
|
||||
link-check:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: "Lint | Links"
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Restore lychee cache
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: .lycheecache
|
||||
key: cache-lychee-${{ github.sha }}
|
||||
restore-keys: cache-lychee-
|
||||
- name: Run lychee
|
||||
uses: lycheeverse/lychee-action@v2
|
||||
with:
|
||||
args: --config ./lychee.toml './**/*.md'
|
||||
fail: true
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Rust jobs — only run when relevant paths change
|
||||
# ---------------------------------------------------------------------------
|
||||
lint:
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Lint | Clippy, fmt, schema, msrv"
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Free Disk Space
|
||||
uses: ./.github/actions/free-disk-space
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
|
||||
version: 1.0
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
- uses: dtolnay/rust-toolchain@1.94.0
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
- uses: cargo-bins/cargo-binstall@main
|
||||
- name: Install cargo-msrv
|
||||
run: cargo binstall cargo-msrv -y --force
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
- uses: browser-actions/setup-firefox@latest
|
||||
- run: cargo test --lib --bins --tests --examples --workspace --exclude dioxus-desktop
|
||||
|
||||
release-test:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Test Suite with Optimizations
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Free Disk Space
|
||||
uses: ./.github/actions/free-disk-space
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
|
||||
version: 1.0
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
- uses: browser-actions/setup-firefox@latest
|
||||
- run: cargo test --lib --bins --tests --examples --workspace --exclude dioxus-desktop --profile release-unoptimized
|
||||
|
||||
fmt:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Rustfmt
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
with:
|
||||
components: rustfmt
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
- run: cargo fmt --all -- --check
|
||||
|
||||
schema:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Check Schema
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
- name: Generate schema
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: Rustfmt
|
||||
run: cargo fmt --all -- --check
|
||||
- name: Clippy
|
||||
run: cargo clippy --workspace --examples --tests --all-features --all-targets -- -D warnings
|
||||
- name: Check schema
|
||||
run: cargo run -p dioxus-cli -- config schema --out packages/cli/schema.json
|
||||
- name: Check for uncommitted changes
|
||||
- name: Verify schema is up to date
|
||||
run: |
|
||||
if ! git diff --exit-code packages/cli/schema.json; then
|
||||
echo "::error::Schema is out of date. Run 'dx config schema --out packages/cli/schema.json' and commit the changes."
|
||||
exit 1
|
||||
fi
|
||||
- name: Verify MSRV
|
||||
run: cargo msrv --output-format json verify -- cargo check
|
||||
- name: Find MSRV on verify failure
|
||||
if: ${{ failure() }}
|
||||
run: cargo msrv --output-format json -- cargo check
|
||||
|
||||
docs:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Docs
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Docs | Build"
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
@@ -155,6 +143,9 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: "doc --lib --all-features"
|
||||
run: |
|
||||
cargo doc --workspace --no-deps --all-features --document-private-items
|
||||
@@ -162,9 +153,10 @@ jobs:
|
||||
RUSTDOCFLAGS: -Dwarnings --document-private-items
|
||||
|
||||
test-docs:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Test Docs
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Docs | Test"
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
@@ -178,83 +170,213 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: "doc --lib --all-features"
|
||||
run: |
|
||||
cargo test --doc --workspace --all-features
|
||||
|
||||
check:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Check
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
bundle-linux-smoke:
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Bundle | Linux"
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Free Disk Space
|
||||
uses: ./.github/actions/free-disk-space
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
|
||||
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev patchelf desktop-file-utils librsvg2-dev
|
||||
version: 1.0
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
- run: cargo check --workspace --all-features --all-targets
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: Bundle hotdog as Linux packages
|
||||
working-directory: ./examples/01-app-demos/hotdog
|
||||
run: cargo run --manifest-path ../../../Cargo.toml -p dioxus-cli -- bundle --platform desktop --package-types appimage --package-types deb --package-types rpm
|
||||
- name: Verify Linux bundle outputs
|
||||
run: |
|
||||
find target -name '*.AppImage' -print
|
||||
find target -name '*.deb' -print
|
||||
find target -name '*.rpm' -print
|
||||
test -n "$(find target -name '*.AppImage' -print -quit)"
|
||||
test -n "$(find target -name '*.deb' -print -quit)"
|
||||
test -n "$(find target -name '*.rpm' -print -quit)"
|
||||
- uses: actions/upload-artifact@v6
|
||||
if: always()
|
||||
with:
|
||||
name: hotdog-linux-bundles
|
||||
path: |
|
||||
target/**/*.AppImage
|
||||
target/**/*.deb
|
||||
target/**/*.rpm
|
||||
if-no-files-found: ignore
|
||||
|
||||
clippy:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Clippy
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
bundle-macos-smoke:
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Bundle | macOS"
|
||||
runs-on: warp-macos-latest-arm64-6x
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
|
||||
version: 1.0
|
||||
- uses: dtolnay/rust-toolchain@1.90.0
|
||||
cache-all-crates: "true"
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: Bundle hotdog as macOS packages
|
||||
working-directory: ./examples/01-app-demos/hotdog
|
||||
run: cargo run --manifest-path ../../../Cargo.toml -p dioxus-cli -- bundle --platform desktop --package-types macos --package-types dmg
|
||||
- name: Verify macOS bundle outputs
|
||||
run: |
|
||||
find target -type d -name '*.app' -print
|
||||
find target -type f -name '*.dmg' -print
|
||||
test -n "$(find target -type d -name '*.app' -print -quit)"
|
||||
test -n "$(find target -type f -name '*.dmg' -print -quit)"
|
||||
- uses: actions/upload-artifact@v6
|
||||
if: always()
|
||||
with:
|
||||
name: hotdog-macos-bundles
|
||||
path: |
|
||||
target/**/*.app
|
||||
target/**/*.dmg
|
||||
if-no-files-found: ignore
|
||||
|
||||
windows-bundle-smoke:
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Bundle | Windows"
|
||||
runs-on: warp-windows-2025-x64-8x
|
||||
timeout-minutes: 45
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Setup Dev Drive
|
||||
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
|
||||
- name: Copy Repo to Dev Drive
|
||||
run: Copy-Item -Path "${{ github.workspace }}" -Destination "$env:DIOXUS_WORKSPACE" -Recurse
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@1.88.0
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "windows-bundle-${{ runner.os }}"
|
||||
cache-all-crates: "true"
|
||||
- run: cargo clippy --workspace --examples --tests --all-features --all-targets -- -D warnings
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
workspaces: ${{ env.DIOXUS_WORKSPACE }}
|
||||
- name: Bundle hotdog as Windows packages
|
||||
working-directory: ${{ env.DIOXUS_WORKSPACE }}/examples/01-app-demos/hotdog
|
||||
run: cargo run --release --manifest-path ..\..\..\Cargo.toml -p dioxus-cli -- bundle --platform desktop --package-types msi --package-types nsis
|
||||
- name: Verify Windows bundle outputs
|
||||
working-directory: ${{ env.DIOXUS_WORKSPACE }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
$msi = Get-ChildItem -Path .\target\dx -Recurse -File -Include "*.msi"
|
||||
$nsis = Get-ChildItem -Path .\target\dx -Recurse -File -Include "*-setup.exe"
|
||||
$msi | ForEach-Object { $_.FullName }
|
||||
$nsis | ForEach-Object { $_.FullName }
|
||||
if (-not $msi) { throw "Expected MSI artifact was not produced." }
|
||||
if (-not $nsis) { throw "Expected NSIS artifact was not produced." }
|
||||
- name: Target dir size by extension
|
||||
shell: pwsh
|
||||
run: |
|
||||
Get-ChildItem -Path "$env:DIOXUS_WORKSPACE\target" -Recurse -File |
|
||||
Group-Object Extension |
|
||||
Sort-Object { ($_.Group | Measure-Object Length -Sum).Sum } -Descending |
|
||||
Select-Object -First 20 @{N='Ext';E={$_.Name}}, Count, @{N='SizeMB';E={[math]::Round(($_.Group | Measure-Object Length -Sum).Sum / 1MB, 1)}} |
|
||||
Format-Table -AutoSize
|
||||
# - name: Clean Windows artifacts before cache save
|
||||
# shell: pwsh
|
||||
# run: |
|
||||
# Get-ChildItem -Path "$env:DIOXUS_WORKSPACE\target" -Recurse -Include "*.pdb","*.exe","*.dll" | Remove-Item -Force
|
||||
- uses: actions/upload-artifact@v6
|
||||
if: always()
|
||||
with:
|
||||
name: hotdog-windows-bundles-smoke
|
||||
path: |
|
||||
${{ env.DIOXUS_WORKSPACE }}/target/**/*.msi
|
||||
${{ env.DIOXUS_WORKSPACE }}/target/**/*-setup.exe
|
||||
if-no-files-found: ignore
|
||||
|
||||
nix:
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [blacksmith-4vcpu-ubuntu-2404, macos-latest]
|
||||
windows:
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Playwright | Windows"
|
||||
runs-on: warp-windows-2025-x64-8x
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: nixbuild/nix-quick-install-action@master
|
||||
- uses: nix-community/cache-nix-action@main
|
||||
- name: Setup Dev Drive
|
||||
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
|
||||
- name: Copy Repo to Dev Drive
|
||||
run: Copy-Item -Path "${{ github.workspace }}" -Destination "$env:DIOXUS_WORKSPACE" -Recurse
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
||||
restore-prefixes-first-match: nix-${{ runner.os }}-${{ runner.arch }}
|
||||
- name: Install omnix
|
||||
run: nix --accept-flake-config profile install "github:juspay/omnix"
|
||||
- name: Build all flake outputs
|
||||
run: om ci
|
||||
- name: Ensure devShell has all build deps
|
||||
run: nix develop -c cargo build -p dioxus-cli --features no-downloads
|
||||
node-version: 24
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@1.88.0
|
||||
with:
|
||||
targets: wasm32-unknown-unknown
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
workspaces: ${{ env.DIOXUS_WORKSPACE }}
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: Playwright
|
||||
working-directory: ${{ env.DIOXUS_WORKSPACE }}/packages/playwright-tests
|
||||
env:
|
||||
CARGO_INCREMENTAL: 1
|
||||
run: |
|
||||
npm ci
|
||||
npm install -D @playwright/test
|
||||
npx playwright install
|
||||
npx playwright test
|
||||
# - name: Clean Windows artifacts before cache save
|
||||
# if: always()
|
||||
# shell: pwsh
|
||||
# run: |
|
||||
# Get-ChildItem -Path "$env:DIOXUS_WORKSPACE\target" -Recurse -Include "*.pdb","*.exe","*.dll" | Remove-Item -Force
|
||||
- uses: actions/upload-artifact@v6
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report-windows
|
||||
path: ${{ env.DIOXUS_WORKSPACE }}/packages/playwright-tests/playwright-report/
|
||||
retention-days: 30
|
||||
|
||||
|
||||
playwright:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Playwright Tests
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Playwright | ${{ matrix.name }}"
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
matrix:
|
||||
os: [blacksmith-4vcpu-windows-2025, blacksmith-8vcpu-ubuntu-2404]
|
||||
platform:
|
||||
- { toolchain: beta }
|
||||
# - { toolchain: 1.86.0 }
|
||||
include:
|
||||
- { os: warp-ubuntu-latest-x64-8x, name: "Linux (stable)", toolchain: "1.88.0" }
|
||||
- { os: warp-ubuntu-latest-x64-8x, name: "Linux (beta)", toolchain: beta }
|
||||
steps:
|
||||
# Do our best to cache the toolchain and node install steps
|
||||
- uses: actions/checkout@v5
|
||||
- name: Free Disk Space
|
||||
if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'blacksmith-4vcpu-ubuntu-2404' || matrix.os == 'blacksmith-4vcpu-ubuntu-2404-arm' || matrix.os == 'blacksmith-8vcpu-ubuntu-2404' }}
|
||||
if: runner.os == 'Linux'
|
||||
uses: ./.github/actions/free-disk-space
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'blacksmith-4vcpu-ubuntu-2404' || matrix.os == 'blacksmith-4vcpu-ubuntu-2404-arm' || matrix.os == 'blacksmith-8vcpu-ubuntu-2404' }}
|
||||
if: runner.os == 'Linux'
|
||||
with:
|
||||
packages: glib-networking glib-networking-common glib-networking-services libaa1 libabsl20220623t64 libass9 libasyncns0 libavc1394-0 libavcodec60 libavfilter9 libavformat60 libavtp0 libavutil58 libblas3 libbluray2 libbs2b0 libcaca0 libcairo-script-interpreter2 libcdparanoia0 libchromaprint1 libcjson1 libcodec2-1.2 libdav1d7 libdc1394-25 libdca0 libdecor-0-0 libdirectfb-1.7-7t64 libdv4t64 libdvdnav4 libdvdread8t64 libfaad2 libflac12t64 libfluidsynth3 libfreeaptx0 libgav1-1 libgme0 libgraphene-1.0-0 libgsm1 libgssdp-1.6-0 libgstreamer-plugins-good1.0-0 libgtk-4-common libgupnp-1.6-0 libgupnp-igd-1.6-0 libhwy1t64 libiec61883-0 libimath-3-1-29t64 libinstpatch-1.0-2 libjack-jackd2-0 libjxl0.7 liblapack3 liblc3-1 libldacbt-enc2 liblilv-0-0 liblrdf0 libltc11 libmbedcrypto7t64 libmfx1 libmjpegutils-2.1-0t64 libmodplug1 libmp3lame0 libmpcdec6 libmpeg2encpp-2.1-0t64 libmpg123-0t64 libmplex2-2.1-0t64 libmysofa1 libneon27t64 libnice10 libogg0 libopenal-data libopenal1 libopenexr-3-1-30 libopenh264-7 libopenmpt0t64 libopenni2-0 liborc-0.4-0t64 libpipewire-0.3-0t64 libplacebo338 libpocketsphinx3 libpostproc57 libproxy1v5 libpulse0 libqrencode4 libraptor2-0 librav1e0 libraw1394-11 librist4 librubberband2 libsamplerate0 libsbc1 libsdl2-2.0-0 libsecret-common libserd-0-0 libshine3 libshout3 libsndfile1 libsndio7.0 libsord-0-0 libsoundtouch1 libsoup-3.0-0 libsoup-3.0-common libsoxr0 libspa-0.2-modules libspandsp2t64 libspeex1 libsphinxbase3t64 libsratom-0-0 libsrt1.5-gnutls libsrtp2-1 libssh-gcrypt-4 libsvtav1enc1d1 libswresample4 libswscale7 libtag1v5 libtag1v5-vanilla libtheora0 libtwolame0 libudfread0 libunibreak5 libv4l-0t64 libv4lconvert0t64 libva-drm2 libva-x11-2 libva2 libvdpau1 libvidstab1.1 libvisual-0.4-0 libvo-aacenc0 libvo-amrwbenc0 libvorbis0a libvorbisenc2 libvorbisfile3 libvpl2 libwavpack1 libwebrtc-audio-processing1 libwildmidi2 libx265-199 libxcb-xkb1 libxkbcommon-x11-0 libcups2t64 libxml2 libxml2-dev libxvidcore4 libyuv0 libzbar0t64 libzimg2 libzix-0-0 libzvbi-common libzvbi0t64 libzxing3 ocl-icd-libopencl1 timgm6mb-soundfont xfonts-encodings xfonts-utils binutils lld binutils-devel binutils-gold fonts-freefont-ttf fonts-ipafont-gothic fonts-tlwg-loma-otf fonts-unifont fonts-wqy-zenhei gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-good libavif16 libevent-2.1-7t64 libgstreamer-plugins-bad1.0-0 libharfbuzz-icu0 libhyphen0 libmanette-0.2-0 libsecret-1-0 libwoff1 xfonts-cyrillic xfonts-scalable fonts-ipafont-mincho fonts-tlwg-loma gstreamer1.0-x
|
||||
version: 1.0
|
||||
@@ -264,15 +386,17 @@ jobs:
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: ${{ matrix.platform.toolchain }}
|
||||
toolchain: ${{ matrix.toolchain }}
|
||||
targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "playwright-${{ matrix.platform.toolchain }}-${{ runner.os }}"
|
||||
key: "playwright-${{ matrix.toolchain }}-${{ runner.os }}"
|
||||
cache-all-crates: "true"
|
||||
cache-on-failure: "true"
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- name: Wipe dx cache
|
||||
if: ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'blacksmith-4vcpu-ubuntu-2404' || matrix.os == 'blacksmith-4vcpu-ubuntu-2404-arm' || matrix.os == 'blacksmith-8vcpu-ubuntu-2404' }}
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
rm -rf ./target/dx
|
||||
- name: Playwright
|
||||
@@ -288,13 +412,67 @@ jobs:
|
||||
- uses: actions/upload-artifact@v6
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report-${{ matrix.platform.toolchain }}-${{ runner.os }}
|
||||
name: playwright-report-${{ matrix.toolchain }}-${{ runner.os }}
|
||||
path: ./packages/playwright-tests/playwright-report/
|
||||
retention-days: 30
|
||||
|
||||
|
||||
|
||||
test:
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Test | Linux"
|
||||
runs-on: warp-ubuntu-latest-x64-8x
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Free Disk Space
|
||||
uses: ./.github/actions/free-disk-space
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
|
||||
version: 1.0
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- uses: browser-actions/setup-firefox@latest
|
||||
- run: cargo test --lib --bins --tests --examples --workspace --exclude dioxus-desktop
|
||||
|
||||
release-test:
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Test | Linux (Release)"
|
||||
runs-on: warp-ubuntu-latest-x64-8x
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Free Disk Space
|
||||
uses: ./.github/actions/free-disk-space
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
with:
|
||||
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
|
||||
version: 1.0
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
- uses: browser-actions/setup-firefox@latest
|
||||
- run: cargo test --lib --bins --tests --examples --workspace --exclude dioxus-desktop --profile release-unoptimized
|
||||
|
||||
matrix_test:
|
||||
needs: check-paths
|
||||
runs-on: ${{ matrix.platform.os }}
|
||||
if: github.event.pull_request.draft == false
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Cross | ${{ matrix.platform.target }}"
|
||||
env:
|
||||
RUST_CARGO_COMMAND: ${{ matrix.platform.cross == true && 'cross' || 'cargo' }}
|
||||
strategy:
|
||||
@@ -302,7 +480,7 @@ jobs:
|
||||
platform:
|
||||
- {
|
||||
target: aarch64-apple-darwin,
|
||||
os: macos-latest,
|
||||
os: warp-macos-latest-arm64-6x,
|
||||
toolchain: "1.88.0",
|
||||
cross: false,
|
||||
command: "test",
|
||||
@@ -311,7 +489,7 @@ jobs:
|
||||
}
|
||||
- {
|
||||
target: aarch64-apple-ios,
|
||||
os: macos-latest,
|
||||
os: warp-macos-latest-arm64-6x,
|
||||
toolchain: "1.88.0",
|
||||
cross: false,
|
||||
command: "build",
|
||||
@@ -320,7 +498,7 @@ jobs:
|
||||
}
|
||||
- {
|
||||
target: aarch64-unknown-linux-gnu,
|
||||
os: ubuntu-24.04-arm,
|
||||
os: warp-ubuntu-latest-arm64-4x,
|
||||
toolchain: "1.88.0",
|
||||
cross: false,
|
||||
command: "build",
|
||||
@@ -329,14 +507,14 @@ jobs:
|
||||
}
|
||||
- {
|
||||
target: aarch64-linux-android,
|
||||
os: blacksmith-4vcpu-ubuntu-2404,
|
||||
os: warp-ubuntu-latest-x64-4x,
|
||||
toolchain: "1.88.0",
|
||||
cross: true,
|
||||
command: "build",
|
||||
args: "--package dioxus-desktop",
|
||||
platform: "android",
|
||||
}
|
||||
# commented out because it's having issues with space on the device, but we already test it above
|
||||
# commented out because it's having issues with space on the device, but we already test it above
|
||||
# - {
|
||||
# target: x86_64-unknown-linux-gnu,
|
||||
# os: ubuntu-24.04,
|
||||
@@ -350,15 +528,31 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Free Disk Space
|
||||
if: ${{ matrix.platform.os == 'ubuntu-24.04' || matrix.platform.os == 'ubuntu-24.04-arm' || matrix.platform.os == 'blacksmith-4vcpu-ubuntu-2404' || matrix.platform.os == 'blacksmith-4vcpu-ubuntu-2404-arm' }}
|
||||
if: runner.os == 'Linux'
|
||||
uses: ./.github/actions/free-disk-space
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
if: ${{ matrix.platform.os == 'ubuntu-24.04' || matrix.platform.os == 'ubuntu-24.04-arm' || matrix.platform.os == 'blacksmith-4vcpu-ubuntu-2404' || matrix.platform.os == 'blacksmith-4vcpu-ubuntu-2404-arm' }}
|
||||
if: ${{ runner.os == 'Linux' && matrix.platform.target != 'aarch64-unknown-linux-gnu' }}
|
||||
with:
|
||||
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
|
||||
packages: pkg-config libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
|
||||
version: ${{ matrix.platform.target }}-${{ matrix.platform.os }} # disambiguate since we're in a matrix and this caching action doesn't factor in these variables
|
||||
|
||||
- name: Install Linux desktop dependencies for ARM
|
||||
if: ${{ matrix.platform.target == 'aarch64-unknown-linux-gnu' }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pkg-config libwebkit2gtk-4.1-dev libgtk-3-dev libasound2-dev libudev-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev
|
||||
|
||||
- name: Verify GLib pkg-config metadata on ARM Linux
|
||||
if: ${{ matrix.platform.target == 'aarch64-unknown-linux-gnu' }}
|
||||
run: pkg-config --modversion glib-2.0
|
||||
|
||||
- name: Configure pkg-config for ARM Linux desktop deps
|
||||
if: ${{ matrix.platform.target == 'aarch64-unknown-linux-gnu' }}
|
||||
run: |
|
||||
echo "PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig" >> "$GITHUB_ENV"
|
||||
echo "PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig" >> "$GITHUB_ENV"
|
||||
|
||||
- name: install stable
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
@@ -366,7 +560,7 @@ jobs:
|
||||
targets: ${{ matrix.platform.target }}
|
||||
components: rustfmt
|
||||
|
||||
- name: Install nasm for windows (tls)
|
||||
- name: Install nasm for windows (tls)1
|
||||
if: ${{ matrix.platform.target == 'x86_64-pc-windows-msvc' }}
|
||||
uses: ilammy/setup-nasm@v1
|
||||
|
||||
@@ -378,33 +572,45 @@ jobs:
|
||||
with:
|
||||
key: "matrix-${{ matrix.platform.target }}"
|
||||
cache-all-crates: "true"
|
||||
cache-workspace-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
# save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
${{ env.RUST_CARGO_COMMAND }} ${{ matrix.platform.command }} ${{ matrix.platform.args }} --target ${{ matrix.platform.target }}
|
||||
|
||||
# borrowed from uv
|
||||
# https://raw.githubusercontent.com/astral-sh/uv/refs/heads/main/.github/workflows/ci.yml
|
||||
cargo-test-windows:
|
||||
if: github.event.pull_request.draft == false
|
||||
runs-on:
|
||||
labels: "blacksmith-4vcpu-windows-2025"
|
||||
name: "cargo test | windows"
|
||||
nix:
|
||||
needs: check-paths
|
||||
if: github.event.pull_request.draft == false && needs.check-paths.outputs.rust == 'true'
|
||||
name: "Nix | ${{ matrix.name }}"
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- { os: warp-ubuntu-latest-x64-8x, name: Linux }
|
||||
- { os: warp-macos-latest-arm64-6x, name: macOS }
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: dtolnay/rust-toolchain@1.88.0
|
||||
- uses: nixbuild/nix-quick-install-action@master
|
||||
- uses: jkelleyrtp/cache-nix-action@jk/use-warpbuild
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: ${{ env.UV_WORKSPACE }}
|
||||
cache-all-crates: "true"
|
||||
|
||||
- name: "Install Rust toolchain"
|
||||
working-directory: ${{ env.UV_WORKSPACE }}
|
||||
run: rustup show
|
||||
|
||||
- name: "Cargo test"
|
||||
working-directory: ${{ env.UV_WORKSPACE }}
|
||||
primary-key: nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('flake.nix', 'flake.lock') }}-${{ hashFiles('Cargo.lock') }}
|
||||
restore-prefixes-first-match: |
|
||||
nix-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('flake.nix', 'flake.lock') }}-
|
||||
nix-${{ runner.os }}-${{ runner.arch }}-
|
||||
backend: warpbuild
|
||||
- name: Build dioxus-cli from the flake
|
||||
run: nix build .#dioxus-cli
|
||||
- name: Smoke test devShell
|
||||
shell: bash
|
||||
run: |
|
||||
cargo test --workspace --tests
|
||||
nix develop .#default -c bash -lc '
|
||||
cargo --version
|
||||
rustc --version
|
||||
pkg-config --modversion openssl
|
||||
if [[ "${{ runner.os }}" == "Linux" ]]; then
|
||||
pkg-config --modversion gtk+-3.0
|
||||
pkg-config --modversion webkit2gtk-4.1
|
||||
fi
|
||||
'
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
# Attempt to backport a merged pull request to the latest stable release
|
||||
backport:
|
||||
name: Backport pull request
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
|
||||
# Don't run on closed unmerged pull requests, or pull requests with the "breaking" label
|
||||
if: github.event.pull_request.merged && !contains(github.event.pull_request.labels.*.name, 'breaking')
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
# Upload nightly docs to the website
|
||||
docs:
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
@@ -47,6 +47,7 @@ jobs:
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-all-crates: "true"
|
||||
cache-provider: "warpbuild"
|
||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
- name: cargo doc
|
||||
|
||||
@@ -22,7 +22,7 @@ permissions:
|
||||
|
||||
jobs:
|
||||
promote:
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
runs-on: warp-ubuntu-latest-x64-4x
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Publish the next pre-release
|
||||
|
||||
@@ -84,11 +84,21 @@ jobs:
|
||||
uses: ./.github/actions/free-disk-space
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
if: ${{ matrix.platform.os == 'ubuntu-24.04' || matrix.platform.os == 'ubuntu-24.04-arm' }}
|
||||
if: ${{ matrix.platform.os == 'ubuntu-24.04' }}
|
||||
with:
|
||||
packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev musl-tools
|
||||
packages: pkg-config libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev musl-tools
|
||||
version: 1.0
|
||||
|
||||
- name: Install Linux desktop dependencies for ARM
|
||||
if: ${{ matrix.platform.os == 'ubuntu-24.04-arm' }}
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pkg-config libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev libglib2.0-dev musl-tools
|
||||
|
||||
- name: Verify GLib pkg-config metadata on ARM Linux
|
||||
if: ${{ matrix.platform.os == 'ubuntu-24.04-arm' }}
|
||||
run: pkg-config --modversion glib-2.0
|
||||
|
||||
- name: Install stable
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
|
||||
@@ -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
|
||||
@@ -1,42 +0,0 @@
|
||||
# Whenever an open PR is updated, the workflow will be triggered
|
||||
|
||||
name: Language Linting
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
typos:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Check for typos
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Check for typos
|
||||
uses: crate-ci/typos@master
|
||||
|
||||
# Check for invalid links in the repository
|
||||
link-check:
|
||||
if: github.event.pull_request.draft == false
|
||||
name: Check For Invalid Links
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- name: Restore lychee cache
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: .lycheecache
|
||||
key: cache-lychee-${{ github.sha }}
|
||||
restore-keys: cache-lychee-
|
||||
- name: Run lychee
|
||||
uses: lycheeverse/lychee-action@v2
|
||||
with:
|
||||
args: --config ./lychee.toml './**/*.md'
|
||||
fail: true
|
||||
Reference in new issue
Block a user