Skip to content

Commit 97165ef

Browse files
clemlesneclaude
andcommitted
ci: use config.mak for macOS Homebrew paths instead of make args
Shell quoting with make command-line variables is fragile — spaces in CPPFLAGS/LDFLAGS caused make to interpret paths as options. Git's Makefile auto-includes config.mak, so writing the paths there avoids all quoting issues. Uses += to append to existing flags. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 34ef5db commit 97165ef

2 files changed

Lines changed: 27 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,19 @@ jobs:
6666
# On macOS, Homebrew keg-only packages (openssl, curl, gettext) are
6767
# not linked into the default search paths. Git's config.mak.uname
6868
# gained Homebrew auto-detection around v2.47, but older versions
69-
# (2.34.1, 2.39.5) lack it. Git's Makefile overrides CFLAGS and
70-
# LDFLAGS env vars, so we pass them on the make command line where
71-
# they take precedence over Makefile assignments.
72-
MAKE_ARGS="prefix=$HOME/git-install"
69+
# (2.34.1, 2.39.5) lack it. Git's Makefile auto-includes config.mak,
70+
# so we write the paths there to avoid shell quoting issues with
71+
# make command-line variables.
7372
if [ "$RUNNER_OS" = "macOS" ]; then
7473
BREW_PREFIX=$(brew --prefix)
75-
MAKE_ARGS="$MAKE_ARGS CPPFLAGS=-I${BREW_PREFIX}/opt/openssl/include\ -I${BREW_PREFIX}/opt/curl/include\ -I${BREW_PREFIX}/opt/expat/include\ -I${BREW_PREFIX}/opt/gettext/include"
76-
MAKE_ARGS="$MAKE_ARGS LDFLAGS=-L${BREW_PREFIX}/opt/openssl/lib\ -L${BREW_PREFIX}/opt/curl/lib\ -L${BREW_PREFIX}/opt/expat/lib\ -L${BREW_PREFIX}/opt/gettext/lib"
74+
cat > config.mak <<CFGEOF
75+
CPPFLAGS += -I${BREW_PREFIX}/opt/openssl/include -I${BREW_PREFIX}/opt/curl/include -I${BREW_PREFIX}/opt/expat/include -I${BREW_PREFIX}/opt/gettext/include
76+
LDFLAGS += -L${BREW_PREFIX}/opt/openssl/lib -L${BREW_PREFIX}/opt/curl/lib -L${BREW_PREFIX}/opt/expat/lib -L${BREW_PREFIX}/opt/gettext/lib
77+
CFGEOF
7778
fi
7879
79-
make $MAKE_ARGS -j"$NPROC" all
80-
make $MAKE_ARGS install
80+
make prefix="$HOME/git-install" -j"$NPROC" all
81+
make prefix="$HOME/git-install" install
8182
8283
- name: Verify git build
8384
run: |

autoresearch-results.tsv

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# metric_direction: lower_is_better
2+
iteration commit metric delta guard status description
3+
0 034d5a3e 13.2 0.0 pass baseline initial state — indexing kubernetes in 13.2s
4+
1 838f0979 12.3 -0.9 pass keep pre-allocate postings builder maps with 200K capacity hint
5+
2 429d26fc 10.6 -1.7 pass keep merge postings and lastOffsets maps into single map with pointer values
6+
3 - 11.2 +0.6 - discard skip content-based enry.IsGenerated in rank (within noise, not worth behavior change)
7+
4 4013530b 9.9 -0.7 pass keep pre-allocate postingEntry data slice with 64-byte capacity
8+
5 - 10.4 +0.5 - discard use fixed-size array for rank vectors (larger struct offsets allocation savings)
9+
6 - 11.8 +1.9 - discard skip binary detection scan when SkipReason set (no-op, nil content check is already free)
10+
7 - 11.2 +1.3 - discard increase go-git LRU cache to 256MB (more GC pressure)
11+
8 - 10.3 +0.4 - discard slab-allocate postingEntry objects (data slices still dominate alloc)
12+
9 - 11.3 +1.4 - discard disable GOGC + 2GiB memlimit in builder (unreliable from library code)
13+
10 - 10.65 +0.75 - discard use slices.SortFunc for sorting (sort algo not the bottleneck, enry is)
14+
11 e3f2116f 8.3 -1.6 pass keep pipeline document creation with builder processing (goroutine pre-fetch)
15+
12 - 8.6 +0.3 - discard increase posting data capacity to 256 bytes (extra memory pressure)
16+
13 - 8.6 +0.3 - discard increase pipeline buffer to 512 (extra memory offsets sync savings)
17+
14 - 9.0 +0.7 - discard pre-allocate runeOffsets (4MB upfront increases memory pressure)
18+
15 - 9.6 +1.3 - discard reduce map capacity to 100K (more resizes hurt)

0 commit comments

Comments
 (0)