diff --git a/.github/workflows/libloading.yml b/.github/workflows/libloading.yml index 8ed2b7dac..74126fd71 100644 --- a/.github/workflows/libloading.yml +++ b/.github/workflows/libloading.yml @@ -48,6 +48,51 @@ jobs: - name: Compile without the standard library run: cargo clean && cargo +nightly build -Zbuild-std=core,alloc --no-default-features + freebsd-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: test freebsd + uses: cross-platform-actions/action@v0.29.0 + with: + memory: 512M + operating_system: freebsd + version: '14.3' + run: | + uname -a + echo "SETUP RUST" + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . "$HOME/.cargo/env" + echo "RUNNING TESTS" + cargo test --verbose --release + cargo test -- --nocapture + cargo test --release -- --nocapture + cargo test --no-default-features -- --nocapture + cargo test --release --no-default-features -- --nocapture + +# FIXME removing --test-threads=1 causes segfault. This also occurs on real hardware with netbsd. + netbsd-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: test netbsd + uses: cross-platform-actions/action@v0.29.0 + with: + memory: 1024M + operating_system: netbsd + version: '10.1' + run: | + uname -a + echo "SETUP RUST" + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . "$HOME/.cargo/env" + echo "RUNNING TESTS" + cargo test --verbose --release -- --test-threads=1 + cargo test -- --nocapture --test-threads=1 + cargo test --release -- --nocapture --test-threads=1 + cargo test --no-default-features -- --nocapture --test-threads=1 + cargo test --release --no-default-features -- --nocapture --test-threads=1 + windows-test: runs-on: windows-latest strategy: diff --git a/tests/functions.rs b/tests/functions.rs index 6f4fc2755..ea80a63de 100644 --- a/tests/functions.rs +++ b/tests/functions.rs @@ -349,6 +349,7 @@ fn test_static_ptr() { // Cygwin returns errors on `close`. #[cfg(not(target_os = "cygwin"))] #[cfg(feature = "std")] +#[cfg(not(target_os = "netbsd"))] //TODO FIXME, SEGFAULTS fn manual_close_many_times() { if is_wine() { // The wine runtime to run windows programs under linux diff --git a/tests/library_filename.rs b/tests/library_filename.rs index 7029e0a72..4c7f21d70 100644 --- a/tests/library_filename.rs +++ b/tests/library_filename.rs @@ -6,11 +6,13 @@ mod test { #[cfg(any(target_os = "windows", target_os = "cygwin"))] const EXPECTED: &str = "audioengine.dll"; - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "netbsd", target_os = "openbsd", target_os = "freebsd"))] const EXPECTED: &str = "libaudioengine.so"; #[cfg(target_os = "macos")] const EXPECTED: &str = "libaudioengine.dylib"; + + #[test] fn test_library_filename() { let name = "audioengine";