Add post-build verification and Rust toolchain to FreeBSD CI #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: FreeBSD build | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| freebsd_build: | |
| runs-on: ubuntu-latest | |
| name: FreeBSD ${{ matrix.release }} build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| release: ['13.5', '14.3', '15.0'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Build and test on FreeBSD ${{ matrix.release }} | |
| uses: vmactions/freebsd-vm@v1 | |
| with: | |
| release: ${{ matrix.release }} | |
| usesh: true | |
| prepare: | | |
| pkg install -y cmake libevent speex gsm opus \ | |
| python3 libev libxml2 curl hiredis spandsp \ | |
| pkgconf openssl rust | |
| run: | | |
| set -e | |
| freebsd-version | |
| mkdir build && cd build | |
| cmake .. \ | |
| -DSEMS_USE_SPANDSP=ON \ | |
| -DSEMS_USE_OPUS=ON | |
| make -j$(sysctl -n hw.ncpu) sems_tests | |
| ./core/sems_tests | |
| make -j$(sysctl -n hw.ncpu) | |
| echo "=== Verifying built binaries ===" | |
| ./core/sems -v | |
| file ./core/sems | |
| ldd ./core/sems | |
| echo "=== Verifying monitoring tools ===" | |
| for tool in sems-list-calls sems-list-active-calls sems-list-finished-calls sems-get-callproperties; do | |
| if [ -f "./apps/monitoring/tools/target/release/${tool}" ]; then | |
| echo "OK: ${tool} (Rust binary)" | |
| file "./apps/monitoring/tools/target/release/${tool}" | |
| elif [ -f "./apps/monitoring/tools/target/debug/${tool}" ]; then | |
| echo "OK: ${tool} (Rust binary, debug)" | |
| file "./apps/monitoring/tools/target/debug/${tool}" | |
| else | |
| echo "FAIL: ${tool} not found" && exit 1 | |
| fi | |
| done | |
| echo "=== Verifying shared libraries ===" | |
| ls -la ./lib/*.so 2>/dev/null || ls -la ./lib/*.so.* 2>/dev/null || echo "No shared libs in ./lib/" | |
| ls ./apps/*/*.so 2>/dev/null | head -20 || true |