mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-12-04 08:00:34 +00:00
Add optional connection-local recovery for native UDP peer traffic. Send sources immediately and emit fixed-rate GF(256) repair frames over a bounded sliding window. Negotiate bilateral activation and retain the existing control-traffic reservations and connection filtering paths. Expose FEC configuration, per-connection snapshots and nine network- level packet, byte and recovery counters through existing management APIs. Document frame accounting, MTU expansion, lifecycle and recovery limits. Include generated management bindings and focused codec, transport, negotiation and statistics coverage. Ensure pull-request CI executes applicable checks instead of reusing successful draft aggregates whose substantive jobs were skipped. Validate the final head on the current main merge tree: all seven CI workflows pass, including 2004 nextest tests. Reuse the existing stats counter implementation and its explicitly accepted concurrency limits. Retain the recorded low-loss performance acceptance failure as an accepted first-version limitation; this CI result is not performance acceptance. The existing FEC authentication/window review remains open and is explicitly deferred for a later unified repair.
166 lines
5.7 KiB
YAML
166 lines
5.7 KiB
YAML
name: EasyTier Mobile
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: ["develop", "main", "releases/**"]
|
|
pull_request:
|
|
branches: ["develop", "main"]
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
|
|
concurrency:
|
|
# A new PR or branch push must not cancel a full build.
|
|
group: ${{ github.workflow }}-${{ (github.event_name == 'workflow_dispatch' || startsWith(github.ref_name, 'releases/')) && 'full' || 'check' }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
defaults:
|
|
run:
|
|
# necessary for windows
|
|
shell: bash
|
|
|
|
jobs:
|
|
pre_job:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
|
|
env:
|
|
RELEVANT_PATHS: >-
|
|
["Cargo.toml", "Cargo.lock", "rust-toolchain.toml", ".cargo/**",
|
|
"pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "easytier/**",
|
|
"easytier-core/**", "easytier-proto/**", "easytier-rpc-build/**",
|
|
"easytier-gui/**", "tauri-plugin-vpnservice/**",
|
|
"easytier-web/frontend-lib/**", ".github/workflows/mobile.yml",
|
|
".github/actions/**"]
|
|
outputs:
|
|
full_build: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.ref_name, 'releases/') }}
|
|
# Release builds must run even if they only change release metadata.
|
|
should_skip: >-
|
|
${{
|
|
(
|
|
steps.skip_check.outputs.should_skip == 'true' ||
|
|
(
|
|
github.event_name == 'pull_request' &&
|
|
steps.path_filter.outputs.relevant != 'true'
|
|
)
|
|
) &&
|
|
github.event_name != 'workflow_dispatch' &&
|
|
!startsWith(github.ref_name, 'releases/')
|
|
}}
|
|
steps:
|
|
- id: skip_check
|
|
if: github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'releases/')
|
|
uses: fkirc/skip-duplicate-actions@v5
|
|
with:
|
|
concurrent_skipping: 'same_content_newer'
|
|
skip_after_successful_duplicate: 'true'
|
|
do_not_skip: '["pull_request", "workflow_dispatch", "schedule", "merge_group"]'
|
|
paths: ${{ env.RELEVANT_PATHS }}
|
|
|
|
- id: path_filter
|
|
if: >-
|
|
github.event_name == 'pull_request' &&
|
|
steps.skip_check.outputs.should_skip != 'true'
|
|
uses: dorny/paths-filter@v4
|
|
with:
|
|
filters: |
|
|
relevant: ${{ env.RELEVANT_PATHS }}
|
|
|
|
build-mobile:
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
ARCH: ${{ fromJSON(needs.pre_job.outputs.full_build == 'true' && '["aarch64", "armv7", "i686", "x86_64"]' || '["aarch64"]') }}
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NAME: easytier
|
|
TARGET: ${{ matrix.ARCH == 'armv7' && 'armv7-linux-androideabi' || format('{0}-linux-android', matrix.ARCH) }}
|
|
ARCH: ${{ matrix.ARCH }}
|
|
OSS_BUCKET: ${{ secrets.ALIYUN_OSS_BUCKET }}
|
|
needs: pre_job
|
|
if: needs.pre_job.outputs.should_skip != 'true'
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: Set current ref as env variable
|
|
run: |
|
|
echo "GIT_DESC=$(git log -1 --format=%cd.%h --date=format:%Y-%m-%d_%H:%M:%S)" >> $GITHUB_ENV
|
|
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'oracle'
|
|
java-version: '21'
|
|
|
|
- name: Setup Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
with:
|
|
cmdline-tools-version: '11076708'
|
|
packages: 'build-tools;34.0.0 ndk;26.0.10792818 platform-tools platforms;android-34 '
|
|
|
|
- name: Setup Android Environment
|
|
run: |
|
|
echo "$ANDROID_HOME/platform-tools" >> $GITHUB_PATH
|
|
echo "$ANDROID_HOME/ndk/26.0.10792818/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_PATH
|
|
echo "NDK_HOME=$ANDROID_HOME/ndk/26.0.10792818/" >> $GITHUB_ENV
|
|
|
|
- name: Prepare build environment
|
|
uses: ./.github/actions/prepare-build
|
|
with:
|
|
target: ${{ env.TARGET }}
|
|
gui: false
|
|
pnpm: true
|
|
pnpm-build-filter: easytier-gui...
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
# The prefix cache key, this can be changed to start a new cache manually.
|
|
# default: "v0-rust"
|
|
prefix-key: ""
|
|
shared-key: mobile-${{ env.TARGET }}-${{ needs.pre_job.outputs.full_build }}
|
|
cache-targets: "true"
|
|
save-if: ${{ github.event_name != 'pull_request' }}
|
|
|
|
- name: Check Android ARM64
|
|
if: needs.pre_job.outputs.full_build != 'true'
|
|
run: cargo check --locked --lib --target "$TARGET" --package easytier-gui --features custom-protocol
|
|
|
|
- name: Build
|
|
if: needs.pre_job.outputs.full_build == 'true'
|
|
run: |
|
|
cd easytier-gui
|
|
pnpm tauri android build --apk --target "$ARCH" --split-per-abi
|
|
|
|
- name: Collect artifact
|
|
if: needs.pre_job.outputs.full_build == 'true'
|
|
run: |
|
|
mkdir -p ./artifacts/objects/
|
|
mv easytier-gui/src-tauri/gen/android/app/build/outputs/apk/*/release/*.apk ./artifacts/objects/
|
|
|
|
if [[ $GITHUB_REF_TYPE =~ ^tag$ ]]; then
|
|
TAG=$GITHUB_REF_NAME
|
|
else
|
|
TAG=$GITHUB_SHA
|
|
fi
|
|
|
|
mv ./artifacts/objects/* ./artifacts/
|
|
rm -rf ./artifacts/objects/
|
|
|
|
- name: Archive artifact
|
|
if: needs.pre_job.outputs.full_build == 'true'
|
|
uses: actions/upload-artifact@v5
|
|
with:
|
|
name: easytier-mobile-android-${{ matrix.ARCH }}
|
|
path: |
|
|
./artifacts/*
|
|
|
|
mobile-result:
|
|
runs-on: ubuntu-latest
|
|
needs: [ pre_job, build-mobile ]
|
|
if: ${{ always() }}
|
|
steps:
|
|
- name: Mark result as failed
|
|
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
|
|
run: exit 1
|