From 61a7aa61e837110520fed44871d86584fc314464 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 21 May 2019 20:49:48 +0200 Subject: [PATCH 1/3] CI: use Cargo instead of Cross this removes the Linux GNU targets used to produce binaries but we still have the MUSL builds which will work everywhere because they statically linked binaries --- .travis.yml | 5 +++-- ci/before_deploy.sh | 8 +------- ci/install.sh | 20 ++++++++++---------- ci/script.sh | 4 ++-- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 53ffe6d4..34cfe1e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,10 +36,11 @@ matrix: - env: TARGET=x86_64-unknown-linux-gnu VENDOR=OTHER rust: nightly + # Stable, used to produce binary relreases # Linux - - env: TARGET=i686-unknown-linux-gnu + # - 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-gnu - env: TARGET=x86_64-unknown-linux-musl # OSX diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh index 681c8cb3..41d6879c 100644 --- a/ci/before_deploy.sh +++ b/ci/before_deploy.sh @@ -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 diff --git a/ci/install.sh b/ci/install.sh index 33c4098c..7ecb5292 100644 --- a/ci/install.sh +++ b/ci/install.sh @@ -10,16 +10,16 @@ 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 component add rustfmt-preview } diff --git a/ci/script.sh b/ci/script.sh index a6d2a36f..118947d9 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -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) From 7a3651ea36deb8afa32ad19bc4c0235634e3d56c Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 21 May 2019 21:38:58 +0200 Subject: [PATCH 2/3] install rust-std component --- ci/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/install.sh b/ci/install.sh index 7ecb5292..f93541fa 100644 --- a/ci/install.sh +++ b/ci/install.sh @@ -21,6 +21,7 @@ main() { # --git japaric/cross \ # --tag $tag + rustup target add $TARGET rustup component add rustfmt-preview } From 10d2ef9694f26c2462298f338b0c23d95682f050 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 21 May 2019 22:23:45 +0200 Subject: [PATCH 3/3] drop the musl builds --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34cfe1e8..ad0491c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,12 +36,12 @@ matrix: - env: TARGET=x86_64-unknown-linux-gnu VENDOR=OTHER rust: nightly - # Stable, used to produce binary relreases - # Linux + # 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=i686-unknown-linux-musl # - env: TARGET=x86_64-unknown-linux-gnu - - env: TARGET=x86_64-unknown-linux-musl + # - env: TARGET=x86_64-unknown-linux-musl # OSX - env: TARGET=i686-apple-darwin