Skip to content

Commit 959a349

Browse files
MacbookMacbook
authored andcommitted
[openvpnadapter] build for arm64vs x86_64
1 parent 6238fc2 commit 959a349

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/build_openvpnadapter_apple.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
echo "Using macOS SDK version: $MACOSX_SDK"
4141
echo "::set-output name=sdk::$MACOSX_SDK"
4242
43-
- name: Build OpenVPNAdapter
43+
- name: Build OpenVPNAdapter for x86_64
4444
run: |
4545
cd OpenVPNAdapter
4646
export XCODEBUILD="/usr/bin/xcodebuild"
@@ -49,8 +49,28 @@ jobs:
4949
-xcconfig Configuration/amnezia.xcconfig \
5050
-sdk macosx${{ steps.sdk_version.outputs.sdk }} \
5151
-destination 'generic/platform=macOS' \
52+
-arch x86_64 \
5253
-project OpenVPNAdapter.xcodeproj
5354
55+
- name: Build OpenVPNAdapter for arm64
56+
run: |
57+
cd OpenVPNAdapter
58+
export XCODEBUILD="/usr/bin/xcodebuild"
59+
$XCODEBUILD -scheme OpenVPNAdapter \
60+
-configuration Release \
61+
-xcconfig Configuration/amnezia.xcconfig \
62+
-sdk macosx${{ steps.sdk_version.outputs.sdk }} \
63+
-destination 'generic/platform=macOS' \
64+
-arch arm64 \
65+
-project OpenVPNAdapter.xcodeproj
66+
67+
- name: Create Universal Binary
68+
run: |
69+
cd OpenVPNAdapter/build/Release-macos
70+
lipo -create -output OpenVPNAdapter.framework/OpenVPNAdapter \
71+
x86_64/OpenVPNAdapter.framework/OpenVPNAdapter \
72+
arm64/OpenVPNAdapter.framework/OpenVPNAdapter
73+
5474
- name: Remove CodeSignature
5575
run: |
5676
echo "Removing CodeSignature if exists..."

0 commit comments

Comments
 (0)