Skip to content

Commit 42320ad

Browse files
build: Intel macOS engine, and npm descriptions for v0.1.0 (#1328)
* build: ship an Intel macOS engine, @axiomcode/engine-darwin-x64 macOS shipped for Apple Silicon only, so on an Intel Mac npm installed no engine and the driver fell back to a local compile that needs Souffle and a C++ toolchain. build-engines' macOS job is now a matrix: darwin-arm64 on macos-15 and darwin-x64 on macos-15-intel, each on its own architecture so the smoke step runs the binary natively. package.json pins the new package, and publish-npm already requires every pinned platform before a real publish. run-souffle.sh already maps Darwin/x86_64 to darwin-x64. Also records in protect-main.sh the ruleset settings applied by hand while merging the release PR. * package: descriptions that say what AxiomCode Graph is The npm one-liner read like an internal note ("parser (IR extraction) + type-directed reasoning engine ..."). It now leads with the product name and says what it does, as esbuild, Biome and Turborepo do. Each engine package names its platform in words, e.g. "The macOS (Intel) engine for AxiomCode Graph (@axiomcode/code-graph)", and its README links back to the main package and says it installs automatically.
1 parent a96a7f3 commit 42320ad

8 files changed

Lines changed: 40 additions & 20 deletions

File tree

‎.github/RELEASING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ the commands to resolve it by hand.
4949
## Nightly
5050

5151
`nightly.yml` is dev's status (the "nightly" badge in the README). Every night it builds `dev`
52-
from scratch: no cached engines, the five suites, all four platforms' engines, then
52+
from scratch: no cached engines, the five suites, every platform's engines, then
5353
`e2e-install.sh` packs the npm tarballs, installs them into an empty project without Soufflé and
5454
runs `axiomcode` in four languages, and `npm publish --dry-run` checks each package.
5555

‎.github/scripts/protect-main.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ payload="$(cat <<'JSON'
4949
"dismiss_stale_reviews_on_push": false,
5050
"require_code_owner_review": false,
5151
"require_last_push_approval": false,
52+
"require_extra_approval_for_unattributed_changes": false,
5253
"required_review_thread_resolution": true,
5354
"allowed_merge_methods": ["squash", "rebase"]
5455
}

‎.github/workflows/build-engines.yml‎

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
# C++ runtime. Same flags as the local compile (no OpenMP/zlib/sqlite), portable targets.
1111
#
1212
# Artifacts: engines-<platform>/ holding <lang>/axiomcode-engine-<lang>[.exe] + <lang>/ENGINE_ID
13-
# Platforms are named the npm way (process.platform-process.arch): darwin-arm64, linux-x64,
14-
# linux-arm64, win32-x64, each on a standard GitHub-hosted runner (free for a public
15-
# repository; darwin-arm64 is the Apple Silicon macos-15 image).
13+
# Platforms are named the npm way (process.platform-process.arch): darwin-arm64, darwin-x64,
14+
# linux-x64, linux-arm64, win32-x64, each on a standard GitHub-hosted runner (free for a
15+
# public repository; macOS builds on macos-15 for Apple Silicon and macos-15-intel for Intel).
1616
# ─────────────────────────────────────────────────────────────────────────────
1717
name: build-engines
1818

@@ -157,7 +157,14 @@ jobs:
157157

158158
build-macos:
159159
needs: generate
160-
runs-on: macos-15
160+
strategy:
161+
fail-fast: false
162+
matrix:
163+
target:
164+
# each on its own architecture's runner, so the smoke step runs the binary natively
165+
- { os: macos-15, arch: arm64, platform: darwin-arm64 }
166+
- { os: macos-15-intel, arch: x86_64, platform: darwin-x64 }
167+
runs-on: ${{ matrix.target.os }}
161168
steps:
162169
- uses: actions/download-artifact@v4
163170
with: { name: generated, path: gen }
@@ -167,17 +174,20 @@ jobs:
167174
uses: actions/cache/restore@v4
168175
with:
169176
path: engines
170-
key: engines-darwin-arm64-${{ needs.generate.outputs.flags }}-${{ needs.generate.outputs.key }}
171-
restore-keys: engines-darwin-arm64-${{ needs.generate.outputs.flags }}-
172-
- name: Compile every language (macOS arm64)
177+
key: engines-${{ matrix.target.platform }}-${{ needs.generate.outputs.flags }}-${{ needs.generate.outputs.key }}
178+
restore-keys: engines-${{ matrix.target.platform }}-${{ needs.generate.outputs.flags }}-
179+
- name: Compile every language (macOS ${{ matrix.target.arch }})
180+
env:
181+
ARCH: ${{ matrix.target.arch }}
173182
run: |
174183
set -e
175184
for lang in $LANGUAGES; do
176185
if cmp -s "gen/$lang.id" "engines/$lang/ENGINE_ID"; then echo "$lang: cached, rules unchanged"; continue; fi
177186
mkdir -p "engines/$lang"
178-
c++ -std=c++17 -O3 -w -arch arm64 -mmacosx-version-min=12.0 -I gen "gen/$lang.cpp" -o "engines/$lang/axiomcode-engine-$lang"
187+
c++ -std=c++17 -O3 -w -arch "$ARCH" -mmacosx-version-min=12.0 -I gen "gen/$lang.cpp" -o "engines/$lang/axiomcode-engine-$lang"
179188
cp "gen/$lang.id" "engines/$lang/ENGINE_ID"
180189
done
190+
file engines/java/axiomcode-engine-java
181191
otool -L engines/java/axiomcode-engine-java
182192
- name: Smoke — every binary starts on empty inputs
183193
run: |
@@ -192,6 +202,6 @@ jobs:
192202
uses: actions/cache/save@v4
193203
with:
194204
path: engines
195-
key: engines-darwin-arm64-${{ needs.generate.outputs.flags }}-${{ needs.generate.outputs.key }}
205+
key: engines-${{ matrix.target.platform }}-${{ needs.generate.outputs.flags }}-${{ needs.generate.outputs.key }}
196206
- uses: actions/upload-artifact@v4
197-
with: { name: engines-darwin-arm64, path: engines, if-no-files-found: error }
207+
with: { name: 'engines-${{ matrix.target.platform }}', path: engines, if-no-files-found: error }

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# changed. The `CI` job reports either way.
1919
#
2020
# dev is the default branch: every pull request lands there and gets build, hygiene
21-
# and the five suites. The four-platform engine build is the slow part and no test
21+
# and the five suites. The every-platform engine build is the slow part and no test
2222
# uses its output, so it runs on the way INTO main (a promotion pull request, a push
2323
# to main) and in the nightly, not on every change to dev.
2424
# ─────────────────────────────────────────────────────────────────────────────

‎.github/workflows/nightly.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
# `npm i @axiomcode/code-graph@nightly` installs dev as of that night. Pull request
77
# runs test each change on its own; this is the only
88
# full check of dev's head as it actually is — after several merges, after direct
9-
# pushes and sync-dev's merges from main, with the four-platform build and the
9+
# pushes and sync-dev's merges from main, with the every-platform engine build and the
1010
# install-and-run check that dev's pull requests skip, and against whatever versions
1111
# of the dependencies a fresh install resolves today (no lock file is committed, so
1212
# those move without a commit here).
1313
#
1414
# 1. CI with fresh=true: a clean checkout, no restored engine cache, every engine
15-
# compiled from the rules, the five suites, and all four platforms' engines.
15+
# compiled from the rules, the five suites, and every platform's engines.
1616
# 2. End to end: pack @axiomcode/code-graph and the linux-x64 engine package exactly
1717
# as publish-npm.yml would, install them into an empty project with no Soufflé,
1818
# and run axiomcode on a test project (.github/scripts/e2e-install.sh).

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@axiomcode/code-graph",
33
"version": "0.1.0",
4-
"description": "AxiomCode code graph: parser (IR extraction) + type-directed reasoning engine + language-neutral graph.sqlite output. bin/axiomcode runs the whole pipeline.",
4+
"description": "AxiomCode Graph: a resolved call graph of your codebase grounded in formal methods, so you and your coding agents can see who calls what, what a change breaks, and which tests it reaches.",
55
"repository": {
66
"type": "git",
77
"url": "git+https://github.com/AxiomCodeAI/axiomcodegraph.git"
@@ -31,6 +31,7 @@
3131
"license": "FSL-1.1-Apache-2.0",
3232
"optionalDependencies": {
3333
"@axiomcode/engine-darwin-arm64": "0.1.0",
34+
"@axiomcode/engine-darwin-x64": "0.1.0",
3435
"@axiomcode/engine-linux-x64": "0.1.0",
3536
"@axiomcode/engine-linux-arm64": "0.1.0",
3637
"@axiomcode/engine-win32-x64": "0.1.0"

‎packaging/assemble-engine-package.sh‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,22 @@ HERE="$(cd "$(dirname "$0")" && pwd)"
1212
rm -rf "$out"; mkdir -p "$out"
1313
cp -R "$src"/. "$out/"
1414
langs="$(ls -d "$out"/*/ | xargs -n1 basename | tr '\n' ' ')"
15+
case "$platform" in
16+
darwin-arm64) label="macOS (Apple Silicon)";; darwin-x64) label="macOS (Intel)";;
17+
linux-x64) label="Linux x64";; linux-arm64) label="Linux arm64";; win32-x64) label="Windows x64";;
18+
*) label="$os $cpu";;
19+
esac
1520
sed -e "s|@@SCOPE@@|$ENGINE_PACKAGE_SCOPE|g" -e "s|@@PLATFORM@@|$platform|g" -e "s|@@VERSION@@|$version|g" \
16-
-e "s|@@OS@@|$os|g" -e "s|@@CPU@@|$cpu|g" -e "s|@@LANGS@@|${langs% }|g" \
21+
-e "s|@@OS@@|$os|g" -e "s|@@CPU@@|$cpu|g" -e "s|@@LANGS@@|${langs% }|g" -e "s|@@LABEL@@|$label|g" \
1722
"$HERE/engine-package.json" > "$out/package.json"
1823
cp "$HERE/../LICENSE.md" "$out/LICENSE.md"
1924
{ echo "# $ENGINE_PACKAGE_SCOPE/engine-$platform"; echo
20-
echo "Prebuilt AxiomCode code-graph engines for $os/$cpu: ${langs% }. Installed automatically as an"
21-
echo "optional dependency of the code-graph package on a matching machine; not meant to be used directly."
22-
echo; for l in $langs; do echo "- $l: rules id \`$(cat "$out/$l/ENGINE_ID")\`"; done
25+
echo "The $label engine for AxiomCode Graph ([$ENGINE_PACKAGE_SCOPE/code-graph](https://www.npmjs.com/package/$ENGINE_PACKAGE_SCOPE/code-graph)),"
26+
echo "a resolved call graph of your codebase grounded in formal methods."; echo
27+
echo "Installed automatically with \`$ENGINE_PACKAGE_SCOPE/code-graph\` on $label; you don't need to install it yourself."
28+
echo; echo "Languages: ${langs% }."
29+
echo; echo "Rules each engine was built from:"; echo
30+
for l in $langs; do echo "- $l: \`$(cat "$out/$l/ENGINE_ID")\`"; done
2331
} > "$out/README.md"
2432
chmod +x "$out"/*/axiomcode-engine-* 2>/dev/null || true
2533
echo "assembled $out: $(ls "$out" | tr '\n' ' ')"

‎packaging/engine-package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@@SCOPE@@/engine-@@PLATFORM@@",
33
"version": "@@VERSION@@",
4-
"description": "AxiomCode code-graph engines (@@LANGS@@) compiled for @@OS@@/@@CPU@@. Installed as an optional dependency of the code-graph package; npm selects this package by os/cpu.",
4+
"description": "The @@LABEL@@ engine for AxiomCode Graph (@axiomcode/code-graph), a resolved call graph of your codebase grounded in formal methods.",
55
"license": "FSL-1.1-Apache-2.0",
66
"os": ["@@OS@@"],
77
"cpu": ["@@CPU@@"],

0 commit comments

Comments
 (0)