summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-09-13 23:15:36 +0200
committerGravatar Nikias Bassen2021-09-13 23:15:36 +0200
commit9a697354801194d076c23a8c904d3241b4b9deee (patch)
tree4094cdb7c988537fbfc761a28197fe6044aef791 /.github
parent042c1a264a7e853fcdfc9c6a1b0090d56fc3ff81 (diff)
downloadlibimobiledevice-glue-9a697354801194d076c23a8c904d3241b4b9deee.tar.gz
libimobiledevice-glue-9a697354801194d076c23a8c904d3241b4b9deee.tar.bz2
[github-actions] macOS: build for arm64 too
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml12
1 files changed, 11 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3b3db8d..97ad2fc 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -72,7 +72,17 @@ jobs:
- uses: actions/checkout@v2
- name: autogen
run: |
- ./autogen.sh PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \
+ SDKDIR=`xcrun --sdk macosx --show-sdk-path`
+ TESTARCHS="arm64 x86_64"
+ USEARCHS=
+ for ARCH in $TESTARCHS; do
+ if echo "int main(int argc, char **argv) { return 0; }" |clang -arch $ARCH -o /dev/null -isysroot $SDKDIR -x c - 2>/dev/null; then
+ USEARCHS="$USEARCHS -arch $ARCH"
+ fi
+ done
+ export CFLAGS="$USEARCHS -isysroot $SDKDIR"
+ echo "Using CFLAGS: $CFLAGS"
+ ./autogen.sh PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
- name: make
run: make
- name: make install