build: add reproducible macOS, Windows and wasm cross-check scripts
The non-Linux code paths can only be compile-checked on this machine; agents had used ad-hoc wrapper setups. These scripts make the checks reproducible and are wired into `just check-macos`, `check-windows`, `check-wasm` and `check-all`: - macos-crosscheck.sh: zig cc wrappers (dropping -arch/-mmacosx- version-min) plus a declaration-only os/log.h stub so the few C build scripts compile; clippy -D warnings on all 17 cross-platform crates for aarch64/x86_64-apple-darwin. - windows-crosscheck.sh: mingw toolchain and a stub fontconfig.pc; clippy -D warnings for x86_64-pc-windows-gnu. - wasm-check.sh: wasm32 clippy/build and the node-based wasm tests. Also fixes a needless_pass_by_value lint in osbytes' non-Unix branch that only the Windows check surfaces. Test Plan: - just check-macos; just check-macos x86_64-apple-darwin - just check-windows; just check-wasm
This commit is contained in:
1 parent
a9f3856b15
commit
231ee35ea9
5 files changed
+120
-7
No files matched your search
@@ -28,11 +28,11 @@ fix: _fix fmt
|
||||
# Build libghostty-vt (C ABI, include/ghostty/vt.h) as target/<profile>/libghostty-vt.{so,a}
|
||||
# and, if the target is installed, target/wasm32-unknown-unknown/<profile>/ghostty-vt.wasm.
|
||||
vt-lib profile="release":
|
||||
cargo build -p ghostty-vt-capi --profile {{profile}}
|
||||
cp target/{{profile}}/libghostty_vt_capi.so target/{{profile}}/libghostty-vt.so
|
||||
cp target/{{profile}}/libghostty_vt_capi.a target/{{profile}}/libghostty-vt.a
|
||||
cargo build -p ghostty-vt-capi --profile {{profile}} --target wasm32-unknown-unknown
|
||||
cp target/wasm32-unknown-unknown/{{profile}}/ghostty_vt_capi.wasm target/wasm32-unknown-unknown/{{profile}}/ghostty-vt.wasm
|
||||
cargo build -p ghostty-vt-capi --profile {{ profile }}
|
||||
cp target/{{ profile }}/libghostty_vt_capi.so target/{{ profile }}/libghostty-vt.so
|
||||
cp target/{{ profile }}/libghostty_vt_capi.a target/{{ profile }}/libghostty-vt.a
|
||||
cargo build -p ghostty-vt-capi --profile {{ profile }} --target wasm32-unknown-unknown
|
||||
cp target/wasm32-unknown-unknown/{{ profile }}/ghostty_vt_capi.wasm target/wasm32-unknown-unknown/{{ profile }}/ghostty-vt.wasm
|
||||
|
||||
# Run the libghostty-vt ABI check and the C/wasm example tests.
|
||||
vt-test:
|
||||
@@ -107,7 +107,7 @@ locales OUT="target/locale":
|
||||
# (dev, release) installs the "-debug" application id
|
||||
# (com.mitchellh.ghostty-debug, "Ghostty (Debug)"), which is
|
||||
# the id the binary uses at runtime when built with debug
|
||||
# assertions.
|
||||
# assertions.
|
||||
install PREFIX="/usr/local" FLATPAK="false" SYSTEM_PACKAGE="false" PROFILE="production": build-data docs locales
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
@@ -253,3 +253,20 @@ dist:
|
||||
# `zig build distcheck`).
|
||||
distcheck: dist
|
||||
scripts/dist.sh --check
|
||||
|
||||
# Compile-check (clippy -D warnings) the macOS code paths from Linux.
|
||||
check-macos target="aarch64-apple-darwin":
|
||||
scripts/macos-crosscheck.sh clippy {{ target }}
|
||||
|
||||
# Compile-check (clippy -D warnings) the Windows code paths from Linux.
|
||||
check-windows:
|
||||
scripts/windows-crosscheck.sh
|
||||
|
||||
# Build, lint and test the wasm32 targets.
|
||||
check-wasm:
|
||||
scripts/wasm-check.sh
|
||||
|
||||
# Everything: native gate plus all cross-platform checks.
|
||||
check-all: clippy test check-wasm check-windows
|
||||
scripts/macos-crosscheck.sh clippy aarch64-apple-darwin
|
||||
scripts/macos-crosscheck.sh clippy x86_64-apple-darwin
|
||||
Reference in new issue
Block a user