mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-31 22:45:45 +00:00
Modernize C builds with offline dependencies and portable runtime helpers (#3050)
Bundle pinned offline dependencies, remove libcork/libipset and submodule requirements, and add portable runtime helpers with relocatable static/shared library installations.
Add Clang static build validation for Linux/musl, macOS and Windows, real TCP/UDP and SIP003 interoperability coverage, and recorded performance tradeoffs. All 21 hosted checks pass at the reviewed PR head 8d504e6218.
This commit is contained in:
+21
-13
@@ -15,8 +15,6 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
@@ -47,21 +45,19 @@ jobs:
|
||||
|
||||
- name: Stress test
|
||||
run: |
|
||||
python3 tests/stress_test.py --bin build/shared/bin/ --size 10
|
||||
python3 tests/stress_test.py --bin build/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/
|
||||
bash tests/test_redir_qemu.sh build/bin/
|
||||
timeout-minutes: 8
|
||||
|
||||
asan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -78,7 +74,7 @@ jobs:
|
||||
run: ctest --test-dir build -LE memcheck --output-on-failure --no-tests=error
|
||||
|
||||
- name: Stress test (ASan + UBSan)
|
||||
run: python3 tests/stress_test.py --bin build/shared/bin/ --size 10
|
||||
run: python3 tests/stress_test.py --bin build/bin/ --size 10
|
||||
|
||||
clang-tidy:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -91,8 +87,6 @@ jobs:
|
||||
MAX_WARNINGS: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -104,7 +98,7 @@ jobs:
|
||||
|
||||
- name: Run clang-tidy on project sources
|
||||
run: |
|
||||
run-clang-tidy-18 -quiet -p build '/src/[^/]+\.c$' 2>/dev/null | tee tidy.log || true
|
||||
run-clang-tidy-18 -quiet -p build "$PWD/src/[^/]+\.c$" 2>/dev/null | tee tidy.log || true
|
||||
grep 'warning:' tidy.log | sort -u > warnings.txt || true
|
||||
count="$(wc -l < warnings.txt)"
|
||||
echo "clang-tidy warnings: $count (max allowed: $MAX_WARNINGS)"
|
||||
@@ -128,8 +122,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -145,7 +137,7 @@ jobs:
|
||||
- name: Run tests
|
||||
run: |
|
||||
ctest --test-dir build -LE memcheck --output-on-failure --no-tests=error
|
||||
python3 tests/stress_test.py --bin build/shared/bin/ --size 10
|
||||
python3 tests/stress_test.py --bin build/bin/ --size 10
|
||||
|
||||
- name: Generate coverage report
|
||||
run: |
|
||||
@@ -162,3 +154,19 @@ jobs:
|
||||
with:
|
||||
name: coverage-html
|
||||
path: build/coverage-html/
|
||||
|
||||
interop:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Install dependencies and independent peer
|
||||
run: brew install mbedtls@3 libsodium libev c-ares pcre2 shadowsocks-rust
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -S . -B build -DSS_DEPENDENCY_MODE=system -DWITH_STATIC=OFF
|
||||
cmake --build build --parallel
|
||||
- name: Required interoperability
|
||||
env:
|
||||
SS_REQUIRE_INTEROP: '1'
|
||||
SS_BIN_DIR: build/bin
|
||||
run: bash tests/test_interop_rust.sh
|
||||
|
||||
Reference in New Issue
Block a user