ci: the artifact is the debug build, so the gate stays as fast as it was
ci / gate (push) Successful in 16m34s
ci / gate (push) Successful in 16m34s
The release-profile build added to the gate in 9757f90 would have
recompiled the workspace for minutes on every push (and looked for a
binary name plain cargo does not produce). The operator asked for what
already exists: `tauri build --debug --no-bundle` reuses everything
`cargo test` compiled (21 s locally), embeds the webview the gate built
rather than pointing at a dev server, and the binary is stripped of
debug info, 93 MB instead of 498. Checked: the stripped binary, run on
its own with no dev server, serves its page from tauri://localhost.
Refs #87
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NUx7SPonBnB3ofU4mH41WT
This commit is contained in:
+19
-13
@@ -96,25 +96,31 @@ jobs:
|
||||
# means an entities change was committed without its TypeScript.
|
||||
run: git diff --exit-code -- ui/src/api/generated
|
||||
|
||||
- name: release binary
|
||||
# The bare binary, as the release workflow builds it, so a change
|
||||
# can be tried on a machine before any release is cut (#87). It
|
||||
# embeds the webview built by the gate above (tauri.conf.json's
|
||||
# frontendDist), and it wants the GTK/WebKitGTK libraries the rpm
|
||||
# depends on. Last, so a red gate uploads nothing to mistake for
|
||||
- name: debug binary
|
||||
# The app as a bare binary, so a change can be tried on a machine
|
||||
# before any release is cut (#87). The dev profile, which reuses
|
||||
# everything `cargo test` just compiled, so this costs seconds, not
|
||||
# the release profile's minutes; `tauri build` (not plain `cargo
|
||||
# build`) so the webview the gate built is embedded rather than
|
||||
# loaded from a dev server. It wants the GTK/WebKitGTK libraries the
|
||||
# rpm depends on. Last, so a red gate uploads nothing to mistake for
|
||||
# tested.
|
||||
working-directory: crates/wallet-app
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cargo build --locked --release -p wallet-app
|
||||
mkdir -p artifact
|
||||
install -m 0755 target/release/blackbeard-wallet \
|
||||
"artifact/blackbeard-wallet-${GITHUB_SHA::7}-x86_64-linux-gnu"
|
||||
(cd artifact && sha256sum * > SHA256SUMS)
|
||||
ls -l artifact
|
||||
pnpm dlx @tauri-apps/cli@2.11.4 build --debug --no-bundle
|
||||
mkdir -p ../../artifact
|
||||
install -m 0755 ../../target/debug/blackbeard-wallet \
|
||||
"../../artifact/blackbeard-wallet-${GITHUB_SHA::7}-x86_64-linux-gnu-debug"
|
||||
# Debug info is four fifths of the file (498 MB against 93 MB
|
||||
# stripped) and nothing a test on another machine uses.
|
||||
strip --strip-debug ../../artifact/blackbeard-wallet-*
|
||||
(cd ../../artifact && sha256sum * > SHA256SUMS)
|
||||
ls -l ../../artifact
|
||||
|
||||
- name: upload the binary
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: blackbeard-wallet-${{ github.sha }}-x86_64-linux-gnu
|
||||
name: blackbeard-wallet-${{ github.sha }}-x86_64-linux-gnu-debug
|
||||
path: artifact/
|
||||
retention-days: 7
|
||||
|
||||
@@ -68,9 +68,11 @@ cargo test --workspace # also regenerates
|
||||
|
||||
The CI gate is `cargo fmt --check`, `cargo clippy -D warnings`, `cargo test`,
|
||||
and the webview's typecheck, lint and build. Run them before claiming done.
|
||||
A green gate on `main` also uploads the release binary as a run artifact
|
||||
(`blackbeard-wallet-<sha>-x86_64-linux-gnu`, kept seven days), so a change can
|
||||
be tried on a machine before a release is cut.
|
||||
A green gate on `main` also uploads a debug build of the app as a run artifact
|
||||
(`blackbeard-wallet-<sha>-x86_64-linux-gnu-debug`, kept seven days), so a
|
||||
change can be tried on a machine before a release is cut. It is the dev
|
||||
profile, so slower than a release, and it needs the GTK/WebKitGTK libraries
|
||||
the rpm depends on.
|
||||
|
||||
## Work
|
||||
|
||||
|
||||
Reference in New Issue
Block a user