File tree Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Expand file tree Collapse file tree 2 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -211,3 +211,13 @@ jobs:
211211 if : " matrix.os == 'ubuntu-latest' && !startsWith(matrix.target, 'thumb')"
212212 env :
213213 TARGET : ${{ matrix.target }}
214+
215+ build-std-detect :
216+ needs : [style]
217+ name : Build std_detect
218+ runs-on : ubuntu-latest
219+ steps :
220+ - uses : actions/checkout@master
221+ - name : Install Rust
222+ run : rustup update nightly && rustup default nightly
223+ - run : ./ci/build-std-detect.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Build std_detect on non-Linux & non-x86 targets.
4+ #
5+ # In std_detect, non-x86 targets have OS-specific implementations,
6+ # but we can test only Linux in CI. This script builds targets supported
7+ # by std_detect but cannot be tested in CI.
8+
9+ set -ex
10+ cd " $( dirname " $0 " ) " /..
11+
12+ targets=(
13+ # Android
14+ aarch64-linux-android
15+ arm-linux-androideabi
16+
17+ # FreeBSD
18+ aarch64-unknown-freebsd
19+ armv6-unknown-freebsd
20+ powerpc-unknown-freebsd
21+ powerpc64-unknown-freebsd
22+
23+ # OpenBSD
24+ aarch64-unknown-openbsd
25+
26+ # Windows
27+ aarch64-pc-windows-msvc
28+ )
29+
30+ rustup component add rust-src # for -Z build-std
31+
32+ cd crates/std_detect
33+ for target in " ${targets[@]} " ; do
34+ if rustup target add " ${target} " & > /dev/null; then
35+ cargo build --target " ${target} "
36+ else
37+ # tier 3 targets requires -Z build-std.
38+ cargo build -Z build-std=" core,alloc" --target " ${target} "
39+ fi
40+ done
You can’t perform that action at this time.
0 commit comments