| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298 |
- name: Debug build
- on:
- push:
- branches:
- - dev
- paths-ignore:
- - '**.md'
- - '.github/**'
- - '!.github/workflows/debug.yml'
- pull_request:
- branches:
- - dev
- jobs:
- setup:
- name: Setup
- runs-on: ubuntu-latest
- steps:
- - name: Cancel previous
- uses: styfle/[email protected]
- with:
- access_token: ${{ github.token }}
- libcore:
- name: Native Build (LibCore)
- runs-on: ubuntu-latest
- needs:
- - setup
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Fetch Status
- run: git submodule status library/core > libcore_status
- - name: LibCore Cache
- id: cache
- uses: actions/cache@v3
- with:
- path: |
- app/libs/libcore.aar
- key: ${{ hashFiles('.github/workflows/*', 'bin/lib/core/*', 'libcore_status') }}
- - name: Get latest go version
- id: version
- if: steps.cache.outputs.cache-hit != 'true'
- run: |
- echo go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g') >> $GITHUB_OUTPUT
- - name: Setup Go
- uses: actions/setup-go@v3
- if: steps.cache.outputs.cache-hit != 'true'
- with:
- # Bug: https://github.com/golang/go/issues/58426
- # go-version: ${{ steps.version.outputs.go_version }}
- go-version: 1.19.8
- - 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
- needs:
- - setup
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Fetch Status
- run: git submodule status 'plugin/trojan-go/*' > trojan_go_status
- - name: Trojan-Go Cache
- id: cache
- uses: actions/cache@v3
- 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@v3
- 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
- needs:
- - setup
- name: Native Build (NaïveProxy)
- strategy:
- fail-fast: false
- matrix:
- arch: [ armeabi-v7a, arm64-v8a, x86, x86_64 ]
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Fetch Status
- run: git submodule status 'plugin/naive/*' > naive_status
- - name: Naive Cache
- id: cache
- uses: actions/cache@v3
- 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@v3
- with:
- name: "NAIVE-SHA256-${{ matrix.arch }} ${{ env.SHA256SUM }}"
- path: sha256sum.txt
- # pingtunnel:
- # name: Native Build (PingTunnel)
- # runs-on: ubuntu-latest
- # needs:
- # - setup
- # steps:
- # - name: Checkout
- # uses: actions/checkout@v3
- # - name: Fetch Status
- # run: git submodule status 'plugin/pingtunnel/*' > pt_status
- # - name: PingTunnel Cache
- # id: cache
- # uses: actions/cache@v3
- # with:
- # path: |
- # plugin/pingtunnel/src/main/jniLibs
- # key: ${{ hashFiles('.github/workflows/*', 'bin/lib/pingtunnel/*', 'pt_status') }}
- # - name: Install Golang
- # uses: actions/setup-go@v3
- # 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
- needs:
- - setup
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Fetch Status
- run: git submodule status 'plugin/relaybaton/*' > rb_status
- - name: RelayBaton Cache
- id: cache
- uses: actions/cache@v3
- with:
- path: |
- plugin/relaybaton/src/main/jniLibs
- key: ${{ hashFiles('.github/workflows/*', 'bin/lib/relaybaton/*', 'rb_status') }}
- - name: Install Golang
- uses: actions/setup-go@v3
- if: steps.cache.outputs.cache-hit != 'true'
- with:
- go-version: 1.18.10
- - name: Native Build
- if: steps.cache.outputs.cache-hit != 'true'
- run: ./run plugin relaybaton
- brook:
- name: Native Build (Brook)
- runs-on: ubuntu-latest
- needs:
- - setup
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Fetch Status
- run: git submodule status 'plugin/brook/*' > brook_status
- - name: Brook Cache
- id: cache
- uses: actions/cache@v3
- with:
- path: |
- plugin/brook/src/main/jniLibs
- key: ${{ hashFiles('.github/workflows/*', 'bin/lib/brook/*', 'brook_status') }}
- - name: Install Golang
- uses: actions/setup-go@v3
- if: steps.cache.outputs.cache-hit != 'true'
- with:
- go-version: 1.18.0
- - name: Native Build
- if: steps.cache.outputs.cache-hit != 'true'
- run: ./run plugin brook
- hysteria:
- name: Native Build (Hysteria)
- runs-on: ubuntu-latest
- needs:
- - setup
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Fetch Status
- run: git submodule status 'plugin/hysteria/*' > hysteria_status
- - name: Hysteria Cache
- id: cache
- uses: actions/cache@v3
- with:
- path: |
- plugin/hysteria/src/main/jniLibs
- key: ${{ hashFiles('.github/workflows/*', 'bin/lib/hysteria/*', 'hysteria_status') }}
- - name: Install Golang
- uses: actions/setup-go@v3
- if: steps.cache.outputs.cache-hit != 'true'
- with:
- go-version: 1.18.6
- - name: Native Build
- if: steps.cache.outputs.cache-hit != 'true'
- run: ./run plugin hysteria
- mieru:
- name: Native Build (Mieru)
- runs-on: ubuntu-latest
- needs:
- - setup
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Fetch Status
- run: git submodule status 'plugin/mieru/*' > mieru_status
- - name: Mieru Cache
- id: cache
- uses: actions/cache@v3
- with:
- path: |
- plugin/mieru/src/main/jniLibs
- key: ${{ hashFiles('.github/workflows/*', 'bin/lib/mieru/*', 'mieru_status') }}
- - name: Install Golang
- uses: actions/setup-go@v3
- if: steps.cache.outputs.cache-hit != 'true'
- with:
- go-version: 1.20.2
- - name: Native Build
- if: steps.cache.outputs.cache-hit != 'true'
- run: ./run plugin mieru
- tuic:
- name: Native Build (TUIC)
- runs-on: ubuntu-latest
- needs:
- - setup
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Fetch Status
- run: git submodule status 'plugin/tuic/*' > tuic_status
- - name: Tuic Cache
- id: cache
- uses: actions/cache@v3
- with:
- path: |
- plugin/tuic/src/main/jniLibs
- key: ${{ hashFiles('.github/workflows/*', 'bin/lib/tuic/*', 'tuic_status') }}
- - name: Install toolchain
- run: |
- rustup toolchain install stable
- rustup override set stable
- if: steps.cache.outputs.cache-hit != 'true'
- - name: Install rust android target
- run: ./run init action rust
- if: steps.cache.outputs.cache-hit != 'true'
- - name: Native Build
- if: steps.cache.outputs.cache-hit != 'true'
- run: ./run plugin tuic
- lint:
- name: Android Lint
- runs-on: ubuntu-latest
- needs:
- - libcore
- steps:
- - name: Checkout
- uses: actions/checkout@v3
- - name: Fetch Status
- run: |
- git submodule status library/core > libcore_status
- - name: LibCore Cache
- uses: actions/cache@v3
- with:
- path: |
- app/libs/libcore.aar
- key: ${{ hashFiles('.github/workflows/*', 'bin/lib/core/*', 'libcore_status') }}
- - name: Gradle cache
- uses: actions/cache@v3
- 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/25.0.8775105" >> local.properties
- ./run init action library
- ./run lint
|