Repository navigation
fix(*bsd): add missing source files for BSD OS #51
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| zig-version: ["0.14.1", "0.15.2", "0.16.0", "master"] | |
| os: [ubuntu-latest, windows-latest] | |
| include: | |
| - zig-version: "master" | |
| # -Dbuild-tests does not work when targeting Linux because the build | |
| # system doesn't preserve linker input file order, which causes the | |
| # linker to spew duplicate symbol errors. | |
| os: macos-latest | |
| check-format: true | |
| build-options: "-Dbuild-tests -Dbuild-benchmarks" | |
| - zig-version: "master" | |
| os: windows-latest | |
| build-options: "-Dtarget=native-native-msvc" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Zig | |
| uses: mlugg/setup-zig@v2 | |
| with: | |
| version: ${{ matrix.zig-version }} | |
| - if: ${{ matrix.check-format }} | |
| name: Check Formatting | |
| run: zig fmt --check --ast-check . | |
| - name: Build | |
| run: zig build ${{ matrix.build-options }} --summary all | |
| bsd: | |
| name: ${{ matrix.os }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| zig-version: [0.16.0] | |
| os: [freebsd, openbsd] | |
| include: | |
| - os: freebsd | |
| packages: pkg install -y curl | |
| - os: openbsd | |
| packages: pkg_add -I curl | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build (FreeBSD) | |
| if: matrix.os == 'freebsd' | |
| uses: vmactions/freebsd-vm@v1.5.9 | |
| with: &bsd_build | |
| cache-after-prepare: true | |
| copyback: false | |
| prepare: | | |
| ${{ matrix.packages }} | |
| mkdir -p /usr/local/zig | |
| curl -fsSL https://ziglang.org/download/${{ matrix.zig-version }}/zig-x86_64-${{ matrix.os }}-${{ matrix.zig-version }}.tar.xz -o /usr/local/zig/zig.tar.xz | |
| run: | | |
| set -e | |
| tar -xf /usr/local/zig/zig.tar.xz -C /usr/local/zig/ | |
| export PATH="/usr/local/zig/zig-x86_64-${{ matrix.os }}-${{ matrix.zig-version }}:$PATH" | |
| cat > ./uv_test.c <<'EOF' | |
| #include <uv.h> | |
| int main(void) { | |
| uv_loop_t* loop = uv_default_loop(); | |
| uv_interface_address_t* addrs; | |
| int count; | |
| if (uv_interface_addresses(&addrs, &count) == 0) | |
| uv_free_interface_addresses(addrs, count); | |
| return uv_run(loop, UV_RUN_DEFAULT); | |
| } | |
| EOF | |
| zig build --summary all | |
| zig cc -o ./uv_test ./uv_test.c -I zig-out/include -L zig-out/lib -luv | |
| ./uv_test | |
| - name: Build (OpenBSD) | |
| if: matrix.os == 'openbsd' | |
| uses: vmactions/openbsd-vm@v1.4.8 | |
| with: *bsd_build |