Skip to content

Commit 2cec3f0

Browse files
committed
CI: test both JIT off and JIT on
Add a matrix dimension over EMILY_MLX_JIT ∈ {0, 1} so both MLX build flavours are exercised on every push / PR. _build and MLX caches are partitioned by the flag so the two matrix entries don't clobber each other's artefacts.
1 parent 5701757 commit 2cec3f0

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ concurrency:
1212

1313
jobs:
1414
precommit:
15-
name: precommit (${{ matrix.os }})
15+
name: precommit (${{ matrix.os }}, jit=${{ matrix.jit }})
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
fail-fast: false
1919
matrix:
2020
# Emily is Apple-Silicon only. macos-14 is arm64 (M1).
2121
os: [macos-14]
22+
jit: ["0", "1"]
2223
env:
2324
MIX_ENV: test
25+
EMILY_MLX_JIT: ${{ matrix.jit }}
2426
steps:
2527
- uses: actions/checkout@v6
2628
with:
@@ -43,17 +45,21 @@ jobs:
4345
uses: actions/cache@v5
4446
with:
4547
path: _build
46-
key: build-${{ runner.os }}-${{ hashFiles('mix.lock', 'c_src/**', 'Makefile', '.tool-versions', '.gitmodules') }}
47-
restore-keys: build-${{ runner.os }}-
48+
key: build-${{ runner.os }}-jit${{ matrix.jit }}-${{ hashFiles('mix.lock', 'c_src/**', 'Makefile', '.tool-versions', '.gitmodules') }}
49+
restore-keys: build-${{ runner.os }}-jit${{ matrix.jit }}-
4850

4951
# MLX cmake build (~6 min from source) and NIF object files.
50-
# Keyed by the vendored MLX submodule commit + NIF sources.
52+
# Keyed by the vendored MLX submodule commit + NIF sources; the
53+
# JIT flag changes libmlx/metallib bytes so each flavour caches
54+
# separately (the install dir itself gains a `-jit` suffix, but
55+
# the NIF .o files under build-<version>/ are shared, so we still
56+
# partition the top-level cache).
5157
- name: Cache MLX and NIF objects
5258
uses: actions/cache@v5
5359
with:
5460
path: ~/Library/Caches/emily
55-
key: mlx-${{ runner.os }}-${{ hashFiles('.gitmodules', 'c_src/**', 'Makefile') }}
56-
restore-keys: mlx-${{ runner.os }}-
61+
key: mlx-${{ runner.os }}-jit${{ matrix.jit }}-${{ hashFiles('.gitmodules', 'c_src/**', 'Makefile') }}
62+
restore-keys: mlx-${{ runner.os }}-jit${{ matrix.jit }}-
5763

5864
# The Bumblebee cache holds tiny-random HuggingFace fixtures
5965
# downloaded by the conformance suite (~3 MB across 7 repos).

0 commit comments

Comments
 (0)