mirror of
https://github.com/cobalt-org/cobalt.rs
synced 2024-11-15 00:17:29 +00:00
Remove cross
This commit is contained in:
parent
259dd60d66
commit
2dc5ee6dfd
6 changed files with 11 additions and 39 deletions
|
@ -1,9 +1,5 @@
|
|||
# Based on the "trust" template v0.1.1
|
||||
# # https://github.com/japaric/trust/tree/v0.1.1
|
||||
|
||||
dist: trusty
|
||||
language: rust
|
||||
services: docker
|
||||
|
||||
rust: stable
|
||||
|
||||
|
@ -17,7 +13,6 @@ matrix:
|
|||
include:
|
||||
# Linux
|
||||
# - env: TARGET=x86_64-unknown-linux-gnu # this is the default job
|
||||
- env: TARGET=x86_64-unknown-linux-musl
|
||||
|
||||
# OSX
|
||||
- env: TARGET=x86_64-apple-darwin
|
||||
|
|
|
@ -38,14 +38,11 @@ install:
|
|||
test_script:
|
||||
# we don't run the "test phase" when doing deploys
|
||||
- if [%APPVEYOR_REPO_TAG%]==[false] (
|
||||
cargo build --target %TARGET% &&
|
||||
cargo build --target %TARGET% --release &&
|
||||
cargo test --target %TARGET% &&
|
||||
cargo test --target %TARGET% --release
|
||||
cargo build --verbose && cargo test
|
||||
)
|
||||
|
||||
before_deploy:
|
||||
- cargo rustc --target %TARGET% --release --bin cargo -- -C lto
|
||||
- cargo rustc --target %TARGET% --release --bin cobalt -- -C lto
|
||||
- ps: ci\before_deploy.ps1
|
||||
|
||||
#deploy:
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# This script takes care of building your crate and packaging it for release
|
||||
|
||||
set -ex
|
||||
|
||||
main() {
|
||||
|
@ -17,7 +15,7 @@ main() {
|
|||
|
||||
test -f Cargo.lock || cargo generate-lockfile
|
||||
|
||||
cross rustc --bin cobalt --target $TARGET --release -- -C lto
|
||||
cargo rustc --target $TARGET --release --bin cobalt -- -C lto
|
||||
|
||||
cp target/$TARGET/release/cobalt $stage/
|
||||
|
||||
|
|
|
@ -4,20 +4,6 @@ main() {
|
|||
curl https://sh.rustup.rs -sSf | \
|
||||
sh -s -- -y --default-toolchain $TRAVIS_RUST_VERSION
|
||||
|
||||
local target=
|
||||
if [ $TRAVIS_OS_NAME = linux ]; then
|
||||
target=x86_64-unknown-linux-gnu
|
||||
else
|
||||
target=x86_64-apple-darwin
|
||||
fi
|
||||
|
||||
curl -LSfs https://japaric.github.io/trust/install.sh | \
|
||||
sh -s -- \
|
||||
--force \
|
||||
--git japaric/cross \
|
||||
--tag v0.1.4 \
|
||||
--target $target
|
||||
|
||||
# Install rustfmt
|
||||
curl -LSfs https://japaric.github.io/trust/install.sh | \
|
||||
sh -s -- \
|
||||
|
@ -25,9 +11,8 @@ main() {
|
|||
--crate rustfmt \
|
||||
--git japaric/rustfmt-bin \
|
||||
--tag v0.6.3-20170107 \
|
||||
--target $target
|
||||
|
||||
if [ $TRAVIS_RUST_VERSION == nightly ]; then
|
||||
if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
|
||||
cargo install clippy || true
|
||||
fi
|
||||
}
|
||||
|
|
13
ci/script.sh
Normal file → Executable file
13
ci/script.sh
Normal file → Executable file
|
@ -1,18 +1,15 @@
|
|||
# This script takes care of testing your crate
|
||||
|
||||
set -ex
|
||||
|
||||
main() {
|
||||
TARGET=$TARGET cross build --target $TARGET
|
||||
TARGET=$TARGET cross build --target $TARGET --release
|
||||
cargo build
|
||||
cargo test
|
||||
|
||||
TARGET=$TARGET cross test --target $TARGET
|
||||
TARGET=$TARGET cross test --target $TARGET --release
|
||||
|
||||
if [ $TRAVIS_RUST_VERSION == nightly ]; then
|
||||
if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
|
||||
cargo clippy -- --version
|
||||
cargo clippy
|
||||
fi
|
||||
|
||||
cargo fmt -- --version
|
||||
cargo fmt -- --write-mode=diff
|
||||
}
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ static EMPTY: &'static [&'static str] = &[];
|
|||
lazy_static! {
|
||||
static ref _CWD: PathBuf = env::current_dir().unwrap();
|
||||
static ref CWD: &'static Path = _CWD.as_path();
|
||||
static ref _BIN: PathBuf = CWD.join("target/")
|
||||
.join(option_env!("TARGET").unwrap_or("")).join("debug").join("cobalt");
|
||||
// TODO test on release
|
||||
static ref _BIN: PathBuf = CWD.join("target/debug/cobalt");
|
||||
static ref BIN: &'static str = _BIN.to_str().unwrap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue