Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable on OpenBSD and FreeBSD #103

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ env:
RUSTFLAGS: --deny warnings

jobs:
build-and-test:
build-and-test-macos:
name: Build and test on macOS
strategy:
matrix:
# Keep MSRV in sync with rust-version in Cargo.toml as much as possible.
Expand All @@ -36,11 +37,38 @@ jobs:
# Since the tests modify global state (the system firewall) they cannot run in parallel.
# The integration tests must run as root since they write firewall state (/dev/pf)
run: sudo cargo test -- --test-threads=1

build-and-test-openbsd:
name: Build and test on OpenBSD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests inside an OpenBSD VM
uses: vmactions/openbsd-vm@v1
with:
usesh: true
copyback: false
prepare: |
pkg_add rust
run: |
cargo test -- --test-threads=1
build-and-test-freebsd:
name: Build and test on FreeBSD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run tests inside a FreeBSD VM
uses: vmactions/freebsd-vm@v1
with:
usesh: true
copyback: false
prepare: |
pkg install -y rust
run: |
cargo test -- --test-threads=1
# Make sure the library builds with all dependencies downgraded to their
# oldest versions allowed by the semver spec. This ensures we have not
# under-specified any dependency
minimal-versions:
minimal-versions-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
Expand Down
118 changes: 77 additions & 41 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ travis-ci = { repository = "mullvad/pfctl-rs" }

[dependencies]
error-chain = "0.12.4"
ioctl-sys = "0.8.0"
nix = { version = "0.26.4", features = ["ioctl"], default-features = false }
libc = "0.2.29"
derive_builder = "0.9"
ipnetwork = "0.20.0"
Expand Down
Loading