name: CI on: push: branches: [main] pull_request: branches: [main] env: ZIG_VERSION: "0.16.0" jobs: test: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Set up Zig uses: mlugg/setup-zig@v2 with: version: ${{ env.ZIG_VERSION }} - name: Run test suite (unit + hermetic loopback integration) run: zig build test -Dintegration cross: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Set up Zig uses: mlugg/setup-zig@v2 with: version: ${{ env.ZIG_VERSION }} - name: Build static musl executables run: zig build cross - name: Install file(1) run: | if ! command -v file >/dev/null 2>&1; then sudo apt-get update -qq sudo apt-get install -qq -y file fi - name: Assert executables exist and are statically linked run: | set -euo pipefail for triple in x86_64-linux-musl aarch64-linux-musl; do binary="zig-out/cross/$triple/nxdns" if [ ! -f "$binary" ]; then echo "missing executable: $binary" exit 1 fi description=$(file -b "$binary") echo "$triple: $description" case "$description" in *"statically linked"*) ;; *) echo "not statically linked: $binary" exit 1 ;; esac done