Files
Exclave/.github/workflows/debug.yml
2021-05-29 22:56:07 +08:00

320 lines
10 KiB
YAML

name: Debug build
on:
push:
branches:
- dev
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/debug.yml'
pull_request:
branches:
- dev
jobs:
core:
name: Native Build (Core)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: git submodule status 'library/core/*' > core_status
- name: Core Cache
id: cache
uses: actions/cache@v2
with:
path: |
app/libs/core-release.aar
key: ${{ hashFiles('core_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 lib core
v2ray:
name: Native Build (V2Ray)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: git submodule status library/v2ray > v2ray_status
- name: V2Ray Cache
id: cache
uses: actions/cache@v2
with:
path: |
app/libs/libv2ray.aar
key: ${{ hashFiles('bin/lib/v2ray/*', 'v2ray_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 lib v2ray
xtls:
name: Native Build (XTLS)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: git submodule status 'plugin/xtls/*' > xtls_status
- name: XTLS Cache
id: cache
uses: actions/cache@v2
with:
path: |
plugin/xtls/src/main/jniLibs
key: ${{ hashFiles('bin/lib/xtls/*', 'xtls_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 xtls
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('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.16
- 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 }}
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('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('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('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
shadowsocks:
name: Native Build (Shadowsocks)
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-release.aar
key: ${{ hashFiles('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') }}
- 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 lib shadowsocks
shadowsocksr:
name: Native Build (ShadowsocksR)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: git submodule status 'library/shadowsocksr/*' > shadowsocksr_status
- name: ShadowsocksR Cache
id: cache
uses: actions/cache@v2
with:
path: |
app/libs/shadowsocksr-release.aar
key: ${{ hashFiles('shadowsocksr_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 lib shadowsocksr
build:
name: Gradle Build
runs-on: ubuntu-latest
needs:
- core
- v2ray
- shadowsocks
- shadowsocksr
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: |
git submodule status 'library/core/*' > core_status
git submodule status 'library/shadowsocks/*' > shadowsocks_status
git submodule status 'library/shadowsocksr/*' > shadowsocksr_status
git submodule status library/v2ray > v2ray_status
- name: Core Cache
uses: actions/cache@v2
with:
path: |
app/libs/core-release.aar
key: ${{ hashFiles('core_status') }}
- name: V2Ray Cache
uses: actions/cache@v2
with:
path: |
app/libs/libv2ray.aar
key: ${{ hashFiles('bin/lib/v2ray/*', 'v2ray_status') }}
- name: Shadowsocks Cache
uses: actions/cache@v2
with:
path: |
app/libs/shadowsocks-release.aar
key: ${{ hashFiles('library/shadowsocks/build.gradle.kts', 'shadowsocks_status') }}
- name: ShadowsocksR Cache
uses: actions/cache@v2
with:
path: |
app/libs/shadowsocksr-release.aar
key: ${{ hashFiles('shadowsocksr_status') }}
- name: Gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle
key: gradle-${{ hashFiles('**/*.gradle') }}
- name: Debug Build
run: |
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/21.4.7075529" >> local.properties
./run update_assets
./gradlew app:assembleOssDebug