Skip to content

Commit

Permalink
[github-actions] macOS: build for arm64 too
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias committed Sep 13, 2021
1 parent 196ef00 commit 2ec5354
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2ec5354

Please sign in to comment.