Skip to content

Commit 620d837

Browse files
authored
Merge pull request #4 from Yupcha/polish/memxt-logo-ci
Polish: memxt logo + Intel-Mac cross-compile + version bump
2 parents 777b914 + 1f75ef6 commit 620d837

3 files changed

Lines changed: 46 additions & 30 deletions

File tree

.github/workflows/release.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@ jobs:
1818
include:
1919
- target: darwin-aarch64
2020
runner: macos-latest
21+
# Intel macOS: cross-compile on the plentiful arm runner (macos-13
22+
# Intel runners are deprecated and queue-starved). The binary can't be
23+
# run on the arm host, so its runtime smoke test is skipped.
2124
- target: darwin-x86_64
22-
runner: macos-13
25+
runner: macos-latest
26+
osx_arch: x86_64
27+
zig_target: x86_64-macos
28+
skip_run: "true"
2329
- target: linux-x86_64
2430
runner: ubuntu-latest
2531
- target: linux-aarch64
@@ -84,10 +90,14 @@ jobs:
8490
- name: Build llama.cpp static libraries
8591
if: steps.cache_llama.outputs.cache-hit != 'true'
8692
run: |
93+
# Cross-compile flag for Intel macOS built on an arm runner.
94+
OSX_ARCH_FLAG=""
95+
if [ -n "${{ matrix.osx_arch }}" ]; then OSX_ARCH_FLAG="-DCMAKE_OSX_ARCHITECTURES=${{ matrix.osx_arch }}"; fi
8796
if [ "$(uname -s)" = "Darwin" ]; then
8897
cmake -S lib/llama.cpp -B lib/llama.cpp/build \
8998
-DCMAKE_BUILD_TYPE=Release \
9099
-DBUILD_SHARED_LIBS=OFF \
100+
$OSX_ARCH_FLAG \
91101
-DGGML_METAL=ON \
92102
-DGGML_BLAS=ON \
93103
-DLLAMA_BUILD_TESTS=OFF \
@@ -110,9 +120,16 @@ jobs:
110120
cmake --build lib/llama.cpp/build -j
111121
112122
- name: Build release
113-
run: zig build --release=fast
123+
run: |
124+
if [ -n "${{ matrix.zig_target }}" ]; then
125+
zig build --release=fast -Dtarget=${{ matrix.zig_target }}
126+
else
127+
zig build --release=fast
128+
fi
114129
115130
- name: Smoke test (incl. real embeddings)
131+
# Skip for a cross-compiled binary that can't run on this host.
132+
if: ${{ matrix.skip_run != 'true' }}
116133
run: |
117134
set -eux
118135
./zig-out/bin/memxt init

assets/logo.svg

Lines changed: 26 additions & 27 deletions
Loading

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.{
22
.name = .memxt,
3-
.version = "0.1.0",
3+
.version = "0.2.1",
44
.fingerprint = 0x5bf95d78bca15787,
55
.minimum_zig_version = "0.16.0",
66
.paths = .{

0 commit comments

Comments
 (0)