mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-03 16:45:53 +00:00
Boot a minimal Alpine Linux guest in QEMU with iptables, ss-redir, and ss-nat to verify the full transparent proxy chain: iptables REDIRECT → ss-redir → ss-server (host) → internet. The host-built ss-redir binary and its shared library dependencies are copied into the Alpine rootfs, avoiding static linking issues. Uses QEMU user-mode networking with KVM acceleration when available. Linux-only CI step with 8-minute timeout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install dependencies (Linux)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libpcre2-dev libmbedtls-dev libsodium-dev libev-dev libc-ares-dev
|
|
|
|
- name: Install dependencies (macOS)
|
|
if: runner.os == 'macOS'
|
|
run: brew install mbedtls@3 libsodium libev c-ares pcre2
|
|
|
|
- name: Build
|
|
run: |
|
|
mkdir -p build && cd build
|
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_STATIC=OFF
|
|
make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu)
|
|
|
|
- name: Unit tests
|
|
run: |
|
|
cd build
|
|
ctest --output-on-failure
|
|
|
|
- name: ss-setup TUI tests
|
|
run: bash tests/test_ss_setup.sh
|
|
|
|
- name: Stress test
|
|
run: |
|
|
python3 tests/stress_test.py --bin build/shared/bin/ --size 10
|
|
|
|
- name: ss-redir transparent proxy test (QEMU)
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get install -y qemu-system-x86
|
|
bash tests/test_redir_qemu.sh build/shared/bin/
|
|
timeout-minutes: 8
|