Skip to content

Commit

Permalink
Auto merge of #652 - alexcrichton:s390xci, r=alexcrichton
Browse files Browse the repository at this point in the history
Clean up CI configuration and add s390x

We can't test s390x because qemu segfaults but we can at least verify that it
compiles.

Closes #650
  • Loading branch information
bors committed Jul 7, 2017
2 parents e8140b8 + 7d74c09 commit 288942e
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 77 deletions.
95 changes: 25 additions & 70 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: rust
rust: stable
sudo: required
dist: trusty
services:
Expand All @@ -22,109 +23,63 @@ env:
matrix:
include:
# 1.0.0 compat
- os: linux
env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
- env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
rust: 1.0.0
script: cargo build
install:

# build documentation
- os: linux
env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
- env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
rust: nightly
script: sh ci/dox.sh

# stable compat
- os: linux
env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
rust: stable
- os: linux
env: TARGET=i686-unknown-linux-gnu
rust: stable
- env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
- env: TARGET=i686-unknown-linux-gnu
- os: osx
env: TARGET=x86_64-apple-darwin NO_ADD=1
rust: stable
- os: osx
env: TARGET=i686-apple-darwin
rust: stable
- os: linux
env: TARGET=arm-linux-androideabi
rust: stable
- os: linux
env: TARGET=aarch64-linux-android
rust: stable
- os: linux
env: TARGET=i686-linux-android
rust: stable
# as of 2017/05/03 x86_64-linux-android are not on stable
- os: linux
env: TARGET=x86_64-linux-android
rust: beta
- os: linux
env: TARGET=x86_64-unknown-linux-musl
rust: stable
- os: linux
env: TARGET=i686-unknown-linux-musl
rust: stable
- os: linux
env: TARGET=arm-unknown-linux-gnueabihf
rust: stable
- os: linux
env: TARGET=aarch64-unknown-linux-gnu
rust: stable
- env: TARGET=arm-linux-androideabi
- env: TARGET=aarch64-linux-android
- env: TARGET=i686-linux-android
- env: TARGET=x86_64-linux-android
- env: TARGET=x86_64-unknown-linux-musl
- env: TARGET=i686-unknown-linux-musl
- env: TARGET=arm-unknown-linux-gnueabihf
- env: TARGET=aarch64-unknown-linux-gnu
- os: osx
osx_image: xcode8.2
env: TARGET=i386-apple-ios
rust: stable
- os: osx
osx_image: xcode8.2
env: TARGET=x86_64-apple-ios
rust: stable
- os: linux
env: TARGET=x86_64-rumprun-netbsd
rust: stable
- os: linux
env: TARGET=powerpc-unknown-linux-gnu
rust: stable
- os: linux
env: TARGET=powerpc64-unknown-linux-gnu
rust: beta
- os: linux
env: TARGET=mips-unknown-linux-musl
rust: stable
- os: linux
env: TARGET=mipsel-unknown-linux-musl
rust: stable
- os: linux
env: TARGET=mips64-unknown-linux-gnuabi64
rust: beta
- os: linux
env: TARGET=mips-unknown-linux-gnu
rust: beta
- env: TARGET=x86_64-rumprun-netbsd
- env: TARGET=powerpc-unknown-linux-gnu
- env: TARGET=powerpc64-unknown-linux-gnu
- env: TARGET=mips-unknown-linux-musl
- env: TARGET=mipsel-unknown-linux-musl
- env: TARGET=mips64-unknown-linux-gnuabi64
- env: TARGET=mips-unknown-linux-gnu
- env: TARGET=s390x-unknown-linux-gnu

# beta
- os: linux
env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
- env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
rust: beta
- os: osx
env: TARGET=x86_64-apple-darwin NO_ADD=1
rust: beta

# nightly
- os: linux
env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
- env: TARGET=x86_64-unknown-linux-gnu NO_ADD=1
rust: nightly
- os: osx
env: TARGET=x86_64-apple-darwin NO_ADD=1
rust: nightly

# QEMU based targets that compile in an emulator
- os: linux
env: TARGET=x86_64-unknown-freebsd
rust: stable
- os: linux
env: TARGET=x86_64-unknown-openbsd QEMU=openbsd.qcow2
rust: stable
- env: TARGET=x86_64-unknown-freebsd
- env: TARGET=x86_64-unknown-openbsd QEMU=openbsd.qcow2
script: sh ci/run-docker.sh $TARGET
install:

Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "libc"
version = "0.2.25"
version = "0.2.26"
authors = ["The Rust Project Developers"]
license = "MIT/Apache-2.0"
readme = "README.md"
Expand Down
9 changes: 9 additions & 0 deletions ci/docker/s390x-unknown-linux-gnu/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ubuntu:17.04

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates \
gcc-s390x-linux-gnu libc6-dev-s390x-cross

ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
CC_s390x_unknown_linux_gnu=s390x-linux-gnu-gcc \
PATH=$PATH:/rust/bin
5 changes: 5 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ case "$TARGET" in
qemu-aarch64 -L /usr/aarch64-linux-gnu/ $CARGO_TARGET_DIR/$TARGET/debug/libc-test
;;

s390x-unknown-linux-gnu)
# TODO: in theory we should execute this, but qemu segfaults immediately :(
# qemu-s390x -L /usr/s390x-linux-gnu/ $CARGO_TARGET_DIR/$TARGET/debug/libc-test
;;

*-rumprun-netbsd)
rumprun-bake hw_virtio /tmp/libc-test.img $CARGO_TARGET_DIR/$TARGET/debug/libc-test
qemu-system-x86_64 -nographic -vga none -m 64 \
Expand Down
2 changes: 1 addition & 1 deletion src/unix/notbsd/linux/s390x.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub type greg_t = u64;
pub type clock_t = i64;
pub type __fsword_t = ::c_long;
pub type __priority_which_t = ::c_uint;
pub type __u64 = u64;

s! {
pub struct aiocb {
Expand Down Expand Up @@ -777,7 +778,6 @@ pub const CMSPAR: ::tcflag_t = 0o10000000000;
pub const VSWTC: usize = 7;
pub const OLCUC: ::tcflag_t = 0o000002;
pub const NLDLY: ::tcflag_t = 0o000400;
pub const NL1: ::tcflag_t = 0x00000100;
pub const CRDLY: ::tcflag_t = 0o003000;
pub const CR1: ::tcflag_t = 0x00000200;
pub const CR2: ::tcflag_t = 0x00000400;
Expand Down

0 comments on commit 288942e

Please sign in to comment.