M12 — the Android client, end to end #2
@@ -77,13 +77,21 @@ jobs:
|
|||||||
# of silently re-resolving. Everything after it in this job then compiles the
|
# of silently re-resolving. Everything after it in this job then compiles the
|
||||||
# exact versions recorded in the lockfile, so the flag isn't repeated on the
|
# exact versions recorded in the lockfile, so the flag isn't repeated on the
|
||||||
# bundle build (issue 2102).
|
# bundle build (issue 2102).
|
||||||
|
#
|
||||||
|
# Run from the REPO ROOT with --workspace, not from desktop/src-tauri.
|
||||||
|
#
|
||||||
|
# These three steps used to run inside the desktop crate, which was right when
|
||||||
|
# it was the only Rust in the repo. After the core was extracted (M12 step 1)
|
||||||
|
# it silently stopped being right: cargo scoped to the desktop PACKAGE, so the
|
||||||
|
# core's 89 tests stopped running and nothing lints the Android uniffi shim at
|
||||||
|
# all. Both crates are dependencies of the desktop, so they still COMPILED —
|
||||||
|
# which is exactly why the gap was invisible, and why a green run kept meaning
|
||||||
|
# less than it looked like it meant.
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
run: cargo clippy --locked --all-targets -- -D warnings
|
run: cargo clippy --locked --workspace --all-targets -- -D warnings
|
||||||
working-directory: desktop/src-tauri
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: cargo test --locked
|
run: cargo test --locked --workspace
|
||||||
working-directory: desktop/src-tauri
|
|
||||||
|
|
||||||
# Deliberately AFTER clippy + test, not before.
|
# Deliberately AFTER clippy + test, not before.
|
||||||
#
|
#
|
||||||
@@ -94,8 +102,7 @@ jobs:
|
|||||||
# means every push reports its real problems too. Still before the ~20-40 min
|
# means every push reports its real problems too. Still before the ~20-40 min
|
||||||
# bundle build, so a fmt failure doesn't burn that.
|
# bundle build, so a fmt failure doesn't burn that.
|
||||||
- name: Rust format check
|
- name: Rust format check
|
||||||
run: cargo fmt --check
|
run: cargo fmt --all --check
|
||||||
working-directory: desktop/src-tauri
|
|
||||||
|
|
||||||
# Frontend already built above; skip the beforeBuildCommand rebuild.
|
# Frontend already built above; skip the beforeBuildCommand rebuild.
|
||||||
#
|
#
|
||||||
|
|||||||
+20
-4
@@ -85,9 +85,17 @@ backend/frontend push.
|
|||||||
`container.image`; `runs-on: python-ci` is only a scheduling label.
|
`container.image`; `runs-on: python-ci` is only a scheduling label.
|
||||||
- **Steps:** build the shared frontend (embedded by `generate_context!`) →
|
- **Steps:** build the shared frontend (embedded by `generate_context!`) →
|
||||||
`cargo tauri icon app-icon.png` (platform icon set from the committed 1024px
|
`cargo tauri icon app-icon.png` (platform icon set from the committed 1024px
|
||||||
source) → `cargo fmt --check` → `cargo clippy -D warnings` → `cargo test` →
|
source) → `cargo clippy --workspace -D warnings` → `cargo test --workspace` →
|
||||||
`cargo tauri build` (produces `.deb` + `.AppImage`) → de-bundle the AppImage's
|
`cargo fmt --all --check` → `cargo tauri build` (produces `.deb` + `.AppImage`)
|
||||||
graphics libs → verify the `.deb` → repackage for pacman.
|
→ de-bundle the AppImage's graphics libs → verify the `.deb` → repackage for
|
||||||
|
pacman.
|
||||||
|
- **The three analyzer steps run from the REPO ROOT with `--workspace`**, not
|
||||||
|
from `desktop/src-tauri`. Scoping them to the desktop package was correct while
|
||||||
|
it was the only Rust here; after the core was extracted it silently stopped
|
||||||
|
being — the core's 89 tests stopped running, and a fourth crate would not be
|
||||||
|
linted at all. The dependency crates still COMPILE either way, which is exactly
|
||||||
|
why the gap is invisible from a green run. If you add a workspace member, check
|
||||||
|
that it appears in the `cargo test` output before believing the lane covers it.
|
||||||
- **`APPIMAGE_EXTRACT_AND_RUN=1`** is set: AppImage tooling FUSE-mounts by default
|
- **`APPIMAGE_EXTRACT_AND_RUN=1`** is set: AppImage tooling FUSE-mounts by default
|
||||||
and CI containers have no `/dev/fuse`.
|
and CI containers have no `/dev/fuse`.
|
||||||
- **Packaging tools used from the image** (none installed at job time, rule 5):
|
- **Packaging tools used from the image** (none installed at job time, rule 5):
|
||||||
@@ -223,9 +231,17 @@ above, and resolution is neither a test run nor a build:
|
|||||||
```
|
```
|
||||||
docker run --rm --user "$(id -u):$(id -g)" -e CARGO_HOME=/tmp/cargo \
|
docker run --rm --user "$(id -u):$(id -g)" -e CARGO_HOME=/tmp/cargo \
|
||||||
-v "$PWD:/w" -w /w \
|
-v "$PWD:/w" -w /w \
|
||||||
git.fabledsword.com/bvandeusen/ci-tauri:1.97 cargo generate-lockfile
|
git.fabledsword.com/bvandeusen/ci-tauri:1.97 cargo fetch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**`cargo fetch`, not `cargo generate-lockfile`.** Both update the lockfile, but
|
||||||
|
generate-lockfile re-resolves the whole graph from scratch and will happily bump
|
||||||
|
crates that have nothing to do with your change — turning a two-line manifest
|
||||||
|
edit into a few-hundred-line lockfile diff nobody can review. `cargo fetch`
|
||||||
|
performs the minimal resolution: existing pins are preserved, only the new
|
||||||
|
entries are added. Verify it stayed additive before committing (`git diff
|
||||||
|
Cargo.lock | grep '^-'` should show nothing but re-ordered dependency lists).
|
||||||
|
|
||||||
Resolving inside the CI image rather than against some other cargo is what keeps
|
Resolving inside the CI image rather than against some other cargo is what keeps
|
||||||
the lockfile format and the picked versions identical to what CI would have
|
the lockfile format and the picked versions identical to what CI would have
|
||||||
chosen. Commit the result in the same change as the `Cargo.toml` edit — a
|
chosen. Commit the result in the same change as the `Cargo.toml` edit — a
|
||||||
|
|||||||
Reference in New Issue
Block a user