Skip to content

Commit 45c7930

Browse files
committed
Test semver for all normal targets
1 parent 6fac01b commit 45c7930

File tree

2 files changed

+86
-7
lines changed

2 files changed

+86
-7
lines changed

.travis.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ stages:
1111
matrix:
1212
include:
1313
# TOOLS
14-
- name: "Semver"
15-
env: TARGET=x86_64-unknown-linux-gnu
16-
install: |
17-
travis_retry cargo +nightly install \
18-
--git https://github.com/gnzlbg/rust-semverver \
19-
--branch fix_exit_code
20-
script: cargo +nightly semver --api-guidelines --target="${TARGET}"
2114
- name: "Documentation"
2215
env: TARGET=x86_64-unknown-linux-gnu
2316
script: sh ci/dox.sh
@@ -41,6 +34,22 @@ matrix:
4134
# cargo fmt --all -- --check
4235
# fi
4336
stage: tools-and-build-and-tier1
37+
- name: "Semver"
38+
install: |
39+
travis_retry cargo +nightly install \
40+
--git https://github.com/gnzlbg/rust-semverver \
41+
--branch fix_exit_code
42+
script: sh ci/semver.sh
43+
stage: tools-and-build-and-tier1
44+
- name: "Semver"
45+
install: |
46+
travis_retry cargo +nightly install \
47+
--git https://github.com/gnzlbg/rust-semverver \
48+
--branch fix_exit_code
49+
script: sh ci/semver.sh
50+
os: osx
51+
osx_image: xcode10
52+
stage: tools-and-build-and-tier1
4453

4554
# BUILD stable, beta, nightly
4655
- name: "Build Stable Rust"

ci/semver.sh

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env sh
2+
3+
# Checks that libc does not contain breaking changes for the following targets.
4+
5+
set -ex
6+
7+
OS=${TRAVIS_OS_NAME}
8+
9+
echo "Testing Semver on ${OS}"
10+
11+
TARGETS=
12+
case "${OS}" in
13+
*linux*)
14+
TARGETS="\
15+
aarch64-fuchsia \
16+
aarch64-linux-android \
17+
aarch64-unknown-linux-gnu \
18+
aarch64-unknown-linux-musl \
19+
armv7-linux-androideabi \
20+
armv7-unknown-linux-gnueabihf \
21+
i586-unknown-linux-gnu \
22+
i586-unknown-linux-musl \
23+
i686-linux-android \
24+
i686-unknown-freebsd \
25+
i686-unknown-linux-gnu \
26+
i686-unknown-linux-musl \
27+
i686-pc-windows-gnu \
28+
x86_64-unknown-freebsd \
29+
x86_64-unknown-linux-gnu \
30+
x86_64-unknown-linux-musl \
31+
x86_64-unknown-netbsd \
32+
x86_64-unknown-cloudabi \
33+
x86_64-sun-solaris \
34+
x86_64-fuchsia \
35+
x86_64-pc-windows-gnu \
36+
x86_64-unknown-linux-gnux32 \
37+
x86_64-unknown-redox \
38+
x86_64-fortanix-unknown-sgx \
39+
wasm32-unknown-unknown \
40+
"
41+
;;
42+
*osx*)
43+
TARGETS="\
44+
aarch64-apple-ios \
45+
armv7-apple-ios \
46+
armv7s-apple-ios \
47+
i386-apple-ios \
48+
i686-apple-darwin \
49+
x86_64-apple-darwin \
50+
x86_64-apple-ios \
51+
"
52+
;;
53+
esac
54+
55+
for TARGET in $TARGETS; do
56+
# FIXME: rustup often fails to download some artifacts due to network
57+
# issues, so we retry this N times.
58+
N=5
59+
n=0
60+
until [ $n -ge $N ]
61+
do
62+
if rustup target add "${TARGET}" ; then
63+
break
64+
fi
65+
n=$((n+1))
66+
sleep 1
67+
done
68+
69+
cargo +nightly semver --api-guidelines --target="${TARGET}"
70+
done

0 commit comments

Comments
 (0)