* initial version * make custom permission work without const-vec change * wiring up with cli * yey symbol found * wip * holy moly * proper ui * cleanup * okay * wip cleanup * reduce boilerplate code into mobile-core * Delete copilot-instructions.md * revert hello-world example for low diff * fix android build in mobile-core * rename permission to static_permission * small success with popup location on android * android popup working * Refactor permission checks for readability Improves code formatting in has_location_permission and check_permission functions by splitting long lines and updating function signatures for better readability. No functional changes were made. * wip consolidate all java files and build from cli instead of build.rs * few cli cleanups * wip java_plugin macro * cleanup cleanup cleanup * Update java_plugin macro to use full relative file paths The java_plugin macro now accepts full relative paths for Java files instead of assuming a fixed directory structure. Documentation and usage examples have been updated to reflect this change, improving flexibility and clarity for specifying file locations. * Improve iOS geolocation permission and retrieval logic Added checks for authorization status before requesting location permissions and retrieving location data. Now only requests permission if not determined, and attempts to retrieve cached location before starting location updates, improving efficiency and user experience. * Add ios_plugin macro for iOS framework metadata Introduces the ios_plugin! macro in mobile-core-macro for declarative iOS framework metadata embedding. Updates mobile-core to re-export the macro and refactors mobile-geolocation to use ios_plugin! instead of manual linker attributes. * not needed * simplify the plugin * rename mobile-core to platform-bridge and mobile-core-macro to platform-bridge-macro * Refactor metadata serialization buffer initialization Replaces inline creation of ConstVec with a named EMPTY constant for buffer initialization in metadata serialization. This improves code clarity and maintainability. * mobile-geolocation out of dioxus * take the example also out of dioxus * remove example from cargo toml * remove demo css * revert hello-world example * revert mac.plist * revert gitignore * Remove basic usage example for permissions crate Deleted the basic_usage.rs example file from the permissions crate. This change may be part of a cleanup or refactoring to remove outdated or unnecessary example code. * Delete plan.md * remove dups * cleanup java build * cleanup permission symbol extraction * update todo * small slop of tested permissions in enums for minimum diff * Refactor symbol extraction into linker_symbols module Moved generic symbol extraction logic from android_java.rs and permissions.rs into a new linker_symbols.rs module. Updated both files to use the shared utilities for finding symbol offsets, reducing code duplication and improving maintainability. * wip consolidate ios and macos as darwin * Add docs and re-export for MainThreadCell and MainThreadMarker Expanded documentation for MainThreadCell, clarifying usage and safety. Changed visibility of MainThreadCell to public, improved method docs, and re-exported MainThreadMarker in darwin/mod.rs for easier access. * Update Darwin framework symbol and section names Changed the framework symbol prefix from '__DARWIN_FRAMEWORK__' to '__DARWIN_FW__' and updated the Mach-O section name from '__darwin_framework' to '__darwin_fw' for compliance with section name length limits and consistency. * Fix Info.plist path handling for iOS and macOS Adds comments and corrects the path to Info.plist for iOS and macOS app bundles. For iOS, Info.plist is at the root of the .app bundle, while for macOS it is inside Contents/. Also improves warning message to include the missing path. * Handle missing permission symbols and web bundle case Improves permission extraction by returning an empty manifest when no permission symbols are found or when building a web bundle, as permissions are runtime-only in that case. Adds debug logging for missing symbols and ensures robust handling of these scenarios. * objc2 over framework * windows, linux, web all permissions are runtime so cleanup * only include permissions for build time * cleanup unnecessary test * more cleanup * extract shared into dx-macro-helpers * rc.3 to 0.7.0 for const-serialize * Add CustomPermissionBuilder and enhance PermissionBuilder for better permission management - Introduced `CustomPermissionBuilder` for creating custom permissions with platform-specific identifiers. - Enhanced `PermissionBuilder` to support custom permissions and location permissions with a clear builder pattern. - Updated documentation and examples in the macro README to reflect new usage patterns for custom and location permissions. - Improved parsing logic in the macro to handle both builder and direct construction patterns for permissions. * clippy fixes * implement const cbor encoding + decoding for basic types * Add #[used] attribute to linker sections for optimization protection - Added #[used] attribute to linker sections in both permission and Android plugin macros to prevent the linker from optimizing away symbols, ensuring they are preserved even if unused. - Created static references to linker sections to enhance defense-in-depth against optimization issues. * implement map encoding and decoding * fix map test * wip unified linker symbol * cleanup permissions * pipe java sources with manganis as well * all tests passing * dynamically sized arrays * smaller str encoding * swap array and list and add more documentation * move serialization and deserialization for each struct together * support both legacy and new assets * bump const serialize version * fix asset conversion code * pull out manganis symbol struct from tuble * test reading old asset versions * more list/array cleanup and bump rust version * fix clippy * Revert "pipe java sources with manganis as well" This reverts commit ddea9a459d9ac26f3f037a74d9ae0de3edfced67. * Revert "cleanup permissions" This reverts commit 7b18500155237403e179f0783cb8903a4f158b80. * Revert "wip unified linker symbol" This reverts commit 813e33feddb30d26868f6ac6e6da318402ac138f. * Revert "Add #[used] attribute to linker sections for optimization protection" This reverts commit a94a7a3a5e8eee80060de9d66a53aabfcf554f96. * update cargo lock * wip permission through assets * abit cleanup * fix reexports * fix assets * Fix the permissions piping * some small cleanups * checkout const-serialize as per #4932 and fix build * invoking swift as a package * geolocation package & example dumping for easy testing * keep geolocation simple for testing * cleanups * pipe everything through __ASSETS__ and cleanup * remove linker_symbols helper file * example * re example * copy build methos into mobile-plugin-build crate * Add conditional import for dioxus_07 feature Introduces a conditional import to use the dioxus_07 crate when the corresponding feature is enabled, improving compatibility with different dioxus versions. * Improve error handling and JNI reference usage Adds a null check for Objective-C instance initialization in the iOS geolocation plugin to prevent errors on failed allocation. Refactors Android callback to use local JNI references instead of creating unnecessary global references, reducing potential memory leaks. * revert changes on playwright * Update dioxus dependency to 0.7.2 in Cargo.lock Removed dioxus 0.7.1 from dependencies, retaining only dioxus 0.7.2 for the dioxus-cli-optimization-test package. * small cleanup * Add legacy const-serialize 0.7 support to dx-macro-helpers Introduces support for the const-serialize 0.7 format in dx-macro-helpers by adding a new dependency and export, as well as a helper function for serialization with layout padding. Updates manganis to use the new helper for serializing assets in the legacy format, simplifying code and improving maintainability. * Add helper for legacy and current linker sections Introduces generate_link_sections_with_legacy in dx-macro-helpers to emit both legacy and current linker sections for compatibility. Refactors manganis-macro to use this new helper, reducing duplication and improving maintainability. * Fix lints * Fix clippy and doctest * Refactor asset bundling and allow large enum variant Refactored Asset::bundled to use Vec<u8> instead of ConstVec for reading volatile slices, simplifying the code and improving compatibility. Added #[allow(clippy::large_enum_variant)] to SymbolData enum to suppress Clippy warnings about large enum variants. * Update license URLs in README to use angle brackets Changed license URLs in the README from parentheses to angle brackets for improved formatting and clarity. * Fix asset deserialization with correct buffer type Replaces the use of `bytes.read()` with `ConstReadBuffer::new(bytes.as_ref())` for asset deserialization, ensuring compatibility with the expected deserialization API. * Refactor geolocation and asset handling for clarity Removed unnecessary clones in geolocation example event handlers to simplify state management. Updated SymbolDataOrAsset to store SymbolData in a Box for improved memory handling and adjusted related logic. Fixed documentation example in geolocation lib to include PermissionState in the import. * Update geolocation example and permissions usage docs Removes unused variables in the geolocation example's App function. Updates the permissions crate documentation to reflect new API usage with PermissionBuilder and LocationPrecision. * Update permissions-macro to use permissions crate Switched imports and dev-dependency from permissions_core to permissions in permissions-macro. Updated documentation and examples to reflect the new crate usage. * rollback const-serialize changes * move items around (doesn't compile) * convert gelocation plugin to example * remove dx-macro-helpers * we're just gonna full-send linker everything * rollback desktop changes * remove gradle * fix most compile? * fix dioxus vers * small cleanups * add claude design docs * add ffi macro * remove * loads but not linking yet * fix output leak * a little bit closer but not quite * improve android code gen * sheeeeee works!!! * small tweaks to demo * replace ios/android plugin with ffi macro entirely * simplify ffi module * simplify again * condense / rip out some stuff from manganis * remove types form public api * wip, permissions * oops I broke it * I unbroke it * move arch doc * remove extra manifest types * drop bindgen file * remove permission * small cleanup * remove unsafecall mtm thing * yoink perms * wire up manifest * Add deeplinks * add schema generation * update schema * wip.... * fix recurse limit schema generation * wip, muck around with schema * add inline dioxus.toml support * merge bundle config schemas * claude my man * Remove cdecl, annotate ffi * rename design docs * wip: live activities * wip: apple plugin bundling * wip * get live activities linking properly * small cleanups * remove sidecars * remove widget * yoink legacy * cleanup * more fixups * wire up more things to dioxus.toml * fix workspace join * final cleanups * fmt * final bit of clippy * ci tweak * update schema * fmt, doc * update schema docs --------- Co-authored-by: Evan Almloff <evanalmloff@gmail.com> Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
411 lines
17 KiB
YAML
411 lines
17 KiB
YAML
# 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
|
|
|
|
name: Rust 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:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: 0 # todo(jon): cargo-cache wipes incremental artifacts, but we eventually want to cache them
|
|
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
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@1.88.0
|
|
- uses: Swatinem/rust-cache@v2
|
|
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
|
|
|
|
test:
|
|
if: github.event.pull_request.draft == false
|
|
name: Test Suite
|
|
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
|
|
|
|
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
|
|
run: cargo run -p dioxus-cli -- config schema --out packages/cli/schema.json
|
|
- name: Check for uncommitted changes
|
|
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
|
|
|
|
docs:
|
|
if: github.event.pull_request.draft == false
|
|
name: Docs
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- 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
|
|
- name: Install Rust ${{ env.rust_nightly }}
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
toolchain: ${{ env.rust_nightly }}
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-all-crates: "true"
|
|
- name: "doc --lib --all-features"
|
|
run: |
|
|
cargo doc --workspace --no-deps --all-features --document-private-items
|
|
env:
|
|
RUSTDOCFLAGS: -Dwarnings --document-private-items
|
|
|
|
test-docs:
|
|
if: github.event.pull_request.draft == false
|
|
name: Test Docs
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- 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
|
|
- name: Install Rust ${{ env.rust_nightly }}
|
|
uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
toolchain: ${{ env.rust_nightly }}
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-all-crates: "true"
|
|
- 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
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- 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: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-all-crates: "true"
|
|
- run: cargo check --workspace --all-features --all-targets
|
|
|
|
clippy:
|
|
if: github.event.pull_request.draft == false
|
|
name: Clippy
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- 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.90.0
|
|
with:
|
|
components: rustfmt, clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-all-crates: "true"
|
|
- run: cargo clippy --workspace --examples --tests --all-features --all-targets -- -D warnings
|
|
|
|
nix:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [blacksmith-4vcpu-ubuntu-2404, macos-latest]
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: nixbuild/nix-quick-install-action@master
|
|
- uses: nix-community/cache-nix-action@main
|
|
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
|
|
|
|
playwright:
|
|
if: github.event.pull_request.draft == false
|
|
name: Playwright Tests
|
|
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 }
|
|
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' }}
|
|
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' }}
|
|
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
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ matrix.platform.toolchain }}
|
|
targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: "playwright-${{ matrix.platform.toolchain }}-${{ runner.os }}"
|
|
cache-all-crates: "true"
|
|
cache-on-failure: "true"
|
|
- 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' }}
|
|
run: |
|
|
rm -rf ./target/dx
|
|
- name: Playwright
|
|
working-directory: ./packages/playwright-tests
|
|
env:
|
|
# The hot patch test requires incremental compilation
|
|
CARGO_INCREMENTAL: 1
|
|
run: |
|
|
npm ci
|
|
npm install -D @playwright/test
|
|
npx playwright install
|
|
npx playwright test
|
|
- uses: actions/upload-artifact@v6
|
|
if: always()
|
|
with:
|
|
name: playwright-report-${{ matrix.platform.toolchain }}-${{ runner.os }}
|
|
path: ./packages/playwright-tests/playwright-report/
|
|
retention-days: 30
|
|
|
|
matrix_test:
|
|
runs-on: ${{ matrix.platform.os }}
|
|
if: github.event.pull_request.draft == false
|
|
env:
|
|
RUST_CARGO_COMMAND: ${{ matrix.platform.cross == true && 'cross' || 'cargo' }}
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- {
|
|
target: aarch64-apple-darwin,
|
|
os: macos-latest,
|
|
toolchain: "1.88.0",
|
|
cross: false,
|
|
command: "test",
|
|
args: "--all --tests",
|
|
platform: "desktop",
|
|
}
|
|
- {
|
|
target: aarch64-apple-ios,
|
|
os: macos-latest,
|
|
toolchain: "1.88.0",
|
|
cross: false,
|
|
command: "build",
|
|
args: "--package dioxus-desktop",
|
|
platform: "ios",
|
|
}
|
|
- {
|
|
target: aarch64-unknown-linux-gnu,
|
|
os: ubuntu-24.04-arm,
|
|
toolchain: "1.88.0",
|
|
cross: false,
|
|
command: "build",
|
|
args: "--all --tests",
|
|
platform: "desktop",
|
|
}
|
|
- {
|
|
target: aarch64-linux-android,
|
|
os: blacksmith-4vcpu-ubuntu-2404,
|
|
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
|
|
# - {
|
|
# target: x86_64-unknown-linux-gnu,
|
|
# os: ubuntu-24.04,
|
|
# toolchain: "1.88.0",
|
|
# cross: false,
|
|
# command: "build",
|
|
# args: "--all --tests",
|
|
# platform: "desktop",
|
|
# }
|
|
|
|
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' }}
|
|
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' }}
|
|
with:
|
|
packages: 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 stable
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: ${{ matrix.platform.toolchain }}
|
|
targets: ${{ matrix.platform.target }}
|
|
components: rustfmt
|
|
|
|
- name: Install nasm for windows (tls)
|
|
if: ${{ matrix.platform.target == 'x86_64-pc-windows-msvc' }}
|
|
uses: ilammy/setup-nasm@v1
|
|
|
|
- name: Install cross
|
|
if: ${{ matrix.platform.cross == true }}
|
|
uses: taiki-e/install-action@cross
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: "matrix-${{ matrix.platform.target }}"
|
|
cache-all-crates: "true"
|
|
|
|
- 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"
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: dtolnay/rust-toolchain@1.88.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
|