name: Debug build on: push: branches: - dev - v5 paths-ignore: - '**.md' - '.github/**' - '!.github/workflows/debug.yml' pull_request: branches: - dev - v5 jobs: libcore: name: Native Build (LibCore) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status library/core > libcore_status - name: LibCore Cache id: cache uses: actions/cache@v2 with: path: | app/libs/libcore.aar key: ${{ hashFiles('.github/workflows/*', 'bin/lib/core/*', 'libcore_status') }} - name: Install Golang uses: actions/setup-go@v2 if: steps.cache.outputs.cache-hit != 'true' with: go-version: 1.17.1 - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run lib core trojan-go: name: Native Build (Trojan-Go) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status 'plugin/trojan-go/*' > trojan_go_status - name: Trojan-Go Cache id: cache uses: actions/cache@v2 with: path: | plugin/trojan-go/src/main/jniLibs key: ${{ hashFiles('.github/workflows/*', 'bin/lib/trojan_go/*', 'trojan_go_status') }} - name: Install Golang uses: actions/setup-go@v2 if: steps.cache.outputs.cache-hit != 'true' with: go-version: 1.17.1 - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run plugin trojan_go naive: runs-on: ubuntu-latest name: Native Build (NaïveProxy) strategy: fail-fast: false matrix: arch: [ armeabi-v7a, arm64-v8a, x86, x86_64 ] steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status 'plugin/naive/*' > naive_status - name: Naive Cache id: cache uses: actions/cache@v2 with: path: | plugin/naive/src/main/jniLibs/${{ matrix.arch }} key: naive-${{ matrix.arch }}-${{ hashFiles('bin/plugin/naive/*', 'naive_status') }} - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: | ./run init action naive ./run plugin naive init ./run plugin naive ${{ matrix.arch }} - name: Calculate SHA256 run: | openssl sha256 plugin/naive/src/main/jniLibs/${{ matrix.arch }}/libnaive.so > sha256sum.txt echo "SHA256SUM=$(cut -d' ' -f2 sha256sum.txt)" >>$GITHUB_ENV - uses: actions/upload-artifact@v2 with: name: "NAIVE-SHA256-${{ matrix.arch }} ${{ env.SHA256SUM }}" path: sha256sum.txt pingtunnel: name: Native Build (PingTunnel) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status 'plugin/pingtunnel/*' > pt_status - name: PingTunnel Cache id: cache uses: actions/cache@v2 with: path: | plugin/pingtunnel/src/main/jniLibs key: ${{ hashFiles('.github/workflows/*', 'bin/lib/pingtunnel/*', 'pt_status') }} - name: Install Golang uses: actions/setup-go@v2 if: steps.cache.outputs.cache-hit != 'true' with: go-version: 1.16 - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run plugin pingtunnel relaybaton: name: Native Build (RelayBaton) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status 'plugin/relaybaton/*' > rb_status - name: RelayBaton Cache id: cache uses: actions/cache@v2 with: path: | plugin/relaybaton/src/main/jniLibs key: ${{ hashFiles('.github/workflows/*', 'bin/lib/relaybaton/*', 'rb_status') }} - name: Install Golang uses: actions/setup-go@v2 if: steps.cache.outputs.cache-hit != 'true' with: go-version: 1.16 - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run plugin relaybaton brook: name: Native Build (Brook) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status 'plugin/brook/*' > brook_status - name: Brook Cache id: cache uses: actions/cache@v2 with: path: | plugin/brook/src/main/jniLibs key: ${{ hashFiles('.github/workflows/*', 'bin/lib/brook/*', 'brook_status') }} - name: Install Golang uses: actions/setup-go@v2 if: steps.cache.outputs.cache-hit != 'true' with: go-version: 1.16 - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run plugin brook hysteria: name: Native Build (Hysteria) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status 'plugin/hysteria/*' > hysteria_status - name: Hysteria Cache id: cache uses: actions/cache@v2 with: path: | plugin/hysteria/src/main/jniLibs key: ${{ hashFiles('.github/workflows/*', 'bin/lib/hysteria/*', 'hysteria_status') }} - name: Install Golang uses: actions/setup-go@v2 if: steps.cache.outputs.cache-hit != 'true' with: go-version: 1.17.1 - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run plugin hysteria wireguard: name: Native Build (WireGuard) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status 'plugin/wireguard/*' > wireguard_status - name: WireGuard Cache id: cache uses: actions/cache@v2 with: path: | plugin/wireguard/src/main/jniLibs key: ${{ hashFiles('.github/workflows/*', 'bin/lib/wireguard/*', 'wireguard_status') }} - name: Install Golang uses: actions/setup-go@v2 if: steps.cache.outputs.cache-hit != 'true' with: go-version: 1.17.1 - name: Native Build if: steps.cache.outputs.cache-hit != 'true' run: ./run plugin wireguard shadowsocks: name: Native Build (shadowsocks-rust) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status 'library/shadowsocks/*' > shadowsocks_status - name: Shadowsocks Cache id: cache uses: actions/cache@v2 with: path: | app/libs/shadowsocks.aar key: ${{ hashFiles('gradle/**', 'library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }} - name: Install Rust if: steps.cache.outputs.cache-hit != 'true' run: ./run init action shadowsocks - name: Gradle cache uses: actions/cache@v2 if: steps.cache.outputs.cache-hit != 'true' with: path: ~/.gradle key: native-${{ hashFiles('**/*.gradle.kts') }} - name: Native Build if: steps.cache.outputs.cache-hit != 'true' env: BUILD_PLUGIN: none run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties ./run init action library ./run lib shadowsocks shadowsocks_libev: name: Native Build (shadowsocks-libev) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: git submodule status 'library/shadowsocks-libev/*' > shadowsocks_status - name: shadowsocks-libev Cache id: cache uses: actions/cache@v2 with: path: | app/libs/shadowsocks-libev.aar key: ${{ hashFiles('gradle/**', 'library/shadowsocks-libev/build.gradle.kts', 'shadowsocks_status') }} - name: Gradle cache uses: actions/cache@v2 if: steps.cache.outputs.cache-hit != 'true' with: path: ~/.gradle key: native-${{ hashFiles('**/*.gradle.kts') }} - name: Native Build if: steps.cache.outputs.cache-hit != 'true' env: BUILD_PLUGIN: none run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties ./run init action library ./run lib shadowsocks_libev build: name: Gradle Build runs-on: ubuntu-latest needs: - libcore - shadowsocks - shadowsocks_libev steps: - name: Checkout uses: actions/checkout@v2 - name: Fetch Status run: | git submodule status 'library/shadowsocks/*' > shadowsocks_status git submodule status 'library/shadowsocks-libev/*' > shadowsocks_libev_status git submodule status library/core > libcore_status - name: LibCore Cache uses: actions/cache@v2 with: path: | app/libs/libcore.aar key: ${{ hashFiles('.github/workflows/*', 'bin/lib/core/*', 'libcore_status') }} - name: Shadowsocks Cache uses: actions/cache@v2 with: path: | app/libs/shadowsocks.aar key: ${{ hashFiles('library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }} - name: Shadowsocks (libev) Cache uses: actions/cache@v2 with: path: | app/libs/shadowsocks-libev.aar key: ${{ hashFiles('library/shadowsocks-libev/build.gradle.kts', 'shadowsocks_libev_status') }} - name: Gradle cache uses: actions/cache@v2 with: path: ~/.gradle key: gradle-${{ hashFiles('**/*.gradle.kts') }} - name: Debug Build env: BUILD_PLUGIN: none run: | echo "sdk.dir=${ANDROID_HOME}" > local.properties echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties ./run init action library ./gradlew app:assembleOssDebug