Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 77 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ concurrency:

env:
CARGO_BUILD_JOBS: '6'
BINARYEN_CORES: '6'
BINARYEN_CORES: '2'
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: '0'
RUSTC_WRAPPER: sccache
SCCACHE_DIR: ${{ github.workspace }}/.sccache
SCCACHE_CACHE_SIZE: 512M
SCCACHE_IGNORE_SERVER_IO_ERROR: '1'

jobs:
security:
Expand Down Expand Up @@ -46,7 +51,6 @@ jobs:

quality:
name: Rust quality
needs: security
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
Expand All @@ -60,18 +64,23 @@ jobs:
toolchain: '1.98.0'
components: rustfmt, clippy
targets: wasm32-unknown-unknown
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
with:
key: quality-static
cache-on-failure: true
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Validate registry manifests
run: python3 scripts/release.py check
- name: Run source, formatting, Clippy, Wasm, and public API checks
run: ./scripts/check-quality-static.sh

semver:
name: Public API
needs: security
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
Expand All @@ -81,18 +90,29 @@ jobs:
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
toolchain: '1.98.0'
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- name: Install Linux build dependencies
run: ./scripts/install-linux-ci.sh
- uses: taiki-e/install-action@3f74d7c16a4242f1c95561e98edc25d36adb4375 # v2
with:
tool: cargo-semver-checks@0.49.0
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
with:
key: semver
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Compare publishable APIs with crates.io
run: cargo semver-checks check-release --workspace --release-type minor
# A registry baseline does not exist for argui-testing until its first release.
run: >-
cargo semver-checks check-release --workspace
--exclude argui-testing
--release-type major

coverage:
name: Rust coverage
needs: security
runs-on: ubuntu-24.04
timeout-minutes: 90
env:
Expand All @@ -115,6 +135,9 @@ jobs:
toolchain: '1.98.0'
components: rustfmt, clippy
targets: wasm32-unknown-unknown
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- name: Install pinned coverage toolchain
run: rustup toolchain install "$ARGUI_COVERAGE_TOOLCHAIN" --profile minimal --component llvm-tools-preview
- uses: taiki-e/install-action@3f74d7c16a4242f1c95561e98edc25d36adb4375 # v2
Expand All @@ -124,6 +147,9 @@ jobs:
with:
key: quality
cache-on-failure: true
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Validate registry manifests
run: python3 scripts/release.py check
- name: Run the 85% coverage gate on a private display
Expand All @@ -141,7 +167,6 @@ jobs:

desktop:
name: Desktop compile (${{ matrix.name }})
needs: security
strategy:
fail-fast: false
matrix:
Expand All @@ -161,15 +186,20 @@ jobs:
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
toolchain: '1.98.0'
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
with:
key: desktop-${{ matrix.cache }}
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Compile the complete workspace
run: cargo check --workspace --all-targets --all-features --locked

mobile:
name: Mobile cross-check
needs: security
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
Expand All @@ -180,9 +210,15 @@ jobs:
with:
toolchain: '1.98.0'
targets: aarch64-linux-android,aarch64-apple-ios
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
with:
key: mobile-cross-check
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Check every supported Android capability and gallery entry point
run: |
cargo check --locked --target aarch64-linux-android -p argui -p argui-android \
Expand All @@ -196,7 +232,7 @@ jobs:

android-package:
name: Android APK and AAB
needs: [security, mobile]
needs: mobile
runs-on: ubuntu-24.04
timeout-minutes: 90
steps:
Expand All @@ -207,6 +243,9 @@ jobs:
with:
toolchain: '1.98.0'
targets: aarch64-linux-android
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- uses: taiki-e/install-action@3f74d7c16a4242f1c95561e98edc25d36adb4375 # v2
with:
tool: cargo-ndk@4.1.2
Expand All @@ -217,8 +256,10 @@ jobs:
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
with:
key: android-package
cache-workspace-crates: true
cache-on-failure: true
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Configure the pinned Gradle wrapper and cache
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
with:
Expand Down Expand Up @@ -246,7 +287,6 @@ jobs:

ios-package:
name: iOS XCFramework and Simulator app
needs: security
runs-on: macos-15
timeout-minutes: 90
steps:
Expand All @@ -257,11 +297,16 @@ jobs:
with:
toolchain: '1.98.0'
targets: aarch64-apple-ios,aarch64-apple-ios-sim,x86_64-apple-ios
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
with:
key: ios-package
cache-workspace-crates: true
cache-on-failure: true
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Build the XCFramework and unsigned Simulator app
run: |
./scripts/ios-widget-gallery.sh all
Expand All @@ -286,7 +331,6 @@ jobs:

packages:
name: Crates.io archives
needs: security
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
Expand All @@ -298,21 +342,25 @@ jobs:
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
toolchain: '1.98.0'
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
with:
shared-key: linux-distribution
add-job-id-key: false
cache-workspace-crates: true
key: packages
cache-on-failure: true
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Package and compile every publishable crate archive
run: python3 scripts/release.py package

website:
name: Website
needs: security
runs-on: ubuntu-24.04
timeout-minutes: 45
env:
ARGUI_WASM_BUILD_CONCURRENCY: '2'
NUXT_APP_BASE_URL: /argui/
NUXT_PUBLIC_SITE_URL: https://extrabinoss.github.io/argui
steps:
Expand All @@ -331,12 +379,18 @@ jobs:
with:
toolchain: '1.98.0'
targets: wasm32-unknown-unknown
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- uses: taiki-e/install-action@3f74d7c16a4242f1c95561e98edc25d36adb4375 # v2
with:
tool: wasm-pack@0.15.0
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
with:
key: website-wasm
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install website dependencies
run: pnpm --dir website install --frozen-lockfile
- name: Check the website
Expand Down Expand Up @@ -398,13 +452,17 @@ jobs:
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
toolchain: '1.98.0'
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
with:
version: v0.16.0
- name: Install native build dependencies
run: ./scripts/install-linux-ci.sh
- uses: Swatinem/rust-cache@49a0bdc70d2e1b713ca9e2869b211fcce03d3c1c # v2
with:
shared-key: linux-distribution
add-job-id-key: false
cache-workspace-crates: true
key: release
cache-targets: false
cache-directories: ${{ env.SCCACHE_DIR }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Check the version and publish missing crates
env:
PUBLISH_BASE: ${{ github.event.before }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ public func arguiIOSActivityUpdate(
guard #available(iOS 16.1, *) else {
return 0
}
ArguiActivityBridge.update(identifier: identifier, percent: percent, message: messageText)
return ArguiActivityBridge.update(
identifier: identifier,
percent: percent,
message: messageText
)
}
}

Expand All @@ -109,7 +113,7 @@ public func arguiIOSActivityFinish(_ identifier: UInt64) -> Int32 {
guard #available(iOS 16.1, *) else {
return 0
}
ArguiActivityBridge.finish(identifier: identifier)
return ArguiActivityBridge.finish(identifier: identifier)
}
}

Expand Down
9 changes: 6 additions & 3 deletions crates/argui-runtime/tests/launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ mod native {
}
self.issued = phase;
eprintln!("native lifecycle command {phase}");
if phase < 8 {
if phase < 6 {
self.timer = Some(self.data.update(|_, cx| {
cx.spawn(
async {
Expand All @@ -230,7 +230,7 @@ mod native {
}));
}
#[cfg(all(feature = "webview", target_os = "linux"))]
if phase == 6 {
if phase == 5 {
crate::gtk_input::send();
}
let auxiliary = WindowKey::new("auxiliary");
Expand Down Expand Up @@ -266,6 +266,9 @@ mod native {
window: WindowKey::main(),
maximized: phase == 3,
}),
6 => update
.command(AppCommand::FocusWindow(WindowKey::new("auxiliary")))
.command(AppCommand::Quit),
_ => update,
}
}
Expand Down Expand Up @@ -437,7 +440,7 @@ mod native {
)
.unwrap();
assert!(errors.borrow().is_empty(), "{:?}", errors.borrow());
assert_eq!(data.read(|data| data.phase), 8);
assert_eq!(data.read(|data| data.phase), 6);
#[cfg(all(feature = "webview", target_os = "linux"))]
animation.assert_smooth();
assert!(
Expand Down
20 changes: 15 additions & 5 deletions docs/contributing/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@

The [CI workflow](../../.github/workflows/ci.yml) runs independent jobs for
security, static Rust quality, public API/SemVer compatibility, Rust coverage,
desktop targets, mobile targets, package archives, and the website. Keeping static checks and instrumented
coverage separate gives each expensive build its own timeout without weakening
the local combined gate. GitHub Pages depends only on the website job. Crate
publication waits for every required job.
desktop targets, mobile targets, package archives, and the website. Keeping
static checks and instrumented coverage separate gives each expensive build its
own timeout without weakening the local combined gate. Independent jobs start
immediately; GitHub Pages waits for both security and the website, while crate
publication waits for every required job. Rust jobs use `sccache` for compiler
outputs and cache Cargo's registry separately instead of uploading complete
`target/` directories.

The public API job compares every previously published crate with its latest
crates.io release. A new crate without a registry baseline is explicitly
excluded until its first release; currently this applies only to
`argui-testing`.

## Prepare a version

Expand All @@ -22,7 +30,9 @@ python3 scripts/release.py package
`check` rejects mismatched or invalid manifests. `package` computes the
dependency order from Cargo metadata, creates every archive without resolving
older published workspace versions, and then compiles each extracted archive
against the previously staged 0.3 sources.
against the previously staged 0.3 sources. Packaging and verification use
temporary target directories, so this command never cleans or pollutes a target
directory shared with an editor or another worktree.

Review the generated diff and run the final
[quality gate](code-quality.md#final-gate). The final commit on the push must
Expand Down
Loading
Loading