Skip to content

Commit 487596f

Browse files
committed
fix: configure macOS build with OpenBLAS and platform-specific settings
- Keep Linux as primary platform in pixi.toml (uses MKL) - GitHub Actions dynamically configures macOS builds: - Switches platform to osx-arm64 or osx-64 - Uses OpenBLAS instead of MKL (MKL not available on macOS) - Change deprecated macos-13 runner to macos-12 - Disable cache during build (platform-specific modifications) - Generate pixi.lock for Linux platform This approach allows Linux development while CI handles macOS builds.
1 parent 71071b9 commit 487596f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
uses: prefix-dev/setup-pixi@v0.8.1
1717
with:
1818
pixi-version: latest
19+
cache: false
1920

2021
- name: Build FFI library
2122
run: pixi run build-ffi-optimized
@@ -61,16 +62,25 @@ jobs:
6162
include:
6263
- runner: macos-latest # Apple Silicon (M1)
6364
arch: arm64
64-
- runner: macos-13 # Intel
65+
platform: osx-arm64
66+
- runner: macos-12 # Intel
6567
arch: x86_64
68+
platform: osx-64
6669
runs-on: ${{ matrix.runner }}
6770
steps:
6871
- uses: actions/checkout@v4
6972

73+
- name: Configure pixi for macOS
74+
run: |
75+
# Update pixi.toml to use macOS platform and OpenBLAS (MKL not available on macOS)
76+
sed -i.bak 's/platforms = \["linux-64"\]/platforms = ["${{ matrix.platform }}"]/' pixi.toml
77+
sed -i.bak 's/default = { features = \["mkl"\]/default = { features = ["openblas"]/' pixi.toml
78+
7079
- name: Install pixi
7180
uses: prefix-dev/setup-pixi@v0.8.1
7281
with:
7382
pixi-version: latest
83+
cache: false
7484

7585
- name: Build FFI library
7686
run: pixi run build-ffi-optimized

pixi.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
authors = ["itsdevcoffee <itstexmex@gmail.com>"]
33
channels = ["https://conda.modular.com/max-nightly", "conda-forge"]
44
name = "mojo-audio"
5-
platforms = ["linux-64", "osx-arm64", "osx-64"]
5+
platforms = ["linux-64"]
66
version = "0.1.1"
77
description = "High-performance audio DSP library in Mojo - beats Python!"
88

@@ -67,6 +67,7 @@ pydantic = ">=2.5.3"
6767
python-multipart = ">=0.0.6"
6868

6969
# BLAS backend features - allows switching between MKL and OpenBLAS
70+
# Note: MKL is Linux-only, macOS builds use OpenBLAS (configured in CI)
7071
[feature.mkl.dependencies]
7172
libblas = { version = "*", build = "*mkl" }
7273

0 commit comments

Comments
 (0)