summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2021-06-09 02:33:16 +0200
committerGravatar Nikias Bassen2021-06-09 02:33:16 +0200
commitc06ae5601513a0c2a89fae80bd8a38faea12741b (patch)
tree9c1fbfa7e8739a91019fe8aef8c11be7f618e379
parent235c6625b43817fe52b36e0d258c0ae6a1d8e7c4 (diff)
downloadlibplist-c06ae5601513a0c2a89fae80bd8a38faea12741b.tar.gz
libplist-c06ae5601513a0c2a89fae80bd8a38faea12741b.tar.bz2
[github-actions] macOS: Build arm64 _and_ x86_64
-rw-r--r--.github/workflows/build.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ecd5219..8cef57b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -30,6 +30,16 @@ jobs:
- uses: actions/checkout@v2
- name: autogen
run: |
+ 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"
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/2.7/bin"
export LIBS="-L/Library/Frameworks/Python.framework/Versions/2.7/lib"
export PYTHON_EXTRA_LDFLAGS="-u _PyMac_Error /System/Library/Frameworks/Python.framework/Versions/2.7/Python"