|
1 | | -name: Build OpenVPNAdapter for macos ne |
| 1 | +name: Build OpenVPNAdapter for Apple |
2 | 2 |
|
3 | 3 | on: [push] |
4 | 4 |
|
|
61 | 61 | with: |
62 | 62 | name: OpenVPNAdapter-macos |
63 | 63 | 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