-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[awg]
- Loading branch information
Showing
1 changed file
with
23 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name: android-awg | ||
|
||
on: [push] | ||
|
||
|
||
jobs: | ||
|
||
|
@@ -15,59 +15,39 @@ jobs: | |
contains(github.event.head_commit.message, '[awg]') | ||
steps: | ||
|
||
- name: 'Setup Java' | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
|
||
- name: 'Setup Android' | ||
run: | | ||
export NDK_VERSION=23c | ||
export ANDROID_NDK_PLATFORM=android-23 | ||
export ANDROID_NDK_HOME=${{ runner.temp }}/android-ndk-r${NDK_VERSION} | ||
export ANDROID_NDK_ROOT=$ANDROID_NDK_HOME | ||
export ANDROID_CURRENT_ARCH=${{ matrix.arch }} | ||
if [ ! -f $ANDROID_NDK_ROOT/ndk-build ]; then | ||
wget https://dl.google.com/android/repository/android-ndk-r${NDK_VERSION}-linux.zip -qO ${{ runner.temp }}/ndk.zip && | ||
unzip -q -d ${{ runner.temp }} ${{ runner.temp }}/ndk.zip ; | ||
fi | ||
- name: 'Install GO' | ||
uses: actions/setup-go@v2 | ||
- name: 'Setup Android NDK' | ||
id: setup-ndk | ||
uses: nttld/setup-ndk@v1 | ||
with: | ||
go-version: 1.20.3 | ||
ndk-version: 'r26b' | ||
|
||
- name: 'Setup ccache' | ||
uses: hendrikmuhs/[email protected] | ||
|
||
- name: 'Get sources' | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
fetch-depth: 10 | ||
|
||
- name: 'Get Wireguard' | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Get AmneziaWG' | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: amnezia-vpn/amneziawg-android | ||
ref: master | ||
path: android/wireguard-android | ||
ref: fix/android | ||
path: android/amneziawg-android | ||
submodules: true | ||
|
||
- name: 'Build Wireguard binary' | ||
working-directory: android/wireguard-android | ||
run: | | ||
git submodule update --init --recursive | ||
echo "y" | /usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager "build-tools;34.0.0-rc3" | ||
./gradlew assembleRelease | ||
- name: 'Build AmneziaWG binary' | ||
working-directory: android/amneziawg-android | ||
run: ./gradlew :tunnel:stripReleaseDebugSymbols | ||
|
||
- name: Archive artifacts | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wg-android | ||
path: android/wireguard-android/tunnel/build/intermediates/stripped_native_libs/release/out/lib/* | ||
name: awg-android | ||
path: android/amneziawg-android/tunnel/build/intermediates/stripped_native_libs/release/out/lib/* | ||
|
||
github-release: | ||
name: GitHub Release | ||
|
@@ -77,10 +57,10 @@ jobs: | |
|
||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | Artifacts | ||
uses: actions/download-artifact@v2 | ||
uses: actions/download-artifact@v4 | ||
|
||
- name: Setup | Checksums | ||
run: for file in $(find ./ -name '*.so' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done | ||
|
@@ -95,5 +75,4 @@ jobs: | |
file: awg-android.zip | ||
tag: ${{ github.ref }} | ||
overwrite: true | ||
file_glob: true | ||
|
||
file_glob: true |