Browse Source

Add debug build for naive

世界 4 năm trước cách đây
mục cha
commit
4d89ff6e5c
2 tập tin đã thay đổi với 29 bổ sung0 xóa
  1. 28 0
      .github/workflows/debug.yml
  2. 1 0
      bin/libs/naive.sh

+ 28 - 0
.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

+ 1 - 0
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"'