Skip to content

Commit 1052451

Browse files
committed
Add support for Apple Silicon
1 parent 4faf694 commit 1052451

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
version:
77
description: 'The version of libFLAC to build'
88
required: false
9-
default: '1.3.3'
9+
default: '1.3.4'
1010
debug:
1111
description: 'Enable debug'
1212
required: false
@@ -149,7 +149,7 @@ jobs:
149149
run: |
150150
wget https://ftp.osuosl.org/pub/xiph/releases/flac/flac-${{ github.event.inputs.version }}.tar.xz
151151
tar xvf flac-${{ github.event.inputs.version }}.tar.xz
152-
- name: Build libFLAC
152+
- name: Build libFLAC (x86_64)
153153
run: |
154154
cd flac-${{ github.event.inputs.version }}
155155
CC=clang ./configure --with-ogg=no --enable-debug=${{ github.event.inputs.debug }} --enable-shared --disable-static --disable-examples
@@ -159,8 +159,23 @@ jobs:
159159
cp src/libFLAC/.libs/libFLAC.8.dylib ../darwin-x86_64/
160160
cd ../darwin-x86_64
161161
install_name_tool -id @rpath/libFLAC.8.dylib libFLAC.8.dylib
162-
- name: Upload macOS library
162+
- name: Upload macOS x86_64 library
163163
uses: actions/upload-artifact@v1
164164
with:
165165
name: darwin-x86_64
166166
path: darwin-x86_64
167+
- name: Build libFLAC (arm64)
168+
run: |
169+
cd flac-${{ github.event.inputs.version }}
170+
./configure --host=aarch64-apple-darwin --with-ogg=no --enable-debug=${{ github.event.inputs.debug }} CFLAGS="-arch arm64 -target arm64-apple-macos11" --enable-shared --disable-static --disable-examples
171+
make
172+
mkdir ../darwin-arm64
173+
ls -l src/libFLAC/.libs
174+
cp src/libFLAC/.libs/libFLAC.8.dylib ../darwin-arm64/
175+
cd ../darwin-arm64
176+
install_name_tool -id @rpath/libFLAC.8.dylib libFLAC.8.dylib
177+
- name: Upload macOS arm64 library
178+
uses: actions/upload-artifact@v1
179+
with:
180+
name: darwin-arm64
181+
path: darwin-arm64

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pyFLAC Changelog
44
**v2.1.0**
55

66
* Added support for Linux `arm64` architectures
7+
* Added support for Darwin `arm64` architectures (macOS Apple Silicon)
78
* Fixed Raspberry Pi Zero library (see #13)
89
* Updated FLAC library to v1.3.4
910

0 commit comments

Comments
 (0)