Skip to content

Commit 5b5684e

Browse files
authored
Auto merge of #3274 - alexcrichton:more-travis-again, r=alexcrichton
More travis again Landing this again hopefully with the doc fix
2 parents 0c155a4 + dc15ca5 commit 5b5684e

File tree

12 files changed

+345
-107
lines changed

12 files changed

+345
-107
lines changed

.travis.yml

+142-38
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,153 @@
11
language: rust
2-
rust:
3-
- stable
4-
- beta
5-
- nightly
6-
sudo: false
2+
rust: stable
3+
sudo: required
4+
dist: trusty
5+
os: linux
6+
services:
7+
- docker
8+
9+
matrix:
10+
include:
11+
# stable linux builds, tested
12+
- env: TARGET=x86_64-unknown-linux-gnu
13+
ALT=i686-unknown-linux-gnu
14+
IMAGE=dist
15+
MAKE_TARGETS="test distcheck doc install uninstall"
16+
- env: TARGET=i686-unknown-linux-gnu
17+
IMAGE=dist
18+
MAKE_TARGETS=test-unit-i686-unknown-linux-gnu
19+
CFG_DISABLE_CROSS_TESTS=1
20+
21+
# stable osx builds, tested
22+
- env: TARGET=x86_64-apple-darwin
23+
ALT=i686-apple-darwin
24+
MAKE_TARGETS="test distcheck doc install uninstall"
25+
MACOSX_DEPLOYMENT_TARGET=10.7
26+
os: osx
27+
before_install:
28+
- export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
29+
- export OPENSSL_LIB_DIR=`brew --prefix openssl`/include
30+
- env: TARGET=i686-apple-darwin
31+
MAKE_TARGETS=test
32+
MACOSX_DEPLOYMENT_TARGET=10.7
33+
CFG_DISABLE_CROSS_TESTS=1
34+
os: osx
35+
before_install:
36+
- export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
37+
- export OPENSSL_LIB_DIR=`brew --prefix openssl`/include
38+
39+
# stable musl target, tested
40+
- env: TARGET=x86_64-unknown-linux-musl
41+
IMAGE=x86_64-musl
42+
CFG_DISABLE_CROSS_TESTS=1
43+
MAKE_TARGETS=test-unit-$TARGET
44+
45+
# cross compiled targets
46+
- env: TARGET=arm-unknown-linux-gnueabi
47+
IMAGE=cross
48+
- env: TARGET=arm-unknown-linux-gnueabihf
49+
IMAGE=cross
50+
- env: TARGET=armv7-unknown-linux-gnueabihf
51+
IMAGE=cross
52+
- env: TARGET=aarch64-unknown-linux-gnu
53+
IMAGE=cross
54+
- env: TARGET=i686-unknown-freebsd
55+
IMAGE=cross
56+
- env: TARGET=x86_64-unknown-freebsd
57+
IMAGE=cross
58+
- env: TARGET=x86_64-unknown-netbsd
59+
IMAGE=cross
60+
- env: TARGET=mips-unknown-linux-gnu
61+
IMAGE=cross
62+
- env: TARGET=mipsel-unknown-linux-gnu
63+
IMAGE=cross
64+
- env: TARGET=mips64-unknown-linux-gnuabi64
65+
IMAGE=cross
66+
rust: nightly
67+
- env: TARGET=mips64el-unknown-linux-gnuabi64
68+
IMAGE=cross
69+
rust: nightly
70+
- env: TARGET=s390x-unknown-linux-gnu
71+
IMAGE=cross
72+
rust: nightly
73+
- env: TARGET=powerpc-unknown-linux-gnu
74+
IMAGE=cross
75+
rust: beta
76+
- env: TARGET=powerpc64-unknown-linux-gnu
77+
IMAGE=cross
78+
rust: beta
79+
- env: TARGET=powerpc64le-unknown-linux-gnu
80+
IMAGE=cross
81+
rust: beta
82+
83+
# beta/nightly builds
84+
- env: TARGET=x86_64-unknown-linux-gnu
85+
ALT=i686-unknown-linux-gnu
86+
IMAGE=dist
87+
MAKE_TARGETS="test distcheck doc install uninstall"
88+
DEPLOY=0
89+
rust: beta
90+
- env: TARGET=x86_64-unknown-linux-gnu
91+
ALT=i686-unknown-linux-gnu
92+
IMAGE=dist
93+
MAKE_TARGETS="test distcheck doc install uninstall"
94+
DEPLOY=0
95+
rust: nightly
96+
97+
exclude:
98+
- rust: stable
99+
100+
before_script:
101+
- curl https://static.rust-lang.org/rustup.sh |
102+
sh -s -- --add-target=$TARGET --disable-sudo -y --prefix=`rustc --print sysroot`
103+
- if [ ! -z "$ALT" ]; then
104+
curl https://static.rust-lang.org/rustup.sh |
105+
sh -s -- --add-target=$ALT --disable-sudo -y --prefix=`rustc --print sysroot`;
106+
fi
7107
script:
8-
- ./configure --prefix=$HOME/cargo-install --disable-cross-tests --disable-optimize
9-
- make
10-
- make test
11-
- make distcheck
12-
- make doc
13-
- make install
14-
- make uninstall
108+
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
109+
SRC=. src/ci/run.sh $TARGET;
110+
else
111+
src/ci/docker/run.sh $IMAGE $TARGET;
112+
fi
15113
after_success: |
16114
[ $TRAVIS_BRANCH = master ] &&
17115
[ $TRAVIS_PULL_REQUEST = false ] &&
18116
[ $(uname -s) = Linux ] &&
19117
pip install ghp-import --user $USER &&
20118
$HOME/.local/bin/ghp-import -n target/doc &&
21-
git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
119+
git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
120+
22121
env:
23122
global:
24-
# apparently we use too much memory and if there's more than one rustc then
25-
# when compiling Cargo's unit tests some compilers will be randomly kill
26-
# -9'd
27-
- CARGOFLAGS=-j1
28-
- secure: scGpeetUfba5RWyuS4yt10bPoFAI9wpHEReIFqEx7eH5vr2Anajk6+70jW6GdrWVdUvdINiArlQ3An2DeB9vEUWcBjw8WvuPtOH0tDMoSsuVloPlFD8yn1Ac0Bx9getAO5ofxqtoNg+OV4MDVuGabEesqAOWqURNrBC7XK+ntC8=
123+
- DEPLOY=1
124+
- secure: LB2o9UL90Z4CVOLVQsTbZr7ZBLA1dCLxFODuCkPkbdqG3Kl5z1yMIPMRvSbjp9KwBlIgm+Mg0R1iqphKVq+rVP5zo96K4+kEQMG+zWsPb23ZKTxiL8MK5VgCZ7s9AONCvNeCTCNAG3EyeciFr5Zr9eygVCfo0WF6JsPujYYQZx0=
29125

30-
matrix:
31-
include:
32-
- os: osx
33-
rust: stable
34-
before_install:
35-
- export OPENSSL_INCLUDE_DIR=`brew --prefix openssl`/include
36-
- export OPENSSL_LIB_DIR=`brew --prefix openssl`/lib
37-
38-
branches:
39-
only:
40-
- master
41-
42-
addons:
43-
apt:
44-
sources:
45-
- kalakris-cmake
46-
packages:
47-
- cmake
48-
- g++-multilib
49-
- lib32stdc++6
126+
notifications:
127+
email:
128+
on_success: never
129+
130+
before_deploy:
131+
- mkdir -p deploy/$TRAVIS_COMMIT
132+
- cp target/$TARGET/release/dist/cargo-nightly-$TARGET.tar.gz
133+
deploy/$TRAVIS_COMMIT
134+
135+
deploy:
136+
- provider: s3
137+
bucket: rust-lang-cargo-dev
138+
skip_cleanup: true
139+
local_dir: deploy
140+
upload_dir: cargo-master
141+
acl: public_read
142+
region: us-west-1
143+
access_key_id: AKIAJYHGN72KKCN4DFBQ
144+
secret_access_key:
145+
secure: wKKDMYBVTdWLuc7+ffpjTqJs1EdM2pXpV6keUfZGv9RLRta+esh/r/cgc+UQ7+m9JHAliH8eWhlMm5ws6WDgkTvM0PTdqWBgwd24BRbAitsXX2kWfi9WgAeSJVSkIJdZ999TRpRIJu7Zc+1++fbfdD/tDv5XBirQGOJv1HynVWY=
146+
on:
147+
branch: auto
148+
condition: $DEPLOY = 1
149+
150+
cache:
151+
directories:
152+
- $HOME/.cargo
153+
- target/openssl

Makefile.in

+30-25
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ OPENSSL_SHA256=e7aff292be21c259c6af26469c7a9b3ba26e9abaaffd325e3dccc9785256c431
66

77
include config.mk
88

9-
ifneq ($(CFG_LOCAL_RUST_ROOT),)
10-
export LD_LIBRARY_PATH := $(CFG_LOCAL_RUST_ROOT)/lib:$(LD_LIBRARY_PATH)
11-
export DYLD_LIBRARY_PATH := $(CFG_LOCAL_RUST_ROOT)/lib:$(DYLD_LIBRARY_PATH)
12-
endif
13-
149
export PATH := $(dir $(CFG_RUSTC)):$(PATH)
1510

1611
ifdef CFG_ENABLE_NIGHTLY
@@ -84,44 +79,45 @@ $(foreach target,$(CFG_TARGET),$(eval $(call DIST_TARGET,$(target))))
8479
ifdef CFG_LOCAL_CARGO
8580
CARGO := $(CFG_LOCAL_CARGO)
8681
else
87-
CARGO := $(TARGET_ROOT)/snapshot/bin/cargo$(X)
82+
CARGO := $(CFG_CARGO)
8883
endif
8984

9085
all: $(foreach target,$(CFG_TARGET),cargo-$(target))
9186

9287
define CARGO_TARGET
93-
cargo-$(1): $$(CARGO) target/openssl/$(1).stamp
88+
cargo-$(1): target/openssl/$(1).stamp
9489
$$(CFG_RUSTC) -V
9590
$$(CARGO) --version
9691
$$(CARGO) build --target $(1) \
9792
--manifest-path $(S)Cargo.toml \
9893
$$(OPT_FLAG) $$(CARGOFLAGS) $$(VERBOSE_FLAG) $$(ARGS)
9994

100-
test-unit-$(1): $$(CARGO)
101-
@mkdir -p target/$(1)/cit
102-
$$(CARGO) test --target $(1) $$(CARGOFLAGS) $$(VERBOSE_FLAG) $$(only)
95+
test-unit-$(1): target/openssl/$(1).stamp cargo-$(1)
96+
@mkdir -p $$(CFG_BUILD_DIR)/target/$(1)/cit
97+
$$(CARGO) test --target $(1) \
98+
--manifest-path $(S)Cargo.toml \
99+
$$(OPT_FLAG) $$(CARGOFLAGS) $$(VERBOSE_FLAG) $$(only)
103100
endef
104101
$(foreach target,$(CFG_TARGET),$(eval $(call CARGO_TARGET,$(target))))
105102

106-
$(TARGET_ROOT)/snapshot/bin/cargo$(X): $(S)src/snapshots.txt
107-
$(CFG_PYTHON) $(S)src/etc/dl-snapshot.py $(CFG_BUILD)
108-
touch $@
109-
110-
111103
# === Tests
112104

113105
test: style no-exes $(foreach target,$(CFG_TARGET),test-unit-$(target))
114106

115107
style:
116-
sh tests/check-style.sh
108+
(cd $(S) && sh tests/check-style.sh)
117109

110+
ifeq ($(CFG_GIT),)
111+
no-exes:
112+
else
118113
no-exes:
119-
find $$(git ls-files) -type f \
114+
(cd $(S) && find $$($(CFG_GIT) ls-files) -type f \
120115
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
121116
-not -name configure -not -name '*.sh' -not -name '*.rs' \
122117
-not -name '*.py' -not -wholename "*/rust-installer/*" | \
123118
grep '.*' \
124-
&& exit 1 || exit 0
119+
&& exit 1 || exit 0)
120+
endif
125121

126122
# === Misc
127123

@@ -143,9 +139,9 @@ DOC_OPTS := --markdown-no-toc \
143139
--markdown-css stylesheets/normalize.css \
144140
--markdown-css stylesheets/all.css \
145141
--markdown-css stylesheets/prism.css \
146-
--html-in-header src/doc/html-headers.html \
147-
--html-before-content src/doc/header.html \
148-
--html-after-content src/doc/footer.html
142+
--html-in-header $(S)src/doc/html-headers.html \
143+
--html-before-content $(S)src/doc/header.html \
144+
--html-after-content $(S)src/doc/footer.html
149145
ASSETS := CNAME images/noise.png images/forkme.png images/Cargo-Logo-Small.png \
150146
stylesheets/all.css stylesheets/normalize.css javascripts/prism.js \
151147
javascripts/all.js stylesheets/prism.css images/circle-with-i.png \
@@ -156,14 +152,19 @@ doc: $(foreach doc,$(DOCS),target/doc/$(doc).html) \
156152
$(foreach asset,$(ASSETS),target/doc/$(asset)) \
157153
target/doc/cargo/index.html
158154

159-
target/doc/cargo/index.html:
160-
$(CARGO) doc --no-deps
155+
target/doc/cargo/index.html: target/openssl/$(CFG_BUILD).stamp cargo-$(CFG_BUILD)
156+
$(CARGO) doc --no-deps --target $(CFG_BUILD) \
157+
--manifest-path $(S)Cargo.toml $(OPT_FLAG)
161158

162-
$(DOC_DIR)/%.html: src/doc/%.md src/doc/html-headers.html src/doc/header.html src/doc/footer.html
159+
$(DOC_DIR)/%.html: \
160+
$(S)src/doc/%.md \
161+
$(S)src/doc/html-headers.html \
162+
$(S)src/doc/header.html \
163+
$(S)src/doc/footer.html
163164
@mkdir -p $(@D)
164165
$(CFG_RUSTDOC) $< -o $(@D) $(DOC_OPTS)
165166

166-
$(DOC_DIR)/%: src/doc/%
167+
$(DOC_DIR)/%: $(S)src/doc/%
167168
@mkdir -p $(@D)
168169
cp $< $@
169170

@@ -173,6 +174,7 @@ OPENSSL_OS_arm-unknown-linux-gnueabihf := linux-armv4
173174
OPENSSL_OS_armv7-unknown-linux-gnueabihf := linux-armv4
174175
OPENSSL_OS_i686-unknown-freebsd := BSD-x86-elf
175176
OPENSSL_OS_i686-unknown-linux-gnu := linux-elf
177+
OPENSSL_OS_i686-unknown-linux-musl := linux-elf
176178
OPENSSL_OS_mips-unknown-linux-gnu := linux-mips32
177179
OPENSSL_OS_mipsel-unknown-linux-gnu := linux-mips32
178180
OPENSSL_OS_mips64-unknown-linux-gnuabi64 := linux64-mips64
@@ -192,6 +194,7 @@ OPENSSL_AR_arm-unknown-linux-gnueabihf := arm-linux-gnueabihf-ar
192194
OPENSSL_AR_armv7-unknown-linux-gnueabihf := armv7-linux-gnueabihf-ar
193195
OPENSSL_AR_i686-unknown-freebsd := i686-unknown-freebsd10-ar
194196
OPENSSL_AR_i686-unknown-linux-gnu := ar
197+
OPENSSL_AR_i686-unknown-linux-musl := ar
195198
OPENSSL_AR_mips-unknown-linux-gnu := mips-linux-gnu-ar
196199
OPENSSL_AR_mips64-unknown-linux-gnuabi64 := mips64-linux-gnuabi64-ar
197200
OPENSSL_AR_mips64el-unknown-linux-gnuabi64 := mips64el-linux-gnuabi64-ar
@@ -210,6 +213,7 @@ OPENSSL_CC_arm-unknown-linux-gnueabihf := arm-linux-gnueabihf-gcc
210213
OPENSSL_CC_armv7-unknown-linux-gnueabihf := armv7-linux-gnueabihf-gcc
211214
OPENSSL_CC_i686-unknown-freebsd := i686-unknown-freebsd10-gcc
212215
OPENSSL_CC_i686-unknown-linux-gnu := gcc
216+
OPENSSL_CC_i686-unknown-linux-musl := musl-gcc
213217
OPENSSL_CC_mips-unknown-linux-gnu := mips-linux-gnu-gcc
214218
OPENSSL_CC_mips64-unknown-linux-gnuabi64 := mips64-linux-gnuabi64-gcc
215219
OPENSSL_CC_mips64el-unknown-linux-gnuabi64 := mips64el-linux-gnuabi64-gcc
@@ -225,6 +229,7 @@ OPENSSL_CC_x86_64-unknown-netbsd := x86_64-unknown-netbsd-gcc
225229

226230
SETARCH_i686-unknown-linux-gnu := setarch i386
227231
OPENSSL_CFLAGS_i686-unknown-linux-gnu := -m32
232+
OPENSSL_CFLAGS_i686-unknown-linux-musl := -m32
228233

229234
define BUILD_OPENSSL
230235
ifdef OPENSSL_OS_$(1)

0 commit comments

Comments
 (0)