@@ -8,9 +8,6 @@ cargo_cache:
8
8
# the system's binaries, so the environment shouldn't matter.
9
9
task :
10
10
name : FreeBSD amd64 & i686
11
- env :
12
- # Temporary workaround for https://github.com/rust-lang/rustup/issues/2774
13
- RUSTUP_IO_THREADS : 1
14
11
freebsd_instance :
15
12
image : freebsd-11-4-release-amd64
16
13
setup_script :
@@ -31,24 +28,17 @@ task:
31
28
- name : OSX x86_64
32
29
env :
33
30
TARGET : x86_64-apple-darwin
34
- - name : iOS aarch64
35
- env :
36
- TARGET : aarch64-apple-ios
37
- DISABLE_TESTS : 1
38
- - name : iOS x86_64
39
- env :
40
- TARGET : x86_64-apple-ios
41
- DISABLE_TESTS : 1
42
31
osx_instance :
43
32
image : catalina-xcode
44
33
setup_script :
45
34
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
46
35
- sh rustup.sh -y --profile=minimal --default-toolchain 1.46.0
47
36
- . $HOME/.cargo/env
48
- - bash ci/ install.sh
37
+ - cargo install cross
49
38
script :
50
39
- . $HOME/.cargo/env
51
- - bash ci/script.sh
40
+ - cross build --target $TARGET
41
+ - cross test --target $TARGET
52
42
before_cache_script : rm -rf $CARGO_HOME/registry/index
53
43
54
44
# Use cross for QEMU-based testing
@@ -100,10 +90,11 @@ task:
100
90
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
101
91
- sh rustup.sh -y --profile=minimal --default-toolchain 1.46.0
102
92
- . $HOME/.cargo/env
103
- - bash ci/ install.sh
93
+ - cargo install cross
104
94
script :
105
95
- . $HOME/.cargo/env || true
106
- - bash ci/script.sh
96
+ - cross build --target $TARGET
97
+ - cross test --target $TARGET
107
98
before_cache_script : rm -rf $CARGO_HOME/registry/index
108
99
109
100
# Tasks for Linux amd64 builds
@@ -128,14 +119,18 @@ task:
128
119
- rustup target add --toolchain $TOOLCHAIN $TARGET
129
120
script :
130
121
- cargo +$TOOLCHAIN build --target $TARGET --all-targets
131
- - cargo +$TOOLCHAIN build --target $TARGET --all-targets --release
132
122
- cargo +$TOOLCHAIN test --target $TARGET
133
- - cargo +$TOOLCHAIN test --target $TARGET --release
134
123
before_cache_script : rm -rf $CARGO_HOME/registry/index
135
124
136
125
# Tasks for cross-compiling, but no testing
137
126
task :
127
+ container :
128
+ image : rust:1.46
129
+ env :
130
+ TOOLCHAIN : 1.46.0
138
131
matrix :
132
+ # Cross claims to support Android, but when it tries to run Nix's tests it
133
+ # reports undefined symbol references.
139
134
- name : Android aarch64
140
135
env :
141
136
TARGET : aarch64-linux-android
@@ -154,9 +149,40 @@ task:
154
149
- name : Linux arm-musleabi
155
150
env :
156
151
TARGET : arm-unknown-linux-musleabi
152
+ - name : Fuchsia x86_64
153
+ env :
154
+ TARGET : x86_64-fuchsia
155
+ - name : Illumos
156
+ env :
157
+ TARGET : x86_64-unknown-illumos
158
+ # illumos toolchain isn't available via rustup until 1.50
159
+ TOOLCHAIN : 1.50.0
160
+ container :
161
+ image : rust:1.50
162
+ # Cross claims to support running tests on iOS, but it actually doesn't.
163
+ # https://github.com/rust-embedded/cross/issues/535
164
+ - name : iOS aarch64
165
+ env :
166
+ TARGET : aarch64-apple-ios
167
+ # Rustup only supports cross-building from arbitrary hosts for iOS at
168
+ # 1.49.0 and above. Below that it's possible to cross-build from an OSX
169
+ # host, but OSX VMs
170
+ # are more expensive than Linux VMs.
171
+ TOOLCHAIN : 1.49.0
172
+ - name : iOS x86_64
173
+ env :
174
+ TARGET : x86_64-apple-ios
175
+ TOOLCHAIN : 1.49.0
176
+ # Cross testing on powerpc fails with "undefined reference to renameat2".
177
+ # Perhaps cross is using too-old a version?
157
178
- name : Linux powerpc
158
179
env :
159
180
TARGET : powerpc-unknown-linux-gnu
181
+ # Cross claims to support Linux powerpc64, but it really doesn't.
182
+ # https://github.com/rust-embedded/cross/issues/441
183
+ - name : Linux powerpc64
184
+ env :
185
+ TARGET : powerpc64-unknown-linux-gnu
160
186
- name : Linux s390x
161
187
env :
162
188
TARGET : s390x-unknown-linux-gnu
@@ -166,57 +192,24 @@ task:
166
192
- name : NetBSD x86_64
167
193
env :
168
194
TARGET : x86_64-unknown-netbsd
169
- - name : Fuchsia x86_64
195
+ - name : Redox x86_64
170
196
env :
171
- TARGET : x86_64-fuchsia
172
- container :
173
- image : rust:1.46
174
- setup_script :
175
- - rustup target add $TARGET
176
- script :
177
- - cargo +$TOOLCHAIN check --target $TARGET
178
- - cargo +$TOOLCHAIN check --target $TARGET --release
179
- - cargo +$TOOLCHAIN check --all-targets --target $TARGET
180
- before_cache_script : rm -rf $CARGO_HOME/registry/index
181
-
182
- # illumos toolchain isn't available via rustup until 1.50
183
- task :
184
- name : illumos
185
- env :
186
- TARGET : x86_64-unknown-illumos
187
- container :
188
- image : rust:1.50
197
+ TARGET : x86_64-unknown-redox
198
+ # Redox requires a nightly compiler.
199
+ # If stuff breaks, change nightly to the date in the toolchain_*
200
+ # directory at https://static.redox-os.org
201
+ TOOLCHAIN : nightly-2020-08-04
189
202
setup_script :
190
203
- rustup target add $TARGET
191
- script :
192
- - cargo +$TOOLCHAIN check --target $TARGET
193
- - cargo +$TOOLCHAIN check --target $TARGET --release
194
- before_cache_script : rm -rf $CARGO_HOME/registry/index
195
-
196
- # Redoxer is too unreliable, so we'll do a cross-build only
197
- # See also:
198
- # https://github.com/nix-rust/nix/issues/1258
199
- # https://github.com/rust-embedded/cross/issues/427
200
- task :
201
- name : Redox x86_64
202
- env :
203
- TARGET : x86_64-unknown-redox
204
- # Redox requires a nightly compiler.
205
- # If stuff breaks, change nightly to the date in the toolchain_*
206
- # directory at https://static.redox-os.org
207
- TOOLCHAIN : nightly-2020-08-04
208
- container :
209
- image : rustlang/rust:nightly
210
- setup_script :
211
204
- rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET
212
205
script :
213
206
- cargo +$TOOLCHAIN check --target $TARGET
214
- - cargo +$TOOLCHAIN check --target $TARGET --release
207
+ - cargo +$TOOLCHAIN check --all-targets -- target $TARGET
215
208
before_cache_script : rm -rf $CARGO_HOME/registry/index
216
209
217
210
# Test that we can build with the lowest version of all dependencies.
218
211
# "cargo test" doesn't work because some of our dev-dependencies, like
219
- # rand, can't build with thier own minimal dependencies.
212
+ # rand, can't build with their own minimal dependencies.
220
213
task :
221
214
name : Minver
222
215
container :
0 commit comments