Skip to content

CI: use Cargo instead of Cross #297

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

Merged
merged 3 commits into from
May 21, 2019
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
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ matrix:
- env: TARGET=x86_64-unknown-linux-gnu VENDOR=OTHER
rust: nightly

# Linux
- env: TARGET=i686-unknown-linux-gnu
- env: TARGET=i686-unknown-linux-musl
- env: TARGET=x86_64-unknown-linux-gnu
- env: TARGET=x86_64-unknown-linux-musl
# Stable, used to produce binary releases
# Linux; we do the MUSL builds locally and then upload the binaries
# - env: TARGET=i686-unknown-linux-gnu
# - env: TARGET=i686-unknown-linux-musl
# - env: TARGET=x86_64-unknown-linux-gnu
# - env: TARGET=x86_64-unknown-linux-musl

# OSX
- env: TARGET=i686-apple-darwin
Expand Down
8 changes: 1 addition & 7 deletions ci/before_deploy.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
set -euxo pipefail

main() {
if [ $TARGET = x86_64-pc-windows-msvc ]; then
cargo=cargo
else
cargo=cross
fi

$cargo rustc --bin svd2rust --target $TARGET --release -- -C lto
cargo rustc --bin svd2rust --target $TARGET --release -- -C lto

rm -rf stage
mkdir stage
Expand Down
21 changes: 11 additions & 10 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ main() {
sort=gsort
fi

local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
| cut -d/ -f3 \
| grep -E '^v[0-9.]+$' \
| $sort --version-sort \
| tail -n1)
curl -LSfs https://japaric.github.io/trust/install.sh | \
sh -s -- \
--force \
--git japaric/cross \
--tag $tag
# local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
# | cut -d/ -f3 \
# | grep -E '^v[0-9.]+$' \
# | $sort --version-sort \
# | tail -n1)
# curl -LSfs https://japaric.github.io/trust/install.sh | \
# sh -s -- \
# --force \
# --git japaric/cross \
# --tag $tag

rustup target add $TARGET
rustup component add rustfmt-preview
}

Expand Down
4 changes: 2 additions & 2 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ main() {
return
fi

cross check --target $TARGET
cargo check --target $TARGET

if [ -z ${VENDOR-} ]; then
return
fi

cross build --target $TARGET --release
cargo build --target $TARGET --release

case $TRAVIS_OS_NAME in
linux)
Expand Down