-
Notifications
You must be signed in to change notification settings - Fork 12
Feature build OpenVPNAdapter for apple #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 41 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
badc071
build cloak, macos, awg for macos x86_64, arm64
3742af2
[openvpnadapter]
8d64f37
[openvpnadapter] test
03c0621
[openvpnadapter] test
5b57290
[openvpnadapter] test
e1c58cb
[openvpnadapter] test
c0aacec
[openvpnadapter] test
7652b63
[openvpnadapter] test
5c2c420
[openvpnadapter] build for macos ne
6ef2a2c
[openvpnadapter] build for ios
439ffdb
[openvpnadapter] build for apple
6238fc2
[openvpnadapter] remove code sign
959a349
[openvpnadapter] build for arm64vs x86_64
929ed84
[openvpnadapter] final buil
ef54e55
refactor macos ne
4c70dc0
refactor code
3a6a7b5
add github release [openvpnadapter]
7ae49b1
add github release [openvpnadapter]
5605d4e
test add github release [openvpnadapter]
265306e
test add github release [openvpnadapter]
aa7412b
test add github release [openvpnadapter]
de6d7ac
test add github release [openvpnadapter]
e3c66bf
final clean code for openvpn adapter for macos/ios
828a2d0
remove non-dependent library [openvpnadapter]
07e9e47
add checksums
3e91665
add checksums
8182208
add checksums [openvpnadapter]
e491c82
add checksums [openvpnadapter]
fca2c24
add checksums [openvpnadapter]
fb3aa17
add checksums [openvpnadapter]
93da31f
add checksums [openvpnadapter]
d54a4c9
add checksums [openvpnadapter]
5aff7d7
add checksums [openvpnadapter-ios]
fbc1118
add checksums [openvpnadapter-ios]
3e43212
add checksums [openvpnadapter]
ac8097d
add checksums [openvpnadapter]
cdee5bb
Final openvpn adapter with checksums
d236f1a
change commit for ios [openvpnadapter]
4da93e0
add submodule [openvpnadapter]
d7684f3
trailing line at the end of the file added
yaroslavyaroslav 3e77ce8
chore: iOS OpenVPNAdapter commit to build on updated, CODE_SIGNING_AL…
yaroslavyaroslav 543845f
Review fixes
yaroslavyaroslav 312d8cd
Fix typo
pokamest File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| name: Build OpenVPNAdapter for Apple | ||
|
|
||
| on: [push] | ||
|
|
||
| jobs: | ||
| build-ios: | ||
| name: 'OpenVPNAdapter for iOS' | ||
| runs-on: macos-latest | ||
| if: | | ||
| contains(github.event.head_commit.message, '[all]') || | ||
| contains(github.event.head_commit.message, '[ios]') || | ||
| contains(github.event.head_commit.message, '[openvpnadapter-ios]') || | ||
| contains(github.event.head_commit.message, '[openvpnadapter]') | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: 'Get OpenVPNAdapter' | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| repository: amnezia-vpn/OpenVPNAdapter | ||
| ref: 66e6e922a9b58f04aa89087fcc1f9602d2025707 | ||
| path: OpenVPNAdapter | ||
| submodules: recursive | ||
|
|
||
| - name: Configure amnezia.xcconfig | ||
| run: | | ||
| export WORKINGDIR=`pwd` | ||
| echo "Configuring amnezia.xcconfig..." | ||
| cat $WORKINGDIR/OpenVPNAdapter/Configuration/Project.xcconfig > $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig | ||
| cat << EOF >> $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig | ||
| PROJECT_TEMP_DIR = $WORKINGDIR/OpenVPNAdapter/build/OpenVPNAdapter.build | ||
| CONFIGURATION_BUILD_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos | ||
| BUILT_PRODUCTS_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos | ||
| EOF | ||
|
|
||
| - name: Build OpenVPNAdapter for iOS | ||
| run: | | ||
| export SDK_PATH=`xcrun --sdk iphoneos --show-sdk-path` | ||
| export CLANG=`xcrun --sdk iphoneos --find clang` | ||
| export XCODEBUILD="/usr/bin/xcodebuild" | ||
|
|
||
| cd OpenVPNAdapter | ||
| $XCODEBUILD -scheme OpenVPNAdapter \ | ||
| -configuration Release \ | ||
| -xcconfig Configuration/amnezia.xcconfig \ | ||
| -sdk iphoneos \ | ||
| -destination 'generic/platform=iOS' \ | ||
| -project OpenVPNAdapter.xcodeproj \ | ||
| CODE_SIGNING_ALLOWED=NO | ||
|
|
||
| # With CODE_SIGNING_ALLOWED=NO this part is redundant, but it's not just signatures are being deleted here, | ||
| # It's also dependant frameworks and debyg symbols. | ||
| - name: Remove CodeSignature | ||
| run: | | ||
| export WORKINGDIR=`pwd` | ||
| echo "Removing CodeSignature if exists..." | ||
| rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework/Versions/A/_CodeSignature | ||
| rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature | ||
| rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/LZ4.framework | ||
| rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNClient.framework | ||
| rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/mbedTLS.framework | ||
| rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework.dSYM | ||
|
|
||
| - name: Generate Checksums for OpenVPNAdapter.framework | ||
| run: | | ||
| export WORKINGDIR=`pwd` | ||
| if [ -d "$WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework" ]; then | ||
| echo "Generating checksums for OpenVPNAdapter.framework..." | ||
| find $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework \ | ||
| -type f \ | ||
| -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; | ||
| else | ||
| echo "Directory $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework does not exist." | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Archive Build | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: OpenVPNAdapter-ios | ||
| path: 'OpenVPNAdapter/build/Release-iphoneos' | ||
|
|
||
| github-release: | ||
| name: GitHub Release | ||
| needs: [build-ios] | ||
| runs-on: ubuntu-latest | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
|
|
||
| steps: | ||
| - name: Setup | Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup | Download macOS Artifact | ||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: OpenVPNAdapter-macos | ||
| path: openvpnadapter-mac/ | ||
|
|
||
| - name: Setup | Download iOS Artifact | ||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: OpenVPNAdapter-ios | ||
| path: openvpnadapter-ios/ | ||
|
|
||
| - name: Create Combined Folder | ||
| run: | | ||
| mkdir -p openvpnadapter | ||
| cp -r openvpnadapter-mac/ openvpnadapter/ | ||
| cp -r openvpnadapter-ios/ openvpnadapter/ | ||
|
|
||
| - name: Zip Combined Artifacts | ||
| run: | | ||
| zip -r openvpnadapter.zip openvpnadapter/ | ||
| shell: bash | ||
|
|
||
| - name: List Generated Files | ||
| run: ls -l | ||
|
|
||
| - name: Upload Binaries to GitHub Release | ||
| uses: svenstaro/upload-release-action@v2 | ||
| with: | ||
| repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
| tag: ${{ github.ref }} | ||
| overwrite: true | ||
| file: openvpnadapter.zip | ||
| file_glob: false | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref: master-amnezia