Skip to content

Commit 635c871

Browse files
committed
Auto merge of #536 - nix-rust:new-ci/master, r=kamalmarhubi
Merge New CI Infrastructure Based on Trust/Cross Into Master See discussion on #528. This PR is to track the final decision of whether we are ready to merge the new CI infrastructure (and related bug fixes) back into master. Initially, we know that the branch is not ready to merge (as there are still failing tests). This PR acts as a single point of reference to get the current status of how close we are to merging things back into master. A number of issues with "TRUST CI" in the title have been created for the work that appears to be required to get us to the point where this branch can be merged.
2 parents 44c0ecb + 56f5a0a commit 635c871

20 files changed

+637
-720
lines changed

.travis.yml

+120-91
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,131 @@
1-
#
2-
# Operating Environment
3-
#
4-
language: rust
5-
sudo: false
1+
# Based on the "trust" template v0.1.1
2+
# https://github.com/japaric/trust/tree/v0.1.1
3+
64
dist: trusty
7-
services:
8-
- docker
9-
addons:
10-
apt:
11-
packages:
12-
- gcc-multilib
13-
- libcurl4-openssl-dev
14-
- libelf-dev
15-
- libdw-dev
16-
- binutils-dev
17-
18-
rust:
19-
- 1.7.0 # Oldest supported version
20-
- stable
21-
- beta
22-
- nightly
23-
24-
#
25-
# Environment Variables and Build Matrix
26-
#
5+
language: rust
6+
services: docker
7+
sudo: required
8+
9+
# This is the Rust channel that build jobs will use by default but can be
10+
# overridden on a case by case basis down below
11+
rust: 1.13.0
12+
2713
env:
2814
global:
29-
- PATH=$HOME/.local/bin:$PATH
30-
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
31-
matrix:
32-
- ARCH=x86_64
33-
- ARCH=i686
15+
- CRATE_NAME=nix
16+
- CARGO_TEST_THREADS=1
3417

35-
os: # OSX included in build matrix explicitly
36-
- linux
18+
# default job
19+
- TARGET=x86_64-unknown-linux-gnu
3720

38-
# Failures on nightly shouldn't fail the overall build.
3921
matrix:
40-
fast_finish: true
22+
# These are all the build jobs. Adjust as necessary. Comment out what you
23+
# don't need
4124
include:
42-
# 32-bit and 64-bit OSX builds on oldest/stable
43-
- os: osx
44-
env: ARCH=x86_64
45-
rust: stable
46-
- os: osx
47-
env: ARCH=i686
48-
rust: stable
49-
# Docker builds for other targets
50-
- os: linux
51-
env: TARGET=aarch64-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:arm
52-
rust: 1.7.0
53-
sudo: true
54-
- os: linux
55-
env: TARGET=arm-unknown-linux-gnueabihf DOCKER_IMAGE=posborne/rust-cross:arm
56-
rust: 1.7.0
57-
sudo: true
58-
- os: linux
59-
env: TARGET=mips-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips
60-
rust: 1.7.0
61-
sudo: true
62-
- os: linux
63-
env: TARGET=mipsel-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips
64-
rust: 1.7.0
65-
sudo: true
66-
- os: linux
67-
env: TARGET=arm-linux-androideabi DOCKER_IMAGE=posborne/rust-cross:android
68-
rust: 1.7.0
69-
sudo: true
70-
allow_failures:
71-
- rust: nightly
72-
# We need to upgrade the lowest supported version. However, the build
73-
# infrastructure for arm/mips/android is not ready yet.
74-
- rust: 1.7.0
75-
- env: TARGET=mips-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips
76-
- env: TARGET=mipsel-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips
77-
- env: TARGET=arm-linux-androideabi DOCKER_IMAGE=posborne/rust-cross:android
25+
# Linux
26+
- env: TARGET=i686-unknown-linux-gnu
27+
- env: TARGET=i686-unknown-linux-musl
28+
# - env: TARGET=x86_64-unknown-linux-gnu # this is the default job
29+
- env: TARGET=x86_64-unknown-linux-musl
30+
31+
# OSX
32+
- env: TARGET=i686-apple-darwin
33+
os: osx
34+
- env: TARGET=x86_64-apple-darwin
35+
os: osx
36+
37+
# *BSD
38+
- env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1
39+
- env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1
40+
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1
41+
42+
# Other architectures
43+
- env: TARGET=aarch64-unknown-linux-gnu
44+
- env: TARGET=armv7-unknown-linux-gnueabihf
45+
- env: TARGET=mips-unknown-linux-gnu
46+
# - env: TARGET=mips64-unknown-linux-gnuabi64
47+
# - env: TARGET=mips64el-unknown-linux-gnuabi64
48+
- env: TARGET=mipsel-unknown-linux-gnu
49+
- env: TARGET=powerpc-unknown-linux-gnu
50+
# - env: TARGET=powerpc64-unknown-linux-gnu
51+
# - env: TARGET=powerpc64le-unknown-linux-gnu
52+
# - env: TARGET=s390x-unknown-linux-gnu
53+
- env: TARGET=arm-unknown-linux-gnueabi
54+
# - env: TARGET=arm-unknown-linux-musleabi
7855

56+
# Testing beta on main targets
57+
- env: TARGET=x86_64-unknown-linux-gnu
58+
rust: beta
59+
- env: TARGET=x86_64-apple-darwin
60+
os: osx
61+
rust: beta
7962

80-
#
81-
# Build/Test/Deploy Steps
82-
#
83-
before_script:
84-
- pip install 'travis-cargo<0.2' --user
63+
# Testing nightly on main targets (allowed to fail)
64+
- env: TARGET=x86_64-unknown-linux-gnu
65+
rust: nightly
66+
- env: TARGET=x86_64-apple-darwin
67+
os: osx
68+
rust: nightly
69+
70+
# Testing nightlies on main targets. These might fail because of issues
71+
# with the compiler, so we allow failures here.
72+
allow_failures:
73+
# Failures for nightlies may be because of compiler bugs, so don't fail the
74+
# build if these fail.
75+
- env: TARGET=x86_64-unknown-linux-gnu
76+
rust: nightly
77+
- env: TARGET=x86_64-apple-darwin
78+
os: osx
79+
rust: nightly
80+
# FIXME: targets that should pass but are currently failing
81+
- env: TARGET=i686-unknown-linux-musl
82+
- env: TARGET=x86_64-unknown-linux-musl
83+
- env: TARGET=mips-unknown-linux-gnu
84+
- env: TARGET=mipsel-unknown-linux-gnu
85+
- env: TARGET=powerpc-unknown-linux-gnu
86+
87+
install:
88+
- sh ci/install.sh
89+
- source ~/.cargo/env || true
8590

8691
script:
87-
- bash ci/run-travis.sh
88-
- |
89-
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
90-
travis-cargo --only stable doc
91-
fi
92-
93-
after_success:
94-
- |
95-
if [ "$TRAVIS_OS_NAME" = "linux" ] && \
96-
[ "$TRAVIS_RUST_VERSION" = "stable" ] && \
97-
[ "$ARCH" = "x86_64" ]; then
98-
# Upload docs for stable (on master) to gh-pages
99-
travis-cargo --only stable doc-upload
100-
# Measure code coverage using kcov and upload to coveralls.io
101-
travis-cargo coveralls --no-sudo --verify
102-
fi
92+
- bash ci/script.sh
93+
94+
before_deploy:
95+
- sh ci/before_deploy.sh
96+
97+
deploy:
98+
# TODO update `api_key.secure`
99+
# - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new
100+
# - Encrypt it: `travis encrypt GH_TOKEN=0123456789012345678901234567890123456789`
101+
# - Paste the output down here
102+
api_key:
103+
secure: S1ktt0eqmfrEHnYPf4WO7mZtatz/FWfYWBp8nwdc0nd8H6UNZ9Dwy3tJpVe0N9rpB9vAFnkdw6R4jdkIcgxfory2F3F8k/mh8cWn0mkvh2N34YjHMYLnuVzOoFrWai7IcPfROpdlY0tGBlwNj5KMkeBnHUJzd2q4j/4j/tlrfmg=
104+
file_glob: true
105+
file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.*
106+
on:
107+
# Here you can pick which targets will generate binary releases
108+
# In this example, there are some targets that are tested using the stable
109+
# and nightly channels. This condition makes sure there is only one release
110+
# for such targets and that's generated using the stable channel
111+
#
112+
# Here we make it so we never generate binary releases
113+
condition: $DEPLOY = never
114+
tags: true
115+
provider: releases
116+
skip_cleanup: true
117+
118+
cache: cargo
119+
before_cache:
120+
# Travis can't cache files that are not readable by "others"
121+
- chmod -R a+r $HOME/.cargo
122+
123+
branches:
124+
only:
125+
# release tags
126+
- /^v\d+\.\d+\.\d+.*$/
127+
- master
128+
129+
notifications:
130+
email:
131+
on_success: never

CHANGELOG.md

+15-9
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,24 @@ This project adheres to [Semantic Versioning](http://semver.org/).
55

66
## [Unreleased]
77

8-
<!--### Added-->
8+
### Added
99
- Added `nix::unistd::{openat, fstatat, readlink, readlinkat}`
10-
([#497](https://github.com/nix-rust/nix/pull/551))
10+
([#551](https://github.com/nix-rust/nix/pull/551))
1111

1212
### Changed
1313
- Marked `sys::mman::{ mmap, munmap, madvise, munlock, msync }` as unsafe.
1414
([#559](https://github.com/nix-rust/nix/pull/559))
15-
16-
<!--### Fixed-->
15+
- Minimum supported Rust version is now 1.13
16+
- Removed `revents` argument from `PollFd::new()` as it's an output argument and
17+
will be overwritten regardless of value.
18+
([#542](https://github.com/nix-rust/nix/pull/542)
19+
20+
### Fixed
21+
- Fixed multiple issues compiling under different archetectures and OSes.
22+
Now compiles on Linux/MIPS ([#538](https://github.com/nix-rust/nix/pull/538)),
23+
`Linux/PPC` ([#553](https://github.com/nix-rust/nix/pull/553)),
24+
`MacOS/x86_64,i686` ([#553](https://github.com/nix-rust/nix/pull/553),
25+
and `NetBSD/x64_64` ([#538](https://github.com/nix-rust/nix/pull/538).
1726

1827
## [0.8.0] 2017-03-02
1928

@@ -60,8 +69,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
6069
([#540](https://github.com/nix-rust/nix/pull/540)
6170

6271
### Changed
63-
- `::nix::sys::termios::{cfgetispeed, cfsetispeed, cfgetospeed, cfsetospeed}`
64-
switched to use `BaudRate` enum from `speed_t`.
72+
- `::nix::sys::termios::{cfgetispeed, cfsetispeed, cfgetospeed, cfsetospeed}`
73+
switched to use `BaudRate` enum from `speed_t`.
6574
([#518](https://github.com/nix-rust/nix/pull/518))
6675
- `epoll_ctl` now could accept None as argument `event`
6776
when op is `EpollOp::EpollCtlDel`.
@@ -107,9 +116,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
107116
- Exposed all fcntl(2) operations at the module level, so they can be
108117
imported direclty instead of via `FcntlArg` enum.
109118
([#541](https://github.com/nix-rust/nix/pull/541))
110-
- Removed `revents` argument from `PollFd::new()` as it's an output argument and
111-
will be overwritten regardless of value.
112-
([#542](https://github.com/nix-rust/nix/pull/542)
113119

114120
### Fixed
115121
- Fixed multiple issues with Unix domain sockets on non-Linux OSes

README.md

+31-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,37 @@ pub unsafe extern fn gethostname(name: *mut c_char, len: size_t) -> c_int;
3030
pub fn gethostname(name: &mut [u8]) -> Result<()>;
3131
```
3232

33-
## Requirements
34-
Rust >= 1.9.0
33+
## Supported Platforms
34+
35+
nix target support consists of three tiers:
36+
37+
* Tier 1 - Target is supported and CI both builds and tests
38+
* Tier 2 - Target is supported and CI builds the target
39+
* Tier 3 - Target is supported and CI both builds and tests but test failures
40+
do not block merging code
41+
42+
The following targets are all supported by nix on Rust 1.13.0 or newer:
43+
44+
Tier 1:
45+
* i686-unknown-linux-gnu
46+
* x86_64-unknown-linux-gnu
47+
* i686-apple-darwin
48+
* x86_64-apple-darwin
49+
* aarch64-unknown-linux-gnu
50+
* armv7-unknown-linux-gnueabihf
51+
* arm-unknown-linux-gnueabi
52+
53+
Tier 2:
54+
* i686-unknown-freebsd
55+
* x86_64-unknown-freebsd
56+
* x86_64-unknown-netbsd
57+
58+
Tier 3:
59+
* i686-unknown-linux-musl
60+
* x86_64-unknown-linux-musl
61+
* mips-unknown-linux-gnu
62+
* mipsel-unknown-linux-gnu
63+
* powerpc-unknown-linux-gnu
3564

3665
## Usage
3766

ci/README.md

-48
This file was deleted.

ci/before_deploy.ps1

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This script takes care of packaging the build artifacts that will go in the
2+
# release zipfile
3+
4+
$SRC_DIR = $PWD.Path
5+
$STAGE = [System.Guid]::NewGuid().ToString()
6+
7+
Set-Location $ENV:Temp
8+
New-Item -Type Directory -Name $STAGE
9+
Set-Location $STAGE
10+
11+
$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip"
12+
13+
# TODO Update this to package the right artifacts
14+
Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\hello.exe" '.\'
15+
16+
7z a "$ZIP" *
17+
18+
Push-AppveyorArtifact "$ZIP"
19+
20+
Remove-Item *.* -Force
21+
Set-Location ..
22+
Remove-Item $STAGE
23+
Set-Location $SRC_DIR

0 commit comments

Comments
 (0)