Skip to content

Build MacOS NE plugin awg/xray #11

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 54 additions & 54 deletions .github/workflows/build_awg_ios.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
---
name: awg-ios

on: [push]

on:
- push
jobs:

Build-WG-iOS:
name: 'AmneziaWG for iOS'
name: AmneziaWG for 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, '[macos-awg]') ||
contains(github.event.head_commit.message, '[macos-xray]') ||
contains(github.event.head_commit.message, '[awg]') ||
contains(github.event.head_commit.message, '[xray]') ||
contains(github.event.head_commit.message, '[ios-xray]')
strategy:
matrix:
arch: [arm64]

arch:
- arm64
- x86_64
platform:
- iphoneos16.2
- macosx13.1
exclude:
- arch: x86_64
platform: iphoneos16.2
steps:
- name: 'Install dependencies'
run: brew install swiftlint

- name: 'Setup/Update Go'
uses: actions/setup-go@v5
with:
go-version: '>=1.22.1'

- name: 'Get AmneziaWG'
uses: actions/checkout@v4
with:
repository: amnezia-vpn/amneziawg-apple
ref: feature/xray-merge
path: awg-apple

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

- name: 'Archive artifacts'
uses: actions/upload-artifact@v4
with:
name: awg-ios-${{ matrix.arch }}
path: ${{ github.workspace }}/awg-apple/Sources/WireGuardKitGo/out
if-no-files-found: error
retention-days: 7

- name: Install dependencies
run: brew install swiftlint
- name: Setup/Update Go
uses: actions/setup-go@v5
with:
go-version: ">=1.22.1"
- name: Get AmneziaWG
uses: actions/checkout@v4
with:
repository: amnezia-vpn/amneziawg-apple
ref: feature/xray-merge
path: awg-apple
- name: Build WG
working-directory: awg-apple/Sources/WireGuardKitGo
run: ARCHS=${{ matrix.arch }} PLATFORM_NAME=${{ matrix.platform }} make
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: awg-${{ matrix.platform }}-${{ 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@v4

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

- 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: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Artifacts
uses: actions/download-artifact@v4
- 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

- 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
4 changes: 3 additions & 1 deletion .github/workflows/build_cloak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:

- name: 'Build Cloak binary'
working-directory: Cloak
continue-on-error: true
run: |
export PATH=${PATH}:`go env GOPATH`/bin
v=${GITHUB_REF#refs/*/} ./release.sh
Expand Down Expand Up @@ -109,7 +110,8 @@ jobs:
- name: 'Run build script'
working-directory: Cloak
run: |
CGO_ENABLED=1 GOOS="darwin" GOARCH="amd64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/
CGO_ENABLED=1 GOOS="darwin" GOARCH="amd64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin-x86-64.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/
CGO_ENABLED=1 GOOS="darwin" GOARCH="arm64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin-arm64.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/

- name: Archive artifacts
uses: actions/upload-artifact@v3
Expand Down
Loading