summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-09-13 23:21:25 +0200
committerGravatar Nikias Bassen2021-09-13 23:21:25 +0200
commit2ec5354a6ff2ba5e2740eabe7402186f29294f79 (patch)
treeb7ca40d180514c056f621b3f9709c046d973781f
parent196ef00f02f9681cfd1f660e3e91a771fe628a14 (diff)
downloadlibusbmuxd-2ec5354a6ff2ba5e2740eabe7402186f29294f79.tar.gz
libusbmuxd-2ec5354a6ff2ba5e2740eabe7402186f29294f79.tar.bz2
[github-actions] macOS: build for arm64 too
-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 8b155e1..f52bc14 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -83,7 +83,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