|
@@ -37,7 +37,7 @@ concurrency:
|
|
|
|
|
|
env:
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_TERM_COLOR: always
|
|
- CARGO_INCREMENTAL: "1"
|
|
|
|
|
|
+ CARGO_INCREMENTAL: 0 # todo(jon): cargo-cache wipes incremental artifacts, but we eventually want to cache them
|
|
RUST_BACKTRACE: 1
|
|
RUST_BACKTRACE: 1
|
|
rust_nightly: nightly-2024-10-20
|
|
rust_nightly: nightly-2024-10-20
|
|
|
|
|
|
@@ -48,11 +48,10 @@ jobs:
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/checkout@v4
|
|
- - uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
+ - uses: dtolnay/rust-toolchain@1.79.0
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
with:
|
|
cache-all-crates: "true"
|
|
cache-all-crates: "true"
|
|
- cache-on-failure: "true"
|
|
|
|
# https://github.com/foresterre/cargo-msrv/blob/4345edfe3f4fc91cc8ae6c7d6804c0748fae92ae/.github/workflows/msrv.yml
|
|
# https://github.com/foresterre/cargo-msrv/blob/4345edfe3f4fc91cc8ae6c7d6804c0748fae92ae/.github/workflows/msrv.yml
|
|
- name: install_cargo_msrv
|
|
- name: install_cargo_msrv
|
|
run: cargo install cargo-msrv --all-features
|
|
run: cargo install cargo-msrv --all-features
|
|
@@ -78,15 +77,14 @@ jobs:
|
|
swap-storage: false
|
|
swap-storage: false
|
|
- run: sudo apt-get update
|
|
- run: sudo apt-get update
|
|
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
|
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
|
- - uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
+ - uses: dtolnay/rust-toolchain@1.79.0
|
|
|
|
+ with:
|
|
|
|
+ components: rustfmt, clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
with:
|
|
cache-all-crates: "true"
|
|
cache-all-crates: "true"
|
|
- cache-on-failure: "true"
|
|
|
|
- - uses: davidB/rust-cargo-make@v1
|
|
|
|
- uses: browser-actions/setup-firefox@latest
|
|
- uses: browser-actions/setup-firefox@latest
|
|
- - uses: jetli/wasm-pack-action@v0.4.0
|
|
|
|
- - run: cargo make tests
|
|
|
|
|
|
+ - run: cargo test --lib --bins --tests --examples --workspace --exclude dioxus-desktop --exclude dioxus-mobile
|
|
|
|
|
|
release-test:
|
|
release-test:
|
|
if: github.event.pull_request.draft == false
|
|
if: github.event.pull_request.draft == false
|
|
@@ -94,23 +92,22 @@ jobs:
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/checkout@v4
|
|
- - run: sudo apt-get update
|
|
|
|
- - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
|
|
|
- - uses: dtolnay/rust-toolchain@stable
|
|
|
|
- - uses: Swatinem/rust-cache@v2
|
|
|
|
- with:
|
|
|
|
- cache-all-crates: "true"
|
|
|
|
- cache-on-failure: "true"
|
|
|
|
- - uses: davidB/rust-cargo-make@v1
|
|
|
|
- - uses: browser-actions/setup-firefox@latest
|
|
|
|
- - uses: jetli/wasm-pack-action@v0.4.0
|
|
|
|
- name: Free Disk Space (Ubuntu)
|
|
- name: Free Disk Space (Ubuntu)
|
|
uses: jlumbroso/free-disk-space@v1.3.1
|
|
uses: jlumbroso/free-disk-space@v1.3.1
|
|
with: # speed things up a bit
|
|
with: # speed things up a bit
|
|
large-packages: false
|
|
large-packages: false
|
|
docker-images: false
|
|
docker-images: false
|
|
swap-storage: false
|
|
swap-storage: false
|
|
- - run: cargo test --profile release-unoptimized --lib --bins --tests --examples --workspace --exclude dioxus-desktop --exclude dioxus-mobile
|
|
|
|
|
|
+ - run: sudo apt-get update
|
|
|
|
+ - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
|
|
|
+ - uses: dtolnay/rust-toolchain@1.79.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 --exclude dioxus-mobile --profile release-unoptimized
|
|
|
|
|
|
fmt:
|
|
fmt:
|
|
if: github.event.pull_request.draft == false
|
|
if: github.event.pull_request.draft == false
|
|
@@ -118,13 +115,12 @@ jobs:
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/checkout@v4
|
|
- - uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
+ - uses: dtolnay/rust-toolchain@1.79.0
|
|
with:
|
|
with:
|
|
components: rustfmt
|
|
components: rustfmt
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
with:
|
|
cache-all-crates: "true"
|
|
cache-all-crates: "true"
|
|
- cache-on-failure: "true"
|
|
|
|
- run: cargo fmt --all -- --check
|
|
- run: cargo fmt --all -- --check
|
|
|
|
|
|
typos:
|
|
typos:
|
|
@@ -151,7 +147,6 @@ jobs:
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
with:
|
|
cache-all-crates: "true"
|
|
cache-all-crates: "true"
|
|
- cache-on-failure: "true"
|
|
|
|
- name: "doc --lib --all-features"
|
|
- name: "doc --lib --all-features"
|
|
run: |
|
|
run: |
|
|
cargo doc --workspace --no-deps --all-features --document-private-items
|
|
cargo doc --workspace --no-deps --all-features --document-private-items
|
|
@@ -189,11 +184,10 @@ jobs:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/checkout@v4
|
|
- run: sudo apt-get update
|
|
- run: sudo apt-get update
|
|
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
|
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev
|
|
- - uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
+ - uses: dtolnay/rust-toolchain@1.79.0
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
with:
|
|
cache-all-crates: "true"
|
|
cache-all-crates: "true"
|
|
- cache-on-failure: "true"
|
|
|
|
- run: cargo check --workspace --all-features --all-targets
|
|
- run: cargo check --workspace --all-features --all-targets
|
|
|
|
|
|
clippy:
|
|
clippy:
|
|
@@ -204,13 +198,12 @@ jobs:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/checkout@v4
|
|
- run: sudo apt-get update
|
|
- run: sudo apt-get update
|
|
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
|
|
- run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
|
|
- - uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
+ - uses: dtolnay/rust-toolchain@1.79.0
|
|
with:
|
|
with:
|
|
components: rustfmt, clippy
|
|
components: rustfmt, clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
with:
|
|
cache-all-crates: "true"
|
|
cache-all-crates: "true"
|
|
- cache-on-failure: "true"
|
|
|
|
- run: cargo clippy --workspace --examples --tests --all-features --all-targets -- -D warnings
|
|
- run: cargo clippy --workspace --examples --tests --all-features --all-targets -- -D warnings
|
|
|
|
|
|
nix:
|
|
nix:
|
|
@@ -237,6 +230,12 @@ jobs:
|
|
steps:
|
|
steps:
|
|
# Do our best to cache the toolchain and node install steps
|
|
# Do our best to cache the toolchain and node install steps
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/checkout@v4
|
|
|
|
+ - name: Free Disk Space (Ubuntu)
|
|
|
|
+ uses: jlumbroso/free-disk-space@v1.3.1
|
|
|
|
+ with: # speed things up a bit
|
|
|
|
+ large-packages: false
|
|
|
|
+ docker-images: false
|
|
|
|
+ swap-storage: false
|
|
- uses: actions/setup-node@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
with:
|
|
node-version: 16
|
|
node-version: 16
|
|
@@ -248,13 +247,9 @@ jobs:
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
with:
|
|
cache-all-crates: "true"
|
|
cache-all-crates: "true"
|
|
- cache-on-failure: "true"
|
|
|
|
- - name: Free Disk Space (Ubuntu)
|
|
|
|
- uses: jlumbroso/free-disk-space@v1.3.1
|
|
|
|
- with: # speed things up a bit
|
|
|
|
- large-packages: false
|
|
|
|
- docker-images: false
|
|
|
|
- swap-storage: false
|
|
|
|
|
|
+ - name: Prebuild CLI
|
|
|
|
+ run: |
|
|
|
|
+ cargo build --package dioxus-cli --release
|
|
- name: Playwright
|
|
- name: Playwright
|
|
working-directory: ./packages/playwright-tests
|
|
working-directory: ./packages/playwright-tests
|
|
run: |
|
|
run: |
|
|
@@ -277,14 +272,6 @@ jobs:
|
|
strategy:
|
|
strategy:
|
|
matrix:
|
|
matrix:
|
|
platform:
|
|
platform:
|
|
- - {
|
|
|
|
- target: x86_64-pc-windows-msvc,
|
|
|
|
- os: windows-latest,
|
|
|
|
- toolchain: "1.79.0",
|
|
|
|
- cross: false,
|
|
|
|
- command: "test",
|
|
|
|
- args: "--all --tests",
|
|
|
|
- }
|
|
|
|
- {
|
|
- {
|
|
target: aarch64-apple-darwin,
|
|
target: aarch64-apple-darwin,
|
|
os: macos-latest,
|
|
os: macos-latest,
|
|
@@ -340,19 +327,51 @@ jobs:
|
|
|
|
|
|
- name: Install cross
|
|
- name: Install cross
|
|
if: ${{ matrix.platform.cross == true }}
|
|
if: ${{ matrix.platform.cross == true }}
|
|
-
|
|
|
|
uses: taiki-e/install-action@cross
|
|
uses: taiki-e/install-action@cross
|
|
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
with:
|
|
key: "matrix-${{ matrix.platform.target }}"
|
|
key: "matrix-${{ matrix.platform.target }}"
|
|
cache-all-crates: "true"
|
|
cache-all-crates: "true"
|
|
- cache-on-failure: "true"
|
|
|
|
|
|
|
|
- name: test
|
|
- name: test
|
|
run: |
|
|
run: |
|
|
${{ env.RUST_CARGO_COMMAND }} ${{ matrix.platform.command }} ${{ matrix.platform.args }} --target ${{ matrix.platform.target }}
|
|
${{ 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: "windows-latest"
|
|
|
|
+ name: "cargo test | windows"
|
|
|
|
+ steps:
|
|
|
|
+ - uses: actions/checkout@v4
|
|
|
|
+ - name: Create Dev Drive using ReFS
|
|
|
|
+ run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1
|
|
|
|
+
|
|
|
|
+ # actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
|
|
|
|
+ - name: Copy Git Repo to Dev Drive
|
|
|
|
+ run: |
|
|
|
|
+ Copy-Item -Path "${{ github.workspace }}" -Destination "${{ env.UV_WORKSPACE }}" -Recurse
|
|
|
|
+
|
|
|
|
+ - uses: dtolnay/rust-toolchain@1.79.0
|
|
|
|
+ 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 }}
|
|
|
|
+ run: |
|
|
|
|
+ cargo test --workspace --tests
|
|
|
|
+
|
|
# Only run semver checks if the PR is not a draft and does not have the breaking label
|
|
# Only run semver checks if the PR is not a draft and does not have the breaking label
|
|
# Breaking PRs don't need to follow semver since they are breaking changes
|
|
# Breaking PRs don't need to follow semver since they are breaking changes
|
|
# However, this means we won't attempt to backport them, so you should be careful about using this label, as it will
|
|
# However, this means we won't attempt to backport them, so you should be careful about using this label, as it will
|
|
@@ -369,7 +388,7 @@ jobs:
|
|
# runs-on: ubuntu-latest
|
|
# runs-on: ubuntu-latest
|
|
# steps:
|
|
# steps:
|
|
# - uses: actions/checkout@v4
|
|
# - uses: actions/checkout@v4
|
|
- # - uses: dtolnay/rust-toolchain@stable
|
|
|
|
|
|
+ # - uses: dtolnay/rust-toolchain@1.79.0
|
|
# - uses: Swatinem/rust-cache@v2
|
|
# - uses: Swatinem/rust-cache@v2
|
|
# with:
|
|
# with:
|
|
# cache-all-crates: "true"
|
|
# cache-all-crates: "true"
|