Skip to content

Commit caceb89

Browse files
authored
Update build-and-release.yaml
1 parent d043348 commit caceb89

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
14-
os: [ubuntu-20.04, windows-2019, macos-12]
14+
os: [ubuntu-20.04, windows-2019]
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -45,6 +45,45 @@ jobs:
4545
name: wheels-${{ matrix.os }}
4646
path: ./wheelhouse/*.whl
4747

48+
build_wheels_mac:
49+
name: Build wheels on ${{ matrix.os }}
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
matrix:
53+
os: [macos-12]
54+
55+
steps:
56+
- uses: actions/checkout@v4
57+
with:
58+
submodules: "recursive"
59+
60+
# Used to host cibuildwheel
61+
- uses: actions/setup-python@v5
62+
with:
63+
python-version: "3.9"
64+
65+
- name: Install dependencies
66+
run: |
67+
python -m pip install --upgrade pip
68+
python -m pip install -e .[all]
69+
70+
- name: Build wheels
71+
uses: pypa/cibuildwheel@v2.17.0
72+
env:
73+
CIBW_ARCHS: "auto"
74+
# disable repair
75+
CIBW_REPAIR_WHEEL_COMMAND: ""
76+
CIBW_ENVIRONMENT: CMAKE_ARGS='-DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_FMA=off -DLLAMA_F16C=off'
77+
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* pp39-* pp310-*"
78+
with:
79+
package-dir: .
80+
output-dir: wheelhouse
81+
82+
- uses: actions/upload-artifact@v4
83+
with:
84+
name: wheels-mac_${{ matrix.os }}
85+
path: ./wheelhouse/*.whl
86+
4887
build_wheels_arm64:
4988
name: Build arm64 wheels
5089
runs-on: ubuntu-latest
@@ -100,7 +139,7 @@ jobs:
100139

101140
release:
102141
name: Release
103-
needs: [build_wheels, build_wheels_arm64, build_sdist]
142+
needs: [build_wheels, build_wheels_mac, build_wheels_arm64, build_sdist]
104143
runs-on: ubuntu-latest
105144

106145
steps:

0 commit comments

Comments
 (0)