Skip to content

ci: per-platform build + cgo smoke matrix#1

Merged
jh-lee-cryptolab merged 4 commits intomainfrom
ci/platform-matrix
Apr 21, 2026
Merged

ci: per-platform build + cgo smoke matrix#1
jh-lee-cryptolab merged 4 commits intomainfrom
ci/platform-matrix

Conversation

@jh-lee-cryptolab
Copy link
Copy Markdown
Contributor

@jh-lee-cryptolab jh-lee-cryptolab commented Apr 21, 2026

Summary

  • Adds .github/workflows/ci.yml with a 5-platform matrix covering every slice in third_party/evi/ (linux/{amd64,arm64}, darwin/{amd64,arm64}, windows/amd64).
  • Each job runs go vet ./... && go build ./... && go test ./..., which already exercises the internal/crypto cgo tests (context create, keygen, encrypt, decryptor open) — this is the per-platform cgo smoke.
  • E2E is intentionally excluded: tests/ is a separate Go module so ./... skips it, and the e2e cluster is not stood up yet.

Platform notes

  • darwin/amd64 is cross-built on macos-14 (Apple Silicon) via clang -arch x86_64 + Intel Homebrew's x86_64 openssl@3 at /usr/local/opt/openssl@3. The resulting x86_64 test binary runs through Rosetta 2. Locally verified that the link reaches libevi cleanly and only misses x86_64 libssl — which is exactly what the Intel brew step provisions.
  • windows/amd64 runs inside MSYS2 MINGW64 (mingw-w64-x86_64-gcc + mingw-w64-x86_64-openssl), matching the README's Windows instructions.
  • workflow_dispatch is wired up so we can re-run the matrix manually after this lands on main.

Test plan

  • linux/amd64 green
  • linux/arm64 green
  • darwin/arm64 green
  • darwin/amd64 green (cross via Rosetta)
  • windows/amd64 green (MSYS2)

jh-lee-cryptolab and others added 4 commits April 21, 2026 14:23
go test ./... already exercises internal/crypto cgo tests (context
create, keygen, encrypt, decryptor open), which is the cheapest proof
that the libevi + OpenSSL stack links and runs on each target. Wire
that into a GitHub Actions matrix covering the five platforms the
README claims to support:

  linux/amd64    ubuntu-latest
  linux/arm64    ubuntu-24.04-arm
  darwin/amd64   macos-13
  darwin/arm64   macos-14
  windows/amd64  windows-latest (MSYS2 mingw64)

E2E is deliberately excluded — the test cluster is not stood up yet
and tests/ is a separate module that ./... skips by default.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
macos-13 Intel runners are on the deprecation track; consolidate onto
macos-14 and produce the darwin/amd64 slice as a cross-build from the
Apple Silicon host instead:

  - clang -arch x86_64 for cgo compile + link
  - Intel Homebrew at /usr/local for x86_64 openssl@3 (the existing cgo
    darwin,amd64 LDFLAGS already point there as the first -L candidate)
  - Rosetta 2 to exec the x86_64 test binary that `go test` produces

Locally verified on a darwin/arm64 host that the link reaches libevi
cleanly and only fails on the missing x86_64 libssl — exactly the gap
the Intel brew step closes on CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Lets us trigger the matrix on a feature branch before opening the PR,
which is how we want to iterate on this workflow itself — tweak,
dispatch, observe, repeat — without cluttering the history with
"fix CI" commits on main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…chive

On Windows, EVI/Export.hpp resolves EVI_API to __declspec(dllimport)
unless EVI_STATIC is defined. That caused mingw to emit __imp_<mangled>
references for every evi::KeyManager and evi::makeKeyManager call in
keymanager_shim.cpp, which libevi_crypto.a does not provide — it
exports the bare mangled symbols (confirmed via nm on the bundled
Windows archive). Linux/macOS escaped the issue only because their
Export.hpp branch is a no-op visibility attribute.

Define EVI_STATIC globally in the cgo CPPFLAGS so the import/export
annotation is neutralised on every platform, matching the fact that we
always consume libevi as static archives.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jh-lee-cryptolab jh-lee-cryptolab merged commit 6982aea into main Apr 21, 2026
5 checks passed
@jh-lee-cryptolab jh-lee-cryptolab deleted the ci/platform-matrix branch April 21, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant