Skip to content
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

Fix build issues #206

Merged
merged 15 commits into from
Oct 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 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,16 @@ 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


before_install:
# workaround for https://github.com/travis-ci/travis-ci/issues/4704
- python3 -c 'import os,sys; os.set_blocking(sys.stdout.fileno(), True)'


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 @@ -200,8 +200,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 @@ -220,10 +220,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
72 changes: 36 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,14 @@ 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/#!\[deny(warnings)\]//g' src/main.rs
sed -i -e 's/unused_doc_comment/unused_doc_comments/g' src/errors.rs
cross build --target $TARGET
popd

Expand All @@ -112,30 +96,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