-
Notifications
You must be signed in to change notification settings - Fork 683
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
Merge New CI Infrastructure Based on Trust/Cross Into Master #536
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
52963ab
Removed old ci infrastructure.
berkowski ee2bff1
Added ci templates from `trust` v0.1.1
berkowski 129a9d8
Removed appveyor -- this is a unix only lib.
berkowski 399b1c1
Updated .travis.yml
berkowski fc09d70
Enabled tests for BSD. Added mipsel & mips64el
berkowski 9adff82
Added/removed CI arches.
berkowski ed0c6d3
Removed arches.
berkowski c1dd033
Fixed ci/script.sh to run tests when desired.
berkowski 1e84da2
Removed 'cargo run' directives from ci script.
berkowski cb416ee
Disable tests on BSD targets.
berkowski 22c37c2
Removed commented `cargo run` targets in CI
berkowski a859ee3
Switched bsd speed_t def. to libc::speed_t
berkowski 2196717
Fixes nix-rust/nix#532
berkowski 3354ffe
Fixed constants for MIPS
berkowski 0db6ed1
Removed some socket constants from arch=arm
berkowski 57169b8
Fixed failing ioctl tests.
berkowski 334e826
Re-enabled errorno test for not_android.
berkowski 90b22ff
Added missing syscalls for powerpc
berkowski d623db9
Removed unused libc imports in termios.
berkowski 09c00ed
Removed tests on ARM for non-existant constants.
berkowski 56d20ca
Split socket consts. test across ARM arch.
berkowski a833554
Updated changelog.
berkowski a8cf6cb
ci: remove thread parallelism
posborne 86f6aa3
Use min Rust version but test beta and nightly
Susurrus 6cfbb09
Allow failures for currently failing targets
Susurrus a076c7f
Increase minimum supported Rust version.
Susurrus 48d142f
Update changelog
Susurrus 56f5a0a
List supported targets in the README
Susurrus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,131 @@ | ||
# | ||
# Operating Environment | ||
# | ||
language: rust | ||
sudo: false | ||
# Based on the "trust" template v0.1.1 | ||
# https://github.com/japaric/trust/tree/v0.1.1 | ||
|
||
dist: trusty | ||
services: | ||
- docker | ||
addons: | ||
apt: | ||
packages: | ||
- gcc-multilib | ||
- libcurl4-openssl-dev | ||
- libelf-dev | ||
- libdw-dev | ||
- binutils-dev | ||
|
||
rust: | ||
- 1.7.0 # Oldest supported version | ||
- stable | ||
- beta | ||
- nightly | ||
|
||
# | ||
# Environment Variables and Build Matrix | ||
# | ||
language: rust | ||
services: docker | ||
sudo: required | ||
|
||
# This is the Rust channel that build jobs will use by default but can be | ||
# overridden on a case by case basis down below | ||
rust: 1.13.0 | ||
|
||
env: | ||
global: | ||
- PATH=$HOME/.local/bin:$PATH | ||
- TRAVIS_CARGO_NIGHTLY_FEATURE="" | ||
matrix: | ||
- ARCH=x86_64 | ||
- ARCH=i686 | ||
- CRATE_NAME=nix | ||
- CARGO_TEST_THREADS=1 | ||
|
||
os: # OSX included in build matrix explicitly | ||
- linux | ||
# default job | ||
- TARGET=x86_64-unknown-linux-gnu | ||
|
||
# Failures on nightly shouldn't fail the overall build. | ||
matrix: | ||
fast_finish: true | ||
# These are all the build jobs. Adjust as necessary. Comment out what you | ||
# don't need | ||
include: | ||
# 32-bit and 64-bit OSX builds on oldest/stable | ||
- os: osx | ||
env: ARCH=x86_64 | ||
rust: stable | ||
- os: osx | ||
env: ARCH=i686 | ||
rust: stable | ||
# Docker builds for other targets | ||
- os: linux | ||
env: TARGET=aarch64-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:arm | ||
rust: 1.7.0 | ||
sudo: true | ||
- os: linux | ||
env: TARGET=arm-unknown-linux-gnueabihf DOCKER_IMAGE=posborne/rust-cross:arm | ||
rust: 1.7.0 | ||
sudo: true | ||
- os: linux | ||
env: TARGET=mips-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips | ||
rust: 1.7.0 | ||
sudo: true | ||
- os: linux | ||
env: TARGET=mipsel-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips | ||
rust: 1.7.0 | ||
sudo: true | ||
- os: linux | ||
env: TARGET=arm-linux-androideabi DOCKER_IMAGE=posborne/rust-cross:android | ||
rust: 1.7.0 | ||
sudo: true | ||
allow_failures: | ||
- rust: nightly | ||
# We need to upgrade the lowest supported version. However, the build | ||
# infrastructure for arm/mips/android is not ready yet. | ||
- rust: 1.7.0 | ||
- env: TARGET=mips-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips | ||
- env: TARGET=mipsel-unknown-linux-gnu DOCKER_IMAGE=posborne/rust-cross:mips | ||
- env: TARGET=arm-linux-androideabi DOCKER_IMAGE=posborne/rust-cross:android | ||
# Linux | ||
- env: TARGET=i686-unknown-linux-gnu | ||
- env: TARGET=i686-unknown-linux-musl | ||
# - env: TARGET=x86_64-unknown-linux-gnu # this is the default job | ||
- env: TARGET=x86_64-unknown-linux-musl | ||
|
||
# OSX | ||
- env: TARGET=i686-apple-darwin | ||
os: osx | ||
- env: TARGET=x86_64-apple-darwin | ||
os: osx | ||
|
||
# *BSD | ||
- env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1 | ||
- env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1 | ||
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1 | ||
|
||
# Other architectures | ||
- env: TARGET=aarch64-unknown-linux-gnu | ||
- env: TARGET=armv7-unknown-linux-gnueabihf | ||
- env: TARGET=mips-unknown-linux-gnu | ||
# - env: TARGET=mips64-unknown-linux-gnuabi64 | ||
# - env: TARGET=mips64el-unknown-linux-gnuabi64 | ||
- env: TARGET=mipsel-unknown-linux-gnu | ||
- env: TARGET=powerpc-unknown-linux-gnu | ||
# - env: TARGET=powerpc64-unknown-linux-gnu | ||
# - env: TARGET=powerpc64le-unknown-linux-gnu | ||
# - env: TARGET=s390x-unknown-linux-gnu | ||
- env: TARGET=arm-unknown-linux-gnueabi | ||
# - env: TARGET=arm-unknown-linux-musleabi | ||
|
||
# Testing beta on main targets | ||
- env: TARGET=x86_64-unknown-linux-gnu | ||
rust: beta | ||
- env: TARGET=x86_64-apple-darwin | ||
os: osx | ||
rust: beta | ||
|
||
# | ||
# Build/Test/Deploy Steps | ||
# | ||
before_script: | ||
- pip install 'travis-cargo<0.2' --user | ||
# Testing nightly on main targets (allowed to fail) | ||
- env: TARGET=x86_64-unknown-linux-gnu | ||
rust: nightly | ||
- env: TARGET=x86_64-apple-darwin | ||
os: osx | ||
rust: nightly | ||
|
||
# Testing nightlies on main targets. These might fail because of issues | ||
# with the compiler, so we allow failures here. | ||
allow_failures: | ||
# Failures for nightlies may be because of compiler bugs, so don't fail the | ||
# build if these fail. | ||
- env: TARGET=x86_64-unknown-linux-gnu | ||
rust: nightly | ||
- env: TARGET=x86_64-apple-darwin | ||
os: osx | ||
rust: nightly | ||
# FIXME: targets that should pass but are currently failing | ||
- env: TARGET=i686-unknown-linux-musl | ||
- env: TARGET=x86_64-unknown-linux-musl | ||
- env: TARGET=mips-unknown-linux-gnu | ||
- env: TARGET=mipsel-unknown-linux-gnu | ||
- env: TARGET=powerpc-unknown-linux-gnu | ||
|
||
install: | ||
- sh ci/install.sh | ||
- source ~/.cargo/env || true | ||
|
||
script: | ||
- bash ci/run-travis.sh | ||
- | | ||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then | ||
travis-cargo --only stable doc | ||
fi | ||
|
||
after_success: | ||
- | | ||
if [ "$TRAVIS_OS_NAME" = "linux" ] && \ | ||
[ "$TRAVIS_RUST_VERSION" = "stable" ] && \ | ||
[ "$ARCH" = "x86_64" ]; then | ||
# Upload docs for stable (on master) to gh-pages | ||
travis-cargo --only stable doc-upload | ||
# Measure code coverage using kcov and upload to coveralls.io | ||
travis-cargo coveralls --no-sudo --verify | ||
fi | ||
- bash ci/script.sh | ||
|
||
before_deploy: | ||
- sh ci/before_deploy.sh | ||
|
||
deploy: | ||
# TODO update `api_key.secure` | ||
# - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new | ||
# - Encrypt it: `travis encrypt GH_TOKEN=0123456789012345678901234567890123456789` | ||
# - Paste the output down here | ||
api_key: | ||
secure: S1ktt0eqmfrEHnYPf4WO7mZtatz/FWfYWBp8nwdc0nd8H6UNZ9Dwy3tJpVe0N9rpB9vAFnkdw6R4jdkIcgxfory2F3F8k/mh8cWn0mkvh2N34YjHMYLnuVzOoFrWai7IcPfROpdlY0tGBlwNj5KMkeBnHUJzd2q4j/4j/tlrfmg= | ||
file_glob: true | ||
file: $CRATE_NAME-$TRAVIS_TAG-$TARGET.* | ||
on: | ||
# Here you can pick which targets will generate binary releases | ||
# In this example, there are some targets that are tested using the stable | ||
# and nightly channels. This condition makes sure there is only one release | ||
# for such targets and that's generated using the stable channel | ||
# | ||
# Here we make it so we never generate binary releases | ||
condition: $DEPLOY = never | ||
tags: true | ||
provider: releases | ||
skip_cleanup: true | ||
|
||
cache: cargo | ||
before_cache: | ||
# Travis can't cache files that are not readable by "others" | ||
- chmod -R a+r $HOME/.cargo | ||
|
||
branches: | ||
only: | ||
# release tags | ||
- /^v\d+\.\d+\.\d+.*$/ | ||
- master | ||
|
||
notifications: | ||
email: | ||
on_success: never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This script takes care of packaging the build artifacts that will go in the | ||
# release zipfile | ||
|
||
$SRC_DIR = $PWD.Path | ||
$STAGE = [System.Guid]::NewGuid().ToString() | ||
|
||
Set-Location $ENV:Temp | ||
New-Item -Type Directory -Name $STAGE | ||
Set-Location $STAGE | ||
|
||
$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip" | ||
|
||
# TODO Update this to package the right artifacts | ||
Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\hello.exe" '.\' | ||
|
||
7z a "$ZIP" * | ||
|
||
Push-AppveyorArtifact "$ZIP" | ||
|
||
Remove-Item *.* -Force | ||
Set-Location .. | ||
Remove-Item $STAGE | ||
Set-Location $SRC_DIR |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs an
env:
after the-
so that it actually sets the environment variable in a way that Travis understands.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I think this should be done within the
matrix
section. If you look at the Travis output, you seeTARGET
being declared twice.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, found out this is a bug in Travis CI that they haven't put much effort into fixing: travis-ci/travis-ci#4681