Compare commits

..
Author SHA1 Message Date
bflatastic 75ef59fc6a Tests: home tests wait for recent files to be looked at
Since recent files became cards, a card shows its name only after its
reader thread has looked at the file. The home tests drew a fixed 12
frames, which a slow CI machine can finish first (seen on CI).
2026-10-15 02:10:04 +07:00
4 changed files with 11 additions and 13 deletions

No files matched your search

-2
View File
@@ -29,7 +29,6 @@ concurrency:
jobs:
test:
timeout-minutes: 35
name: test (ubuntu-latest)
runs-on: ubuntu-latest
steps:
@@ -70,7 +69,6 @@ jobs:
run: cargo run --locked -q -p xtask -- assets
wasm:
timeout-minutes: 30
name: wasm32 check
runs-on: ubuntu-latest
steps:
-1
View File
@@ -19,7 +19,6 @@ concurrency:
jobs:
lint:
timeout-minutes: 15
runs-on: ubuntu-latest
env:
ACTIONLINT_VERSION: 1.7.12
-9
View File
@@ -41,7 +41,6 @@ env:
jobs:
version:
timeout-minutes: 10
name: version
runs-on: ubuntu-latest
# No `environment: release`: this job reads no secrets, so a branch dry run can run it.
@@ -70,7 +69,6 @@ jobs:
echo "### FigCraft v$v (\`${GITHUB_SHA::9}\`)" >>"$GITHUB_STEP_SUMMARY"
macos:
timeout-minutes: 90
name: macOS universal
needs: version
runs-on: macos-15-xlarge # M2 Pro larger runner; use only in release.yml (actions_macos_xl budget caps spend)
@@ -129,7 +127,6 @@ jobs:
if [ -n "${MACOS_KEYCHAIN:-}" ]; then security delete-keychain "$MACOS_KEYCHAIN" || true; fi
windows:
timeout-minutes: 90
name: Windows ${{ matrix.arch }}
needs: version
runs-on: windows-latest
@@ -190,7 +187,6 @@ jobs:
if-no-files-found: error
linux:
timeout-minutes: 90
name: Linux ${{ matrix.arch }}
needs: version
# The oldest GitHub-hosted image, so the binaries only need glibc >= 2.35 (Ubuntu 22.04+,
@@ -256,7 +252,6 @@ jobs:
if-no-files-found: error
server:
timeout-minutes: 90
name: Server Linux ${{ matrix.arch }}
needs: version
# The headless collaboration server (docs/server.md): figcraft-server-<v>-linux-<arch>.tar.gz
@@ -300,7 +295,6 @@ jobs:
if-no-files-found: error
flatpak:
timeout-minutes: 90
name: Flatpak ${{ matrix.arch }}
needs: [version, linux]
# Repackages the Linux job's tarball (the same binaries as the AppImage/deb/rpm); no Rust
@@ -394,7 +388,6 @@ jobs:
if-no-files-found: error
web:
timeout-minutes: 90
name: Web (wasm)
needs: version
runs-on: ubuntu-latest
@@ -440,7 +433,6 @@ jobs:
if-no-files-found: error
linux-riscv64:
timeout-minutes: 90
name: Linux riscv64
needs: version
# Cross-compiled on x86_64 (no hosted RISC-V runners) against the runner's own Ubuntu release
@@ -510,7 +502,6 @@ jobs:
if-no-files-found: error
release:
timeout-minutes: 10
name: Draft GitHub Release
needs: [version, macos, windows, linux, linux-riscv64, flatpak, freebsd, web, server]
runs-on: ubuntu-latest
+11 -1
View File
@@ -22,11 +22,21 @@ fn shapes(u: &mut Ui) -> Vec<Shape> {
flat(&u.frame_output(vec![]).shapes)
}
/// Enough frames for every thumbnail in view (they render one a frame) and what follows a click.
/// Enough frames for every thumbnail in view (they render one a frame) and what follows a click,
/// and until every recent file has been looked at (by a thread of its own: a slow machine takes
/// more than a few frames, and a card shows its name only then).
fn settle(u: &mut Ui) -> Vec<Shape> {
for _ in 0..12 {
u.frame(vec![]);
}
for _ in 0..400 {
let files = u.app.inspect()["homeRecents"]["files"].as_array().cloned().unwrap_or_default();
if files.iter().all(|f| !f["exists"].is_null()) {
break;
}
std::thread::sleep(std::time::Duration::from_millis(5));
u.frame(vec![]);
}
shapes(u)
}