Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
66 changes: 0 additions & 66 deletions .cirrus.yml

This file was deleted.

175 changes: 175 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,181 @@ jobs:
- name: before_cache_script
run: sudo rm -rf $CARGO_HOME/registry/index;

# Jobs that use nested virtualization
vmactions:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- os: freebsd
version: "14.4"
arch: x86_64

# Disable FreeBSD/aarch64 because it's too slow
#- os: freebsd
#version: "15.0"
#arch: aarch64

# Disable Haiku because Nix doesn't have a Haiku maintainer who can
# fix the tests for us.
#- os: haiku
#version: "r1beta5"
#arch: x86_64

# Disable NetBSD because Nix doesn't have a NetBSD maintainer who can
# fix the tests for us.
#- os: netbsd
#version: "10.1"
#arch: x86_64

# Disable OmniOS because Nix doesn't have a OmniOS maintainer who can
Comment thread
SteveLauC marked this conversation as resolved.
Outdated
# fix the tests for us.
#- os: omnios
#version: "r151056"
#arch: x86_64

# Disable OpenBSD because Nix doesn't have a OpenBSD maintainer who
Comment thread
SteveLauC marked this conversation as resolved.
Outdated
# can fix the tests for us.
#- os: openbsd
#version: "7.8"
#arch: x86_64
steps:
- uses: actions/checkout@v6
Comment thread
SteveLauC marked this conversation as resolved.

- name: Start VM
if: matrix.os == 'freebsd'
uses: vmactions/freebsd-vm@v1
with:
release: ${{ matrix.version }}
arch: ${{ matrix.arch }}
usesh: true
custom-shell-name: vmsh
- name: Start VM
if: matrix.os == 'haiku'
uses: vmactions/haiku-vm@v1
with:
release: ${{ matrix.version }}
arch: ${{ matrix.arch }}
usesh: true
custom-shell-name: vmsh
- name: Start VM
if: matrix.os == 'netbsd'
uses: vmactions/netbsd-vm@v1
with:
release: ${{ matrix.version }}
arch: ${{ matrix.arch }}
usesh: true
custom-shell-name: vmsh
- name: Start VM
if: matrix.os == 'omnios'
uses: vmactions/omnios-vm@v1
with:
release: ${{ matrix.version }}
arch: ${{ matrix.arch }}
usesh: true
custom-shell-name: vmsh
- name: Start VM
if: matrix.os == 'openbsd'
uses: vmactions/openbsd-vm@v1
with:
release: ${{ matrix.version }}
arch: ${{ matrix.arch }}
usesh: true
custom-shell-name: vmsh

- name: Install dependencies
if: matrix.arch == 'x86_64' && matrix.os == 'freebsd'
shell: vmsh {0}
run: |
pkg install -y curl
kldload mqueuefs
fetch https://sh.rustup.rs -o rustup.sh
sh rustup.sh -y --profile=minimal --default-toolchain stable
. $HOME/.cargo/env
rustc -vV
rustup component add clippy
- name: Install dependencies
if: matrix.arch == 'aarch64' && matrix.os == 'freebsd'
Comment thread
SteveLauC marked this conversation as resolved.
shell: vmsh {0}
run: |
pkg install -y rust
kldload mqueuefs
rustc -vV
- name: Install dependencies
if: matrix.os == 'haiku'
shell: vmsh {0}
run: |
pkgman install -y rust_bin
rustc -vV
- name: Install dependencies
if: matrix.os == 'netbsd'
shell: vmsh {0}
run: |
pkg_add curl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install dependencies
if: matrix.os == 'omnios'
shell: vmsh {0}
run: |
pkg install developer/build-essential
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: Install dependencies
if: matrix.os == 'openbsd'
shell: vmsh {0}
run: |
pkg_add rust
rustc -vV

- name: Build
shell: vmsh {0}
run: |
if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi
cargo build --all-targets --all-features
- name: Test
shell: vmsh {0}
run: |
if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi
cargo test --all-targets --all-features
- name: Clippy
shell: vmsh {0}
run: |
if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi
cargo clippy --all-targets --all-features -- -D warnings -A unknown-lints
- name: Doc
shell: vmsh {0}
run: |
if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi
cargo doc --no-deps --all-features

- name: Hack
if: matrix.arch == 'x86_64' && matrix.os == 'freebsd'
shell: vmsh {0}
run: |
if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi
mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-freebsd.tar.gz | tar xzf - -C ~/.cargo/bin
cargo hack check --each-feature

- name: i686 Build
if: matrix.arch == 'aarch64' && matrix.os == 'freebsd'
shell: vmsh {0}
run: |
if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi
rustup target add i686-unknown-freebsd
cargo build --target i686-unknown-freebsd --all-features --all-targets
- name: i686 Test
if: matrix.arch == 'aarch64' && matrix.os == 'freebsd'
shell: vmsh {0}
run: |
if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi
cargo test --all-targets --all-features --target i686-unknown-freebsd
Comment thread
SteveLauC marked this conversation as resolved.
Outdated
- name: i686 Doc
Comment thread
SteveLauC marked this conversation as resolved.
if: matrix.arch == 'aarch64' && matrix.os == 'freebsd'
shell: vmsh {0}
run: |
if [ -f $HOME/.cargo/env ]; then . $HOME/.cargo/env; fi
cargo doc --no-deps --all-features --target i686-unknown-freebsd
Comment thread
SteveLauC marked this conversation as resolved.
Outdated

# Tasks for cross-compiling, but no testing
cross_compiling:
Expand Down
17 changes: 6 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,15 @@ requests to include tests where they make sense. For example, when fixing a bug,
add a test that would have failed without the fix.

After you've made your change, make sure the tests pass in your development
environment. We also have continuous integration set up on [Cirrus-CI][cirrus-ci]
and GitHub Action, which might find some issues on other platforms. The CI will
run once you open a pull request.

[cirrus-ci]: https://cirrus-ci.com/github/nix-rust/nix
environment. We also have continuous integration set up on GitHub Workflows,
which might find some issues on other platforms. The CI will run once you open
a pull request.
Comment thread
SteveLauC marked this conversation as resolved.
Outdated

### Disabling a test in the CI environment

Sometimes there are features that cannot be tested in the CI environment. To
stop a test from running under CI, add `skip_if_cirrus!()` to it. Please
describe the reason it shouldn't run under CI, and a link to an issue if
possible! Other tests cannot be run under QEMU, which is used for some
architectures. To skip them, add a `#[cfg_attr(qemu, ignore)]` attribute to
the test.
Some tests cannot be run under QEMU usermode emulation, which is used for some
architectures. To skip them, add a `#[cfg_attr(qemu, ignore)]` attribute to the
test.

## GitHub Merge Queues

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Rust bindings to *nix APIs

[![Cirrus Build Status](https://api.cirrus-ci.com/github/nix-rust/nix.svg)](https://cirrus-ci.com/github/nix-rust/nix)
[![crates.io](https://img.shields.io/crates/v/nix.svg)](https://crates.io/crates/nix)
[![docs.rs](https://img.shields.io/badge/docs.rs-nix-blue?style=flat-square&logo=docs.rs)](https://docs.rs/nix)
![maintenance-status](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)
Expand Down
10 changes: 0 additions & 10 deletions test/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ macro_rules! require_mount {
};
}

#[cfg(linux_android)]
#[macro_export]
macro_rules! skip_if_cirrus {
($reason:expr) => {
if std::env::var_os("CIRRUS_CI").is_some() {
skip!("{}", $reason);
}
};
}

#[cfg(target_os = "freebsd")]
#[macro_export]
macro_rules! skip_if_jailed {
Expand Down
1 change: 0 additions & 1 deletion test/sys/test_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,6 @@ pub fn test_af_alg_aead() {
use nix::unistd::read;
use std::io::IoSlice;

skip_if_cirrus!("Fails for an unknown reason Cirrus CI. Bug #1352");
// Travis's seccomp profile blocks AF_ALG
// https://docs.docker.com/engine/security/seccomp/
skip_if_seccomp!(test_af_alg_aead);
Expand Down
Loading