Skip to content

Commit

Permalink
Build awg for iOS
Browse files Browse the repository at this point in the history
[ios-awg]
  • Loading branch information
outspace committed Sep 25, 2023
1 parent 4b9afe3 commit 3fd1e3a
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/build_awg_ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: awg-ios

on: [push]

jobs:
Build-WG-iOS:
runs-on: macos-12
if: |
contains(github.event.head_commit.message, '[all]') ||
contains(github.event.head_commit.message, '[ios]') ||
contains(github.event.head_commit.message, '[ios-awg]') ||
contains(github.event.head_commit.message, '[awg]')
strategy:
matrix:
arch: [arm64]

steps:
- name: Install dependencies
run: brew install swiftlint go

- name: Get WireGuard
uses: actions/checkout@v3
with:
repository: amnezia-vpn/awg-apple
ref: 23618f994f17d8ad8f2f65d79b4a1e8a0830b334
path: awg-apple

- name: Build WG
working-directory: awg-apple/Sources/WireGuardKitGo
run: ARCHS=${{ matrix.arch }} PLATFORM_NAME=iphoneos make

- name: Upload Artifact
uses: actions/[email protected]
with:
name: awg-ios-${{ matrix.arch }}
path: ${{ github.workspace }}/awg-apple/Sources/WireGuardKitGo/out
if-no-files-found: error
retention-days: 7

github-release:
name: GitHub Release
needs: Build-WG-iOS
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')

steps:
- name: Setup | Checkout
uses: actions/checkout@v2

- name: Setup | Artifacts
uses: actions/download-artifact@v2

- name: Setup | Checksums
run: for file in $(find ./ -name '*.a' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done

- name: Zip ALL
run: for file in *; do zip -r ${file%.*}.zip $file; done

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "*.zip"
tag: ${{ github.ref }}
overwrite: true
file_glob: true

0 comments on commit 3fd1e3a

Please sign in to comment.