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
24 changes: 8 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,10 @@ jobs:
run: cargo clippy --workspace --all-targets --locked -- -D warnings

test-linux:
name: Tests / Linux / shard ${{ matrix.shard }}/4
name: Tests / Linux
needs: build-tests-linux
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v7.0.1
- uses: taiki-e/install-action@v2.85.13
Expand All @@ -240,27 +236,23 @@ jobs:
- uses: actions/download-artifact@v8.0.1
with:
name: nextest-linux-${{ github.sha }}
- name: Run archived test shard
run: cargo-nextest nextest run -P ci --archive-file nextest-linux.tar.zst --workspace-remap "${{ github.workspace }}" --partition "hash:${{ matrix.shard }}/4"
- name: Run archived workspace tests
run: cargo-nextest nextest run -P ci --archive-file nextest-linux.tar.zst --workspace-remap "${{ github.workspace }}"
- name: Upload JUnit report
if: always()
uses: actions/upload-artifact@v7.0.1
with:
name: junit-linux-${{ matrix.shard }}-${{ github.sha }}
name: junit-linux-${{ github.sha }}
path: target/nextest/ci/junit.xml
if-no-files-found: ignore
overwrite: true
retention-days: 7

test-windows:
name: Tests / Windows / shard ${{ matrix.shard }}/4
name: Tests / Windows
needs: build-tests-windows
runs-on: windows-2025
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v7.0.1
- uses: taiki-e/install-action@v2.85.13
Expand All @@ -269,13 +261,13 @@ jobs:
- uses: actions/download-artifact@v8.0.1
with:
name: nextest-windows-${{ github.sha }}
- name: Run archived test shard
run: cargo-nextest nextest run -P ci --archive-file nextest-windows.tar.zst --workspace-remap "${{ github.workspace }}" --partition "hash:${{ matrix.shard }}/4"
- name: Run archived workspace tests
run: cargo-nextest nextest run -P ci --archive-file nextest-windows.tar.zst --workspace-remap "${{ github.workspace }}"
- name: Upload JUnit report
if: always()
uses: actions/upload-artifact@v7.0.1
with:
name: junit-windows-${{ matrix.shard }}-${{ github.sha }}
name: junit-windows-${{ github.sha }}
path: target/nextest/ci/junit.xml
if-no-files-found: ignore
overwrite: true
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Shared APIs must expose domain semantics, not frontend mechanics.
3. Represent dependent work as one DAG batch where practical, including VFS work through `extra_tasks`.
4. Avoid duplicated runner branches. Build conditional task lists, then run the shared runner once.
5. `verify --repair --relink-reuse` requires an effective reuse source. This can be an explicit `--reuse-from` path or another compatible `--path` in the same batch.
6. `verify` must retain `--skip-vfs` parity with install and update flows.
6. `verify --scope core` must preserve the core-only resource scope of `install/update --resources package-only`.
7. Reuse policy:
- the normal install/update game-file ensure flow and VFS sync use `prefer_reuse = false`;
- explicit relink mode may use `prefer_reuse = true`.
Expand Down
77 changes: 1 addition & 76 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions crates/griffr-cli/src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ pub use install::install;
pub use launch::launch;
pub use news::show as news_show;
pub use predownload::{
apply as predownload_apply, check as predownload_check, fetch as predownload_fetch,
resume as predownload_resume,
check as predownload_check, fetch as predownload_fetch, resume as predownload_resume,
};
pub use setup_persistent_resources::setup_persistent_resources;
pub use uninstall::uninstall;
Expand Down
16 changes: 0 additions & 16 deletions crates/griffr-cli/src/commands/predownload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,22 +280,6 @@ pub async fn fetch(
Ok(())
}

pub async fn apply(
path: PathBuf,
overrides: crate::InstallTargetOverrideArgs,
output_dir: Option<PathBuf>,
patch_options: griffr_runtime::PatchApplyOptions,
opts: GlobalOptions,
) -> Result<()> {
if let Some(output_dir) = output_dir.as_ref() {
ui::print_info(format!(
"Using explicit stage directory: {}",
output_dir.display()
));
}
super::update::apply_staged_predownload(path, overrides, output_dir, patch_options, opts).await
}

pub async fn resume(path: PathBuf, opts: GlobalOptions) -> Result<()> {
let local = detect_local_install(&path).await?;
let game_id = local.require_known_game()?;
Expand Down
1 change: 0 additions & 1 deletion crates/griffr-cli/src/commands/update/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ use archives::*;
use manifest_update::*;
use package_selection::*;
use post_update::*;
pub(crate) use run::apply_staged_predownload;
pub use run::update;
2 changes: 1 addition & 1 deletion crates/griffr-cli/src/commands/update/post_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fn run_extra_tasks_without_integrity(
.with_download(download_lane);
let result = task_pool_runner
.run_batch(extra_tasks, task_progress)
.context("Failed to run extra DAG tasks during skip-verify")?;
.context("Failed to run extra DAG tasks during deferred verification")?;
progress_session.finish();
progress.finish();

Expand Down
49 changes: 7 additions & 42 deletions crates/griffr-cli/src/commands/update/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ pub(super) async fn update_internal(
));
return Ok(());
}
crate::commands::predownload::resume(local.install_path.clone(), opts).await?;
crate::commands::predownload::resume(local.install_path.clone(), opts.clone())
.await?;
local = detect_local_install(&path).await?;
resumed_pending_patch = true;
}
Expand Down Expand Up @@ -427,18 +428,7 @@ pub(super) async fn update_internal(
let package_kind = archive_kind.unwrap_or(ArchivePackageKind::Full);
let predownload_stage_dir =
if !use_manifest_update && use_predownload && package_kind == ArchivePackageKind::Patch {
Some(
recovery_stage_dir
.or(predownload_dir_override)
.unwrap_or_else(|| {
crate::commands::predownload::stage_dir_for_request(
&local.install_path,
&version_info,
&package_request_version,
&version_info.version,
)
}),
)
recovery_stage_dir.or(predownload_dir_override)
} else {
None
};
Expand Down Expand Up @@ -779,7 +769,6 @@ pub async fn update(
force_copy: bool,
stage_dir: Option<PathBuf>,
require_staged: bool,
use_default_stage: bool,
batch: crate::BatchArgs,
patch_options: griffr_runtime::PatchApplyOptions,
opts: GlobalOptions,
Expand Down Expand Up @@ -886,11 +875,11 @@ pub async fn update(
item.explicit_reuse,
item.peer_reuse,
force_copy,
use_default_stage || stage_dir.is_some(),
stage_dir.is_some(),
patch_options.clone(),
stage_dir.clone(),
require_staged,
opts,
opts.clone(),
)
.await;
if let Err(error) = result {
Expand All @@ -915,6 +904,7 @@ pub async fn update(
parallel_jobs,
|item| &item.volume_keys,
|item| {
let opts = opts.clone();
let api_client = api_client.clone();
let runner_group = runner_group.clone();
let runner_config = runner_config.clone();
Expand All @@ -933,7 +923,7 @@ pub async fn update(
item.explicit_reuse,
item.peer_reuse,
force_copy,
use_default_stage || stage_dir.is_some(),
stage_dir.is_some(),
patch_options,
stage_dir,
require_staged,
Expand Down Expand Up @@ -965,28 +955,3 @@ pub async fn update(
Err(crate::commands::batch::batch_error("Update", &failures))
}
}

pub(crate) async fn apply_staged_predownload(
path: PathBuf,
overrides: crate::InstallTargetOverrideArgs,
predownload_dir_override: Option<PathBuf>,
patch_options: griffr_runtime::PatchApplyOptions,
opts: GlobalOptions,
) -> Result<()> {
let mut task_pool_runner = TaskPoolRunner::new(opts.task_pool_config())?;
update_internal(
None,
&mut task_pool_runner,
path,
overrides,
Vec::new(),
Vec::new(),
false,
true,
patch_options,
predownload_dir_override,
true,
opts,
)
.await
}
1 change: 1 addition & 0 deletions crates/griffr-cli/src/commands/update/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fn test_global_options() -> GlobalOptions {
volume_streaming_mode: griffr_runtime::task_pool::DEFAULT_VOLUME_STREAMING_MODE,
reuse_queue_limit: griffr_runtime::task_pool::DEFAULT_REUSE_QUEUE_LIMIT,
output: OutputFormat::Text,
workload_capture: None,
}
}
mod archives;
Expand Down
3 changes: 2 additions & 1 deletion crates/griffr-cli/src/commands/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ pub async fn verify(
force_copy,
relink_reuse,
scope,
opts,
opts.clone(),
)
.await
{
Expand Down Expand Up @@ -866,6 +866,7 @@ pub async fn verify(
parallel_jobs,
|item| &item.volume_keys,
|item| {
let opts = opts.clone();
let api_client = api_client.clone();
let runner_group = runner_group.clone();
let runner_config = runner_config.clone();
Expand Down
Loading
Loading