Files
Exclave/.github/workflows/debug.yml
2021-12-10 18:54:37 +08:00

216 lines
6.7 KiB
YAML

name: Debug build
on:
push:
branches:
- dev
paths-ignore:
- '**.md'
- '.github/**'
- '!.github/workflows/debug.yml'
pull_request:
branches:
- dev
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.5
- 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.5
- name: Native Build
if: steps.cache.outputs.cache-hit != 'true'
run: ./run plugin hysteria
lint:
name: Android Lint
runs-on: ubuntu-latest
needs:
- libcore
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Fetch Status
run: |
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: Gradle cache
uses: actions/cache@v2
with:
path: ~/.gradle
key: gradle-${{ hashFiles('**/*.gradle.kts') }}
- name: Android Lint
env:
BUILD_PLUGIN: none
run: |
echo "sdk.dir=${ANDROID_HOME}" > local.properties
echo "ndk.dir=${ANDROID_HOME}/ndk/23.1.7779620" >> local.properties
./run init action library
./run lint