Skip to content

server: show per-flow packet direction counts #28

server: show per-flow packet direction counts

server: show per-flow packet direction counts #28

name: Build Artifacts
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
docker-image:
name: Docker Image Artifact
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Compute GHCR image name
id: image
run: echo "name=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/bonded-server" >> "$GITHUB_OUTPUT"
- name: Build bonded-server image tarball
uses: docker/build-push-action@v6
with:
context: .
file: server/Dockerfile
push: false
tags: bonded-server:${{ github.sha }}
outputs: type=docker,dest=/tmp/bonded-server-image.tar
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Log in to GHCR
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push bonded-server image to GHCR
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v6
with:
context: .
file: server/Dockerfile
push: true
tags: |
${{ steps.image.outputs.name }}:sha-${{ github.sha }}
${{ steps.image.outputs.name }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Upload Docker image artifact
uses: actions/upload-artifact@v4
with:
name: bonded-server-image-${{ github.sha }}
path: /tmp/bonded-server-image.tar
if-no-files-found: error
retention-days: 7
android-apk:
name: Android APK Artifact
runs-on: ubuntu-latest
env:
ANDROID_PLATFORM: "android-36"
ANDROID_BUILD_TOOLS: "35.0.0"
ANDROID_NDK_VERSION: "28.2.13676358"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "17"
- name: Set up Android SDK tools
uses: android-actions/setup-android@v3
- name: Install Android SDK components
run: |
yes | sdkmanager --licenses
sdkmanager \
"platform-tools" \
"platforms;${ANDROID_PLATFORM}" \
"build-tools;${ANDROID_BUILD_TOOLS}" \
"ndk;${ANDROID_NDK_VERSION}"
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.88.0
targets: aarch64-linux-android,x86_64-linux-android
- name: Install cargo-ndk
run: cargo install cargo-ndk --locked
- name: Build Rust Android JNI libraries
env:
ANDROID_NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}
ANDROID_NDK_ROOT: ${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}
run: |
cargo ndk \
-t arm64-v8a \
-t x86_64 \
-o android/android/app/src/main/jniLibs \
build -p bonded-ffi --release
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Build debug APK
working-directory: android
run: |
flutter pub get
flutter build apk --debug
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: bonded-android-apk-${{ github.sha }}
path: android/build/app/outputs/flutter-apk/app-debug.apk
if-no-files-found: error
retention-days: 7