Skip to content

Commit 3e77ce8

Browse files
chore: iOS OpenVPNAdapter commit to build on updated, CODE_SIGNING_ALLOWED disabled, failing macOS build deleted
1 parent d7684f3 commit 3e77ce8

File tree

1 file changed

+9
-83
lines changed

1 file changed

+9
-83
lines changed

.github/workflows/build_openvpnadapter_apple.yml

Lines changed: 9 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -3,85 +3,6 @@ name: Build OpenVPNAdapter for Apple
33
on: [push]
44

55
jobs:
6-
build-macos:
7-
name: 'OpenVPNAdapter for macOS NE'
8-
runs-on: macos-latest
9-
if: |
10-
contains(github.event.head_commit.message, '[all]') ||
11-
contains(github.event.head_commit.message, '[macos]') ||
12-
contains(github.event.head_commit.message, '[openvpnadapter]')
13-
14-
steps:
15-
- name: Checkout code
16-
uses: actions/checkout@v3
17-
18-
- name: 'Get OpenVPNAdapter'
19-
uses: actions/checkout@v3
20-
with:
21-
repository: amnezia-vpn/OpenVPNAdapter
22-
ref: feature/macox-network-extension
23-
path: OpenVPNAdapter
24-
25-
- name: Configure amnezia.xcconfig
26-
run: |
27-
export WORKINGDIR=`pwd`
28-
echo "Working directory: $WORKINGDIR"
29-
echo "Configuring amnezia.xcconfig..."
30-
cat $WORKINGDIR/OpenVPNAdapter/Configuration/Project-MacNE.xcconfig > $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig
31-
cat << EOF >> $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig
32-
PROJECT_TEMP_DIR = $WORKINGDIR/OpenVPNAdapter/build/OpenVPNAdapter.build
33-
CONFIGURATION_BUILD_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-macos
34-
BUILT_PRODUCTS_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-macos
35-
EOF
36-
37-
- name: Get macOS SDK
38-
id: sdk_version
39-
run: |
40-
MACOSX_SDK=$(xcrun --sdk macosx --show-sdk-path | sed -E 's/.*MacOSX([0-9]+\.[0-9]+)\.sdk/\1/')
41-
echo "Using macOS SDK version: $MACOSX_SDK"
42-
echo "::set-output name=sdk::$MACOSX_SDK"
43-
44-
- name: Build OpenVPNAdapter
45-
run: |
46-
cd OpenVPNAdapter
47-
export XCODEBUILD="/usr/bin/xcodebuild"
48-
$XCODEBUILD -scheme OpenVPNAdapter \
49-
-configuration Release \
50-
-xcconfig Configuration/amnezia.xcconfig \
51-
-sdk macosx${{ steps.sdk_version.outputs.sdk }} \
52-
-destination 'generic/platform=macOS' \
53-
-project OpenVPNAdapter.xcodeproj
54-
55-
- name: Remove CodeSignature
56-
run: |
57-
export WORKINGDIR=`pwd`
58-
echo "Removing CodeSignature if exists..."
59-
rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework/Versions/A/_CodeSignature
60-
rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature
61-
rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/LZ4.framework
62-
rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNClient.framework
63-
rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/mbedTLS.framework
64-
rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework.dSYM
65-
66-
- name: Generate Checksums for OpenVPNAdapter.framework
67-
run: |
68-
export WORKINGDIR=`pwd`
69-
if [ -d "$WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework" ]; then
70-
echo "Generating checksums for OpenVPNAdapter.framework..."
71-
find $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework \
72-
-type f \
73-
-exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \;
74-
else
75-
echo "Directory $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework does not exist."
76-
exit 1
77-
fi
78-
79-
- name: Archive Build
80-
uses: actions/upload-artifact@v3
81-
with:
82-
name: OpenVPNAdapter-macos
83-
path: OpenVPNAdapter/build/Release-macos
84-
856
build-ios:
867
name: 'OpenVPNAdapter for iOS'
878
runs-on: macos-latest
@@ -101,7 +22,7 @@ jobs:
10122
uses: actions/checkout@v3
10223
with:
10324
repository: amnezia-vpn/OpenVPNAdapter
104-
ref: 7c821a8d5c1ad5ad94e0763b4f25a875b5a6fe1b
25+
ref: 66e6e922a9b58f04aa89087fcc1f9602d2025707
10526
path: OpenVPNAdapter
10627
submodules: recursive
10728

@@ -128,7 +49,11 @@ jobs:
12849
-xcconfig Configuration/amnezia.xcconfig \
12950
-sdk iphoneos \
13051
-destination 'generic/platform=iOS' \
131-
-project OpenVPNAdapter.xcodeproj
52+
-project OpenVPNAdapter.xcodeproj \
53+
CODE_SIGNING_ALLOWED=NO
54+
55+
# With CODE_SIGNING_ALLOWED=NO this part is redundant, but it's not just signatures are being deleted here,
56+
# It's also dependant frameworks and debyg symbols.
13257
- name: Remove CodeSignature
13358
run: |
13459
export WORKINGDIR=`pwd`
@@ -157,10 +82,11 @@ jobs:
15782
uses: actions/upload-artifact@v3
15883
with:
15984
name: OpenVPNAdapter-ios
160-
path: OpenVPNAdapter/build/Release-iphoneos
85+
path: 'OpenVPNAdapter/build/Release-iphoneos'
86+
16187
github-release:
16288
name: GitHub Release
163-
needs: [build-macos, build-ios]
89+
needs: [build-ios]
16490
runs-on: ubuntu-latest
16591
if: startsWith(github.ref, 'refs/tags/')
16692

0 commit comments

Comments
 (0)