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
9 changes: 7 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,20 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-14, windows-2022]
feature-args: ['', '-Funstable-mobile-app']
include:
- os: ubuntu-24.04
display-os: Linux
- os: macos-14
display-os: macOS
- os: windows-2022
display-os: Windows
- feature-args: ''
feature-suffix: ''
- feature-args: '-Funstable-mobile-app'
feature-suffix: ' (-Funstable-mobile-app)'

name: ${{ matrix.display-os }}
name: ${{ matrix.display-os }}${{ matrix.feature-suffix }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
Expand All @@ -40,4 +45,4 @@ jobs:
run: cargo fmt --all -- --check

- name: Run Clippy
run: cargo clippy --workspace --tests
run: cargo clippy --workspace --tests ${{ matrix.feature-args }}
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,20 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-14, windows-2022]
feature-args: ['', '-Funstable-mobile-app']
include:
- os: ubuntu-24.04
display-os: Linux
- os: macos-14
display-os: macOS
- os: windows-2022
display-os: Windows
- feature-args: ''
feature-suffix: ''
- feature-args: '-Funstable-mobile-app'
feature-suffix: ' (-Funstable-mobile-app)'

name: ${{ matrix.display-os }}
name: ${{ matrix.display-os }}${{ matrix.feature-suffix }}
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -35,4 +40,4 @@ jobs:
uses: swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # 2.8.0

- name: Run Cargo Tests
run: cargo test --workspace
run: cargo test --workspace ${{ matrix.feature-args }}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"rust-analyzer.cargo.features": ["unstable-mobile-app"],
"rust-analyzer.cargo.noDefaultFeatures": false
}
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ rust-version = "1.86"
[dependencies]
anylog = "0.6.3"
anyhow = { version = "1.0.69", features = ["backtrace"] }
apple-catalog-parsing = { path = "apple-catalog-parsing", optional = true }
backoff = "0.4.0"
brotli2 = "0.3.2"
bytecount = "0.6.3"
Expand Down Expand Up @@ -93,6 +94,10 @@ default = []
managed = []
with_crash_reporting = []

# Feature flag for the mobile-app command, as it is still under development.
# CI tests run against this flag, but we don't include it in release builds.
unstable-mobile-app = ["apple-catalog-parsing"]

[workspace.lints.clippy]
allow-attributes = "warn"
str-to-string = "warn"
Expand All @@ -111,7 +116,6 @@ workspace = true

[target."cfg(target_os = \"macos\")".dependencies]
mac-process-info = "0.2.0"
apple-catalog-parsing = { path = "apple-catalog-parsing"}

[target."cfg(unix)"]

Expand Down
1 change: 1 addition & 0 deletions src/api/data_types/chunking/mobile_app.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![cfg(feature = "unstable-mobile-app")]
use serde::{Deserialize, Serialize};
use sha1_smol::Digest;

Expand Down
1 change: 1 addition & 0 deletions src/api/data_types/chunking/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ pub use self::compression::ChunkCompression;
pub use self::dif::{AssembleDifsRequest, AssembleDifsResponse, ChunkedDifRequest};
pub use self::file_state::ChunkedFileState;
pub use self::hash_algorithm::ChunkHashAlgorithm;
#[cfg(feature = "unstable-mobile-app")]
pub use self::mobile_app::{AssembleMobileAppResponse, ChunkedMobileAppRequest};
pub use self::upload::{ChunkServerOptions, ChunkUploadCapability};
1 change: 1 addition & 0 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,7 @@ impl<'a> AuthenticatedApi<'a> {
.convert_rnf(ApiErrorKind::ReleaseNotFound)
}

#[cfg(feature = "unstable-mobile-app")]
pub fn assemble_mobile_app(
&self,
org: &str,
Expand Down
2 changes: 2 additions & 0 deletions src/commands/mobile_app/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(feature = "unstable-mobile-app")]

use anyhow::Result;
use clap::{ArgMatches, Command};

Expand Down
1 change: 1 addition & 0 deletions src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ macro_rules! each_subcommand {
$mac!(info);
$mac!(issues);
$mac!(login);
#[cfg(feature = "unstable-mobile-app")]
$mac!(mobile_app);
$mac!(monitors);
$mac!(organizations);
Expand Down
2 changes: 2 additions & 0 deletions src/utils/mobile_app/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(feature = "unstable-mobile-app")]

#[cfg(target_os = "macos")]
mod apple;
mod validation;
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/mobile_app/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(feature = "unstable-mobile-app")]

use crate::integration::TestManager;

mod upload;
Expand Down
Loading