Skip to content

Commit

Permalink
Try #206:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] committed Sep 27, 2018
2 parents d248721 + cc0e75c commit b233311
Show file tree
Hide file tree
Showing 15 changed files with 150 additions and 154 deletions.
26 changes: 16 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,21 @@ matrix:
- env: TARGET=x86_64-linux-android CPP=1 STD=1 OPENSSL=0.5.5 RUN=1

# OSX
- env: TARGET=i686-apple-darwin DYLIB=1 STD=1 RUN=1
- env: TARGET=i686-apple-darwin CPP=1 DYLIB=1 STD=1 RUN=1
os: osx
- env: TARGET=x86_64-apple-darwin DYLIB=1 STD=1 RUN=1 DEPLOY=1
- env: TARGET=x86_64-apple-darwin CPP=1 DYLIB=1 STD=1 RUN=1 DEPLOY=1
os: osx

# BSD
# FIXME: freebsd fails to link when CPP=1
- env: TARGET=i686-unknown-freebsd DYLIB=1 STD=1 OPENSSL=0.7.17
- env: TARGET=x86_64-unknown-dragonfly DYLIB=1 OPENSSL=0.5.5
- env: TARGET=x86_64-unknown-dragonfly CPP=1 DYLIB=1 OPENSSL=0.5.5
- env: TARGET=x86_64-unknown-freebsd DYLIB=1 STD=1 OPENSSL=0.5.5
- env: TARGET=x86_64-unknown-netbsd DYLIB=1 STD=1 OPENSSL=0.7.17
- env: TARGET=x86_64-unknown-netbsd CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17

# Solaris
- env: TARGET=sparcv9-sun-solaris DYLIB=1 STD=1 OPENSSL=0.7.17
- env: TARGET=x86_64-sun-solaris DYLIB=1 STD=1 OPENSSL=0.7.17
- env: TARGET=sparcv9-sun-solaris CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17
- env: TARGET=x86_64-sun-solaris CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17

# Windows
- env: TARGET=x86_64-pc-windows-gnu CPP=1 STD=1 RUN=1
Expand All @@ -61,10 +62,15 @@ matrix:
rust: nightly-2017-10-24

# Bare metal
- env: TARGET=thumbv6m-none-eabi RUN=1
- env: TARGET=thumbv7em-none-eabi RUN=1
- env: TARGET=thumbv7em-none-eabihf RUN=1
- env: TARGET=thumbv7m-none-eabi RUN=1
- env: TARGET=thumbv6m-none-eabi STD=1
- env: TARGET=thumbv7em-none-eabi STD=1
- env: TARGET=thumbv7em-none-eabihf STD=1
- env: TARGET=thumbv7m-none-eabi STD=1

allow_failures:
# FIXME: error undefined reference to symbol 'setvbuf'
- env: TARGET=x86_64-unknown-netbsd CPP=1 DYLIB=1 STD=1 OPENSSL=0.7.17


install:
- curl https://sh.rustup.rs -sSf |
Expand Down
124 changes: 56 additions & 68 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ repository = "https://github.com/japaric/cross"
version = "0.1.15-dev"

[dependencies]
error-chain = "0.7.1"
lazy_static = "0.2"
error-chain = "0.12"
lazy_static = "1.0"
libc = "0.2.18"
rustc_version = "0.2.1"
semver = "0.6.0"
semver = "0.9.0"
toml = "0.2.1"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ worst, "hang" (never terminate).
| `asmjs-unknown-emscripten` [4] | 1.1.15 | 1.37.13 | N/A || N/A ||
| `i586-unknown-linux-gnu` | 2.23 | 5.3.1 | 1.0.2m || N/A ||
| `i686-linux-android` [5] | N/A | 4.9 | 1.0.2m || N/A ||
| `i686-pc-windows-gnu` | N/A | 6.2.0 | N/A || N/A ||
| `i686-unknown-freebsd` [1] | 10.2 | 5.3.0 | 1.0.2m | | N/A | |
| `i686-pc-windows-gnu` | N/A | 7.3.0 | N/A || N/A ||
| `i686-unknown-freebsd` [1] | 10.2 | 5.3.0 | 1.0.2m | | N/A | |
| `i686-unknown-linux-gnu` | 2.15 | 4.6.2 | 1.0.2m || N/A ||
| `i686-unknown-linux-musl` | 1.1.15 | 5.3.1 | 1.0.2m | | N/A ||
| `mips-unknown-linux-gnu` | 2.23 | 5.3.1 | 1.0.2m || 2.8.0 ||
Expand All @@ -222,10 +222,10 @@ worst, "hang" (never terminate).
| `thumbv7m-none-eabi` [3] | 2.2.0 | 5.3.1 | N/A | | N/A | |
| `wasm32-unknown-emscripten` [4] | 1.1.15 | 1.37.13 | N/A || N/A ||
| `x86_64-linux-android` [5] | N/A | 4.9 | 1.0.2m || N/A ||
| `x86_64-pc-windows-gnu` | N/A | 6.2.0 | N/A || N/A ||
| `x86_64-pc-windows-gnu` | N/A | 7.3.0 | N/A || N/A ||
| `x86_64-sun-solaris` [1] | 2.11 | 5.3.0 | 1.0.2m || N/A | |
| `x86_64-unknown-dragonfly` [1] [2] | 4.6.0 | 5.3.0 | 1.0.2m || N/A | |
| `x86_64-unknown-freebsd` [1] | 10.2 | 5.3.0 | 1.0.2m | | N/A | |
| `x86_64-unknown-freebsd` [1] | 10.2 | 5.3.0 | 1.0.2m | | N/A | |
| `x86_64-unknown-linux-gnu` | 2.15 | 4.6.2 | 1.0.2m || N/A ||
| `x86_64-unknown-linux-musl` | 1.1.15 | 5.3.1 | 1.0.2m | | N/A ||
| `x86_64-unknown-netbsd`[1] | 7.0 | 5.3.0 | 1.0.2m || N/A | |
Expand Down
71 changes: 35 additions & 36 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,6 @@ main() {
rm -rf $td
fi

# `cross run` test for thumb targets
case $TARGET in
thumb*-none-eabi*)
td=$(mktemp -d)

git clone \
--depth 1 \
--recursive \
https://github.com/japaric/cortest $td

pushd $td
cross run --target $TARGET --example hello --release
popd

rm -rf $td
;;
esac

# `cross build` test for targets where `std` is not available
if [ -z "$STD" ]; then
td=$(mktemp -d)
Expand Down Expand Up @@ -88,12 +70,13 @@ EOF
popd

rm -rf $td
else
elif [[ "$TARGET" != thumb* ]]; then
td=$(mktemp -d)

git clone --depth 1 https://github.com/japaric/xargo $td

pushd $td
sed -i -e 's/unused_doc_comment/unused_doc_comments/g' src/errors.rs
cross build --target $TARGET
popd

Expand All @@ -112,30 +95,46 @@ EOF
$td

pushd $td
cross test \
--no-default-features \
--features "gen-tests mangled-names" \
--target $TARGET
cross test --manifest-path testcrate/Cargo.toml --target $TARGET
popd

rm -rf $td
fi

# `cross run` test
td=$(mktemp -d)

cargo init --bin --name hello $td
case $TARGET in
thumb*-none-eabi*)
td=$(mktemp -d)

git clone \
--depth 1 \
--recursive \
https://github.com/japaric/cortest $td

pushd $td
cross run --target $TARGET --example hello --release
popd

rm -rf $td
;;
*)
td=$(mktemp -d)

cargo init --bin --name hello $td

pushd $td
mkdir examples tests
echo "fn main() { println!(\"Example!\"); }" > examples/e.rs
echo "#[test] fn t() {}" > tests/t.rs
cross run --target $TARGET
cross run --target $TARGET --example e
cross test --target $TARGET
popd

rm -rf $td
;;
esac

pushd $td
mkdir examples tests
echo "fn main() { println!(\"Example!\"); }" > examples/e.rs
echo "#[test] fn t() {}" > tests/t.rs
cross run --target $TARGET
cross run --target $TARGET --example e
cross test --target $TARGET
popd

rm -rf $td
fi

# Test C++ support
Expand Down
1 change: 1 addition & 0 deletions docker/dragonfly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ main() {
pushd $td

cd gcc
sed -i -e 's/ftp:/https:/g' ./contrib/download_prerequisites
./contrib/download_prerequisites
patch -p0 <<'EOF'
--- libatomic/configure.tgt.orig 2015-07-09 16:08:55 UTC
Expand Down
Loading

0 comments on commit b233311

Please sign in to comment.