Skip to content

Commit 6ef2a2c

Browse files
MacbookMacbook
authored andcommitted
[openvpnadapter] build for ios
1 parent 5c2c420 commit 6ef2a2c

File tree

1 file changed

+50
-1
lines changed

1 file changed

+50
-1
lines changed

.github/workflows/build_openvpn_macosne.yml renamed to .github/workflows/build_openvpn_apple.yml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build OpenVPNAdapter for macos ne
1+
name: Build OpenVPNAdapter for Apple
22

33
on: [push]
44

@@ -61,3 +61,52 @@ jobs:
6161
with:
6262
name: OpenVPNAdapter-macos
6363
path: OpenVPNAdapter/build/Release-macos
64+
build-ios:
65+
name: 'Build OpenVPNAdapter for iOS'
66+
runs-on: macos-latest
67+
if: |
68+
contains(github.event.head_commit.message, '[all]') ||
69+
contains(github.event.head_commit.message, '[ios]') ||
70+
contains(github.event.head_commit.message, '[openvpnadapter]')
71+
72+
steps:
73+
- name: Checkout code
74+
uses: actions/checkout@v3
75+
76+
- name: 'Get OpenVPNAdapter'
77+
uses: actions/checkout@v3
78+
with:
79+
repository: amnezia-vpn/OpenVPNAdapter
80+
ref: master
81+
path: OpenVPNAdapter
82+
83+
- name: Configure amnezia.xcconfig
84+
run: |
85+
export WORKINGDIR=`pwd`
86+
echo "Configuring amnezia.xcconfig..."
87+
cat $WORKINGDIR/OpenVPNAdapter/Configuration/Project.xcconfig > $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig
88+
cat << EOF >> $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig
89+
PROJECT_TEMP_DIR = $WORKINGDIR/OpenVPNAdapter/build/OpenVPNAdapter.build
90+
CONFIGURATION_BUILD_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos
91+
BUILT_PRODUCTS_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos
92+
EOF
93+
94+
- name: Build OpenVPNAdapter for iOS
95+
run: |
96+
export SDK_PATH=`xcrun --sdk iphoneos --show-sdk-path`
97+
export CLANG=`xcrun --sdk iphoneos --find clang`
98+
export XCODEBUILD="/usr/bin/xcodebuild"
99+
100+
cd OpenVPNAdapter
101+
$XCODEBUILD -scheme OpenVPNAdapter \
102+
-configuration Release \
103+
-xcconfig Configuration/amnezia.xcconfig \
104+
-sdk iphoneos \
105+
-destination 'generic/platform=iOS' \
106+
-project OpenVPNAdapter.xcodeproj
107+
108+
- name: Archive Build
109+
uses: actions/upload-artifact@v3
110+
with:
111+
name: OpenVPNAdapter-ios
112+
path: OpenVPNAdapter/build/Release-iphoneos

0 commit comments

Comments
 (0)