Skip to content

Commit 6c37ae1

Browse files
authored
Merge pull request #12 from kexi/chore/drop-intel-macos-and-readme-scanning
fix: drop unreliable macOS Intel release target; refresh README scanning docs
2 parents b52d5a7 + bf0dffc commit 6c37ae1

3 files changed

Lines changed: 48 additions & 27 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ jobs:
9898
runner: ubuntu-latest
9999
os_name: Linux
100100
arch_name: aarch64
101-
# macOS Intel: uname -s = Darwin, uname -m = x86_64. Native on macos-13.
102-
- target: x86_64-apple-darwin
103-
runner: macos-13
104-
os_name: Darwin
105-
arch_name: x86_64
106101
# Apple Silicon: uname -m = arm64 (NOT aarch64), even though the Rust
107102
# triple is aarch64-apple-darwin. The archive must be named `arm64` to
108103
# match what action.yml's `uname -m` produces on Apple Silicon runners.
104+
#
105+
# No macOS Intel (x86_64-apple-darwin) target: GitHub's macos-13 Intel
106+
# runners are unreliably scheduled (queued indefinitely), which blocked
107+
# the whole release. Intel Macs fall back to `cargo install` in the
108+
# composite action instead. Re-add a `- target: x86_64-apple-darwin`
109+
# entry (and the UNAME_PAIRS row in the contract test) if a dependable
110+
# Intel runner returns.
109111
- target: aarch64-apple-darwin
110112
runner: macos-14
111113
os_name: Darwin
@@ -215,10 +217,7 @@ jobs:
215217
runner: ubuntu-latest
216218
os_name: Linux
217219
arch_name: aarch64
218-
- target: x86_64-apple-darwin
219-
runner: macos-13
220-
os_name: Darwin
221-
arch_name: x86_64
220+
# No macOS Intel target — see the upload-assets matrix for why.
222221
- target: aarch64-apple-darwin
223222
runner: macos-14
224223
os_name: Darwin

README.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ nix develop
4242
cargo build --release
4343
```
4444

45+
The dev shell also provides a [`just`](https://github.com/casey/just) task
46+
runner — run `just` to list recipes (`just build`, `just test`, `just lint`,
47+
`just dogfood`, `just ci`, …).
48+
4549
## Quick start
4650

4751
```sh
@@ -546,7 +550,7 @@ the GitHub Release matching the runner's OS/arch (fast: a tarball download, no
546550
compilation), and falls back to `cargo install --git` from source when no
547551
prebuilt asset exists for that platform. The release automation
548552
([`.github/workflows/release.yml`](.github/workflows/release.yml)) publishes
549-
prebuilt binaries for Linux (x86_64, aarch64) and macOS (x86_64, arm64) on every
553+
prebuilt binaries for Linux (x86_64, aarch64) and macOS (arm64) on every
550554
release and keeps `v1`-named assets in step with the floating `v1` tag, so `@v1`
551555
gets the fast path on those platforms. The step's exit code is the verdict, so a
552556
failing scenario fails the job.
@@ -639,21 +643,35 @@ nix develop --command "$PITTY_BIN" run e2e/scenarios/positive # must exit 0
639643
nix develop --command "$PITTY_BIN" run e2e/scenarios/meta # must exit 0
640644
```
641645

642-
CI runs these tiers plus the residual `#[ignore]` PTY tests on **both Linux and
643-
macOS as required gates** via `nix develop` — a macOS PTY regression blocks
644-
merges. The meta tier asserts inner exit via `expect_exit`'s deadline form so
645-
the macOS gate stays non-flaky despite slower PTY teardown. See
646-
[`.github/workflows/ci.yml`](.github/workflows/ci.yml).
647-
648-
## Supply-chain scanning
649-
650-
A separate [Socket](https://socket.dev) workflow
651-
([`.github/workflows/socket.yml`](.github/workflows/socket.yml)) scans the
652-
dependency manifests (`Cargo.toml` / `Cargo.lock`) for malicious or risky
653-
crates. It needs a `SOCKET_SECURITY_API_KEY` repository (or org) Actions secret;
654-
without it the scan step is skipped (so pull requests from forks, which cannot
655-
see the secret, do not fail). Its actions are pinned to commit SHAs because this
656-
is the one workflow where a secret is in scope.
646+
CI runs these tiers — plus a `samples/` tier exercising the `matrix` and `bench`
647+
subcommands, and the residual `#[ignore]` PTY tests — on **both Linux and macOS
648+
as required gates** via `nix develop`, so a macOS PTY regression blocks merges.
649+
The meta tier asserts inner exit via `expect_exit`'s deadline form so the macOS
650+
gate stays non-flaky despite slower PTY teardown. See
651+
[`.github/workflows/ci.yml`](.github/workflows/ci.yml). Locally, `just dogfood`
652+
runs all three tiers and `just ci` reproduces the full gate set.
653+
654+
## Security scanning
655+
656+
Two scanners guard the repository:
657+
658+
- **Secret scanning (gitleaks).** A pre-commit hook (via
659+
[lefthook](https://github.com/evilmartians/lefthook), installed automatically
660+
by the nix dev shell) runs `gitleaks git --staged` on every commit, so a
661+
secret is caught before it lands. The authoritative gate is the `gitleaks` job
662+
in [`.github/workflows/ci.yml`](.github/workflows/ci.yml), which scans full
663+
history on push (and the PR range on pull requests) — the hook is bypassable
664+
with `git commit --no-verify`, so CI is the backstop. Both read the in-repo
665+
[`.gitleaks.toml`](.gitleaks.toml), which extends gitleaks' default ruleset
666+
and deliberately ships no broad allowlist.
667+
- **Supply-chain scanning (Socket).** A separate
668+
[Socket](https://socket.dev) workflow
669+
([`.github/workflows/socket.yml`](.github/workflows/socket.yml)) scans the
670+
dependency manifest (`Cargo.toml`) for malicious or risky crates. It needs a
671+
`SOCKET_SECURITY_API_KEY` repository (or org) Actions secret; without it the
672+
scan step is skipped (so pull requests from forks, which cannot see the
673+
secret, do not fail). Its actions are pinned to commit SHAs because this is a
674+
workflow where a secret is in scope.
657675

658676
## License
659677

tests/release_asset_name_contract.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,19 @@ const ACTION_YML: &str = include_str!("../action.yml");
2828
/// The release workflow source, embedded so the test reads what ships.
2929
const RELEASE_YML: &str = include_str!("../.github/workflows/release.yml");
3030

31-
/// The four `(uname -s, uname -m)` pairs pitty ships prebuilt binaries for.
31+
/// The `(uname -s, uname -m)` pairs pitty ships prebuilt binaries for.
3232
/// This is the single source of truth both sides are checked against.
3333
///
3434
/// Apple Silicon is `arm64` here (its `uname -m`), deliberately distinct from
3535
/// the `aarch64` Rust triple, because the action keys on `uname` output.
36+
///
37+
/// No `("Darwin", "x86_64")`: GitHub's macos-13 Intel runners were unreliably
38+
/// scheduled and blocked releases, so Intel Macs fall back to `cargo install` in
39+
/// the composite action. Add the pair back here and in release.yml's matrix if a
40+
/// dependable Intel runner returns.
3641
const UNAME_PAIRS: &[(&str, &str)] = &[
3742
("Linux", "x86_64"),
3843
("Linux", "aarch64"),
39-
("Darwin", "x86_64"),
4044
("Darwin", "arm64"),
4145
];
4246

0 commit comments

Comments
 (0)