23 Commits

Author SHA1 Message Date
Alan Somers
d20fe20af7 Multiple CI improvements:
* Install cross the easy way, via cargo
* Don't test in release mode.  Nix contains no release-dependent paths,
  and release mode testing has to my knowledge never revealed a bug in
  Nix.
* Add Linux powerpc back to CI, fixed by the latest cross.
* Check the tests even on platforms that can't run them.
* DRY for the Illumos and Redox sections
* Cross-check iOS from a Linux VM instead of OSX
* Revert the workaround for rust-lang/rustup issue 2774
2021-08-22 10:33:07 -06:00
Alan Somers
8acdaef51a Remove support for 32-bit Apple targets 2021-08-13 17:58:33 -06:00
Alan Somers
5495bbce52 Fix the build with bitflags-1.3.0 and newer
Bitflags raised its MSRV in a minor version, forcing all consumers to
follow suit.

Fixes #1491
2021-08-13 17:39:04 -06:00
Alan Somers
5ac876e17d Adapt aio to the world of async/await, and fix some potential unsoundness.
* libc::aiocb must not be moved while the kernel has a pointer to it.
  This change enforces that requirement by using std::pin.

* Split LioCbBuilder out of LioCb.  struct LioCb relied on the
  (incorrect) assumption that a Vec's elements have a stable location in
  memory.  That's not true; they can be moved during Vec::push.  The
  solution is to use a Vec in the new Builder struct, but finalize it to
  a boxed slice (which doesn't support push) before allowing it to be
  submitted to the kernel.

* Eliminate owned buffer types.  mio-aio no longer uses owned buffers
  with nix::aio.  There's little need for it in the world of
  async/await.  I'm not aware of any other consumers.  This
  substantially simplifies the code.
2021-05-30 17:41:47 -06:00
Alan Somers
5f0807a352 Workaround Rustup bug 2774
A regression in rustup has broken that tool on FreeBSD.  Set
RUSTUP_IO_THREADS=1 as a workaround.
https://github.com/rust-lang/rustup/issues/2774
2021-05-23 07:49:58 -06:00
Alan Somers
2ba6999e2e Check all tests in CI
Travis didn't compile check tests on platforms that couldn't run tests
in CI, so they bitrotted.  Let's see how bad they are.

Most annoyingly, 32-bit Android defines mode_t as 16 bits, but
stat.st_mode as 32-bits.
2021-04-04 19:32:54 -06:00
Jason King
d444f1bcf2 illumos and Solaris support
Co-authored-by: Dominik Hassler <hadfl@omnios.org>
Co-authored-by: Joshua M. Clulow <josh@sysmgr.org>
2021-03-21 23:04:03 +00:00
Alan Somers
95d610e5c5 Remove a duplicate stanza from .cirrus.yml 2021-03-04 20:06:14 -07:00
Alan Somers
6496bb8012 During CI, use just 1 cpu for QEMU builds
https://github.com/cirruslabs/cirrus-ci-docs/issues/741
2021-02-23 08:56:10 -07:00
наб
95559c6dff
Bump caps to 0.5.1. Add x32 to CI for cross-builds and Tier 3 list in README 2021-02-15 19:27:52 +01:00
Amanda Tait
5846ae2afd
Add fuchsia support
Allow nix to compile on Fuchsia by conditionally avoiding libc
functionality that does not exist for Fuchsia.
2020-12-19 14:17:42 -05:00
Tamir Duberstein
16d62f6622
Update cross-compilation Rust version to 1.40.0
This was missed in d36353701341df9cfffb4fc4e88c002698d2deda.
2020-12-19 14:17:10 -05:00
Alan Somers
d363537013 Raise MSRV to 1.40.0
This will shortly be needed for Fuchsia support.
2020-12-10 17:56:40 -07:00
Alan Somers
bf7a5fd606 Switch all builds from Travis to Cirrus
Travis has been super-slow lately (> 6 hours per build).  Cirrus is much
faster: about 20 minutes.  Cirrus also has slightly better test
coverage, mainly because it doesn't use SECCOMP.

Also,

* Fix the Redox CI build.  The old Travis configuration didn't actually
  build for Redox, so we never noticed that Redox can't be built with a
  stable compiler.  Thanks to @coolreader18 for finding this.

* Disable the udp_offload tests on cross-tested platforms.  These tests
  are failing with ENOPROTOOPT in Cirrus-CI.  I suspect it's due to a
  lack of support in QEMU.  These tests were skipped on Travis because
  its kernel was too old.

* Fix require_kernel_version on Cirrus-CI.  Cirrus reports the Linux
  kernel version as 4.19.112+, which the semver crate can't handle.

* Fix test_setfsuid on Cirrus.  When run on Cirrus, it seems like the
  file in /tmp gets deleted as soon as it's closed.  Probably an
  overzealous temporary file cleaner.  Use /var/tmp, because no
  temporary file cleaner should run in there.

* Skip mount tests on Cirrus.  They fail for an unknown reason.
Issue #1351

* Skip the AF_ALG tests on Cirrus-CI
Issue #1352
2020-12-06 22:35:30 -07:00
Alan Somers
3e52d0974d Update the FreeBSD test image to 11.4-release 2020-07-03 10:45:01 -06:00
Alan Somers
4a8399179c Update the FreeBSD CI image to an 11.3 snapshot
11.2 is EOL.
2020-04-19 15:00:28 -06:00
Alan Somers
92290affeb Use fetch instead of curl during CI on FreeBSD 2019-10-15 08:52:57 -06:00
Alan Somers
2c9ff688c9 Use rustup's minimal profile during CI on FreeBSD
This should fix CI on FreeBSD after Rustup 1.20.0 was released, and save
time as well.
2019-10-15 08:49:39 -06:00
Otavio Salvador
11f5e0d1bf Raise minimum supported Rust version to 1.36.0
The minimum supported Rust version is being raised to 1.36.0 as this
is the first release to support the `mem::MaybeUninit` feature.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2019-08-28 18:43:46 -03:00
Alan Somers
c156af5a90 Fix warnings on Rust 1.37.0
* Replace obsolete range syntax "..." with inclusive range "..="
* Use dyn Trait syntax instead of Box<Trait>
* Raise MSRV to 1.27.0 (for dyn Trait syntax)
* Raise MSRV to 1.31.0 (because of rand)

tempfile pulls in rand, and rand pulls in fuchsia-cprng, which requires
1.31.0.  Why rand pulls in fuchsia-cprng I don't know.  It's specified
as a target-specific dependency, but Cargo tries to build it anyway
(only on Linux, not on FreeBSD or OSX).  A bug in Cargo 1.27.0?
2019-07-13 15:05:08 -06:00
Bryant Mairs
2075ac70bd Enable libc extra_traits feature
Also bump Rust requirement to 1.25 which is a requirement of that feature
2019-06-09 10:38:16 -07:00
Alan Somers
e38fd4ffa0 Use Cirrus' Cargo cache 2019-06-06 08:54:51 -06:00
Alan Somers
593922fb60 Switch FreeBSD CI builds from BuildBot to cirrus-ci.com
This change does the following:
1) Adds a CI build on cirrus-ci.com
2) Switches FreeBSD's CI from a jail to a full VM
3) Switches FreeBSD i386's CI from a 32-bit jail to simply using a
   cross-compiled binary on a 64-bit VM.
4) Switches FreeBSD i386's CI from using stable rust to 1.24.1 (back
   when I added buildbot, rustup didn't support i686-unknown-freebsd)
5) Switches bors to gate on cirrus-ci rather than buildbot

This change does _not_ disable buildbot.  That must happen outside of
git.

Fixes #996
2018-12-29 12:54:46 -07:00