mirror of
https://github.com/dyhkwong/Exclave.git
synced 2026-06-20 19:26:17 +08:00
249 lines
7.9 KiB
YAML
249 lines
7.9 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 '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 libs core
|
|
v2ray:
|
|
name: Native Build (V2Ray)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Fetch Status
|
|
run: git submodule status v2ray > v2ray_status
|
|
- name: V2Ray Cache
|
|
id: cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
app/libs/libv2ray.aar
|
|
key: ${{ hashFiles('bin/libs/v2ray/*', 'v2ray_status') }}
|
|
- name: Install Golang
|
|
uses: actions/setup-go@v2
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
with:
|
|
go-version: 1.16
|
|
- 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 v2ray
|
|
xtls:
|
|
name: Native Build (XTLS)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Fetch Status
|
|
run: git submodule status 'xtls-plugin/*' > xtls_status
|
|
- name: XTLS Cache
|
|
id: cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
xtls-plugin/src/main/jniLibs
|
|
key: ${{ hashFiles('bin/libs/xtls.sh', 'xtls_status') }}
|
|
- name: Install Golang
|
|
uses: actions/setup-go@v2
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
with:
|
|
go-version: 1.16
|
|
- 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 xtls
|
|
./gradlew xtls-plugin:assembleDebug
|
|
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 'trojan-go-plugin/*' > trojan_go_status
|
|
- name: Trojan-Go Cache
|
|
id: cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
trojan-go-plugin/src/main/jniLibs
|
|
key: ${{ hashFiles('bin/libs/trojan_go.sh', 'trojan_go_status') }}
|
|
- name: Install Golang
|
|
uses: actions/setup-go@v2
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
with:
|
|
go-version: 1.16
|
|
- 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 trojan_go
|
|
./gradlew trojan-go-plugin:assembleDebug
|
|
shadowsocks:
|
|
name: Native Build (Shadowsocks)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Fetch Status
|
|
run: git submodule status 'shadowsocks/*' > shadowsocks_status
|
|
- name: Shadowsocks Cache
|
|
id: cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
app/libs/shadowsocks-release.aar
|
|
key: ${{ hashFiles('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 libs shadowsocks
|
|
shadowsocksr:
|
|
name: Native Build (ShadowsocksR)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Fetch Status
|
|
run: git submodule status '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 libs 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 'core/*' > core_status
|
|
git submodule status 'shadowsocks/*' > shadowsocks_status
|
|
git submodule status 'shadowsocksr/*' > shadowsocksr_status
|
|
git submodule status 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/libs/v2ray/*', 'v2ray_status') }}
|
|
- name: Shadowsocks Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
app/libs/shadowsocks-release.aar
|
|
key: ${{ hashFiles('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 |