From 4d89ff6e5cbd07f5e807c43ee628d167c38c4bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Mon, 17 May 2021 09:08:07 +0800 Subject: [PATCH] Add debug build for naive --- .github/workflows/debug.yml | 28 ++++++++++++++++++++++++++++ bin/libs/naive.sh | 1 + 2 files changed, 29 insertions(+) diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index e83b0752..ce81d518 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -138,6 +138,34 @@ jobs: echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties ./run libs trojan_go ./gradlew trojan-go-plugin:assembleDebug + naive: + name: Native Build (NaïveProxy) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Fetch Status + run: git submodule status 'naive-plugin/*' > naive_status + - name: Naive Cache + id: cache + uses: actions/cache@v2 + with: + path: | + naive-plugin/src/main/jniLibs + key: ${{ hashFiles('bin/libs/naive.sh', 'naive_status') }} + - name: Gradle cache + uses: actions/cache@v2 + if: steps.cache.outputs.cache-hit != 'true' + with: + path: ~/.gradle + key: native-${{ hashFiles('**/*.gradle') }} + - name: Native Build + if: steps.cache.outputs.cache-hit != 'true' + run: | + echo "sdk.dir=${ANDROID_HOME}" > local.properties + echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties + ./run libs naive + ./gradlew naive-plugin:assembleDebug shadowsocks: name: Native Build (Shadowsocks) runs-on: ubuntu-latest diff --git a/bin/libs/naive.sh b/bin/libs/naive.sh index a1bd29cd..d048f6b2 100755 --- a/bin/libs/naive.sh +++ b/bin/libs/naive.sh @@ -6,6 +6,7 @@ ROOT="$PROJECT/naive-plugin/src/main/jniLibs" OUTPUT="naive" LIB_OUTPUT="lib$OUTPUT.so" +git submodule update --init --recursive 'naive-plugin/*' cd naive-plugin/src/main/jni/naiveproxy/src export EXTRA_FLAGS='target_os="android" target_cpu="arm"'