Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 35fc5ed

Browse files
committed
Move crates to crates folder
1 parent aa8e783 commit 35fc5ed

File tree

20 files changed

+288
-109
lines changed

20 files changed

+288
-109
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ stable = []
1717

1818
[workspace]
1919
members = [
20-
"cb",
21-
"input-generator",
22-
"musl-generator",
23-
"newlib-generator",
24-
"shared",
20+
"crates/compiler-builtins-smoke-test",
21+
"crates/input-generator",
22+
"crates/musl-generator",
23+
"crates/newlib-generator",
24+
"crates/shared",
2525
]
2626

2727
[dev-dependencies]

azure-pipelines.yml

Lines changed: 140 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,143 @@
1-
# Starter pipeline
2-
# Start with a minimal pipeline that you can customize to build and deploy your code.
3-
# Add steps that build, run tests, deploy, and more:
4-
# https://aka.ms/yaml
5-
61
trigger:
7-
- master
8-
9-
pool:
10-
vmImage: 'Ubuntu-16.04'
2+
- master
113

12-
steps:
13-
- script: echo Hello, world!
14-
displayName: 'Run a one-line script'
4+
jobs:
5+
- job: Docker
6+
pool:
7+
vmImage: ubuntu-16.04
8+
steps:
9+
- template: ci/azure-install-rust.yml
10+
env:
11+
TOOLCHAIN: nightly
12+
- bash: rustup target add $TARGET
13+
displayName: "Install rust cross target"
14+
- bash: |
15+
set -e
16+
mkdir cross
17+
curl -L https://github.com/rust-embedded/cross/releases/download/v0.1.14/cross-v0.1.14-x86_64-unknown-linux-musl.tar.gz | tar xzf - -C $HOME/.cargo/bin
18+
displayName: "Install cross"
19+
- bash: cross test --lib --features checked --target $TARGET --release
20+
displayName: "Run lib tests"
21+
- bash: cross test --tests --features checked --target $TARGET --release
22+
displayName: "Run integration tests"
23+
strategy:
24+
matrix:
25+
aarch64:
26+
TARGET: aarch64-unknown-linux-gnu
27+
armhv:
28+
TARGET: arm-unknown-linux-gnueabihf
29+
armv7:
30+
TARGET: armv7-unknown-linux-gnueabihf
31+
i586:
32+
TARGET: i586-unknown-linux-gnu
33+
i686:
34+
TARGET: i686-unknown-linux-gnu
35+
mips:
36+
TARGET: mips-unknown-linux-gnu
37+
mips64:
38+
TARGET: mips64-unknown-linux-gnuabi64
39+
mips64el:
40+
TARGET: mips64el-unknown-linux-gnuabi64
41+
powerpc:
42+
TARGET: powerpc-unknown-linux-gnu
43+
powerpc64:
44+
TARGET: powerpc64-unknown-linux-gnu
45+
powerpc64le:
46+
TARGET: powerpc64le-unknown-linux-gnu
47+
x86_64:
48+
TARGET: x86_64-unknown-linux-gnu
1549

16-
- script: |
17-
echo Add other tasks to build, test, and deploy your project.
18-
echo See https://aka.ms/yaml
19-
displayName: 'Run a multi-line script'
50+
# - job: Linux
51+
# pool:
52+
# vmImage: ubuntu-16.04
53+
# steps:
54+
# - template: ci/azure-test-all.yml
55+
# strategy:
56+
# matrix:
57+
# stable:
58+
# TOOLCHAIN: stable
59+
# beta:
60+
# TOOLCHAIN: beta
61+
# nightly:
62+
# TOOLCHAIN: nightly
63+
#
64+
# - job: macOS
65+
# pool:
66+
# vmImage: macos-10.13
67+
# steps:
68+
# - template: ci/azure-test-all.yml
69+
# strategy:
70+
# matrix:
71+
# x86_64:
72+
# TARGET: x86_64-apple-darwin
73+
#
74+
# - job: iOS
75+
# pool:
76+
# vmImage: macos-10.13
77+
# steps:
78+
# - checkout: self
79+
# submodules: true
80+
# - template: ci/azure-install-rust.yml
81+
# - script: rustup target add $TARGET
82+
# displayName: "Install rust cross target"
83+
# - bash: |
84+
# set -e
85+
# export SDK_PATH=`xcrun --show-sdk-path --sdk $SDK`
86+
# export RUSTFLAGS="-C link-arg=-isysroot -C link-arg=$SDK_PATH"
87+
# cargo test --no-run --target $TARGET
88+
# displayName: "Build for iOS"
89+
# strategy:
90+
# matrix:
91+
# aarch64:
92+
# TARGET: aarch64-apple-ios
93+
# SDK: iphoneos
94+
# armv7:
95+
# TARGET: armv7-apple-ios
96+
# SDK: iphoneos
97+
# armv7s:
98+
# TARGET: armv7s-apple-ios
99+
# SDK: iphoneos
100+
# i386:
101+
# TARGET: i386-apple-ios
102+
# SDK: iphonesimulator
103+
# x86_64:
104+
# TARGET: x86_64-apple-ios
105+
# SDK: iphonesimulator
106+
#
107+
# - job: wasm
108+
# pool:
109+
# vmImage: ubuntu-16.04
110+
# steps:
111+
# - checkout: self
112+
# submodules: true
113+
# - template: ci/azure-install-rust.yml
114+
# - script: rustup target add wasm32-unknown-unknown
115+
# displayName: "Install rust cross target"
116+
# - script: cargo build --target wasm32-unknown-unknown
117+
# displayName: "Build for wasm"
118+
#
119+
# - job: Windows
120+
# pool:
121+
# vmImage: vs2017-win2016
122+
# steps:
123+
# - template: ci/azure-test-all.yml
124+
# strategy:
125+
# matrix:
126+
# x86_64-msvc:
127+
# TARGET: x86_64-pc-windows-msvc
128+
# i686-msvc:
129+
# TARGET: i686-pc-windows-msvc
130+
# x86_64-gnu:
131+
# TARGET: x86_64-pc-windows-gnu
132+
# i686-gnu:
133+
# TARGET: i686-pc-windows-gnu
134+
#
135+
# - job: Windows_arm64
136+
# pool:
137+
# vmImage: windows-2019
138+
# steps:
139+
# - template: ci/azure-install-rust.yml
140+
# - script: rustup target add aarch64-pc-windows-msvc
141+
# displayName: "Install rust cross target"
142+
# - script: cargo test --no-run --target aarch64-pc-windows-msvc
143+
# displayName: "Build for arm64"

ci/azure-install-rust.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
steps:
2+
- bash: |
3+
set -e
4+
toolchain=$TOOLCHAIN
5+
if [ "$toolchain" = "" ]; then
6+
toolchain=stable
7+
fi
8+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $toolchain
9+
echo "##vso[task.prependpath]$HOME/.cargo/bin"
10+
displayName: Install rust (unix)
11+
condition: ne( variables['Agent.OS'], 'Windows_NT' )
12+
13+
- script: |
14+
curl -sSf -o rustup-init.exe https://win.rustup.rs
15+
rustup-init.exe -y --default-toolchain stable-%TARGET%
16+
echo ##vso[task.prependpath]%USERPROFILE%\.cargo\bin
17+
displayName: Install rust (windows)
18+
condition: eq( variables['Agent.OS'], 'Windows_NT' )
19+
20+
- script: |
21+
rustc -Vv
22+
cargo -V
23+
displayName: Query rust and cargo versions

ci/azure-test-all.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
steps:
2+
- checkout: self
3+
submodules: true
4+
- template: azure-install-rust.yml
5+
6+
- bash: cargo build --manifest-path backtrace-sys/Cargo.toml
7+
displayName: "Build backtrace-sys"
8+
- bash: cargo build
9+
displayName: "Build backtrace"
10+
- bash: cargo test
11+
displayName: "Test backtrace"
12+
- bash: cargo test --no-default-features
13+
displayName: "Test backtrace (-default)"
14+
- bash: cargo test --no-default-features --features 'std'
15+
displayName: "Test backtrace (-default + std)"
16+
- bash: cargo test --no-default-features --features 'libunwind std'
17+
displayName: "Test backtrace (-default + libunwind)"
18+
- bash: cargo test --no-default-features --features 'libunwind dladdr std'
19+
displayName: "Test backtrace (-default + libunwind + dladdr)"
20+
- bash: cargo test --no-default-features --features 'libunwind libbacktrace std'
21+
displayName: "Test backtrace (-default + libunwind + libbacktrace)"
22+
- bash: cargo test --no-default-features --features 'unix-backtrace std'
23+
displayName: "Test backtrace (-default + unix-backtrace)"
24+
- bash: cargo test --no-default-features --features 'unix-backtrace dladdr std'
25+
displayName: "Test backtrace (-default + unix-backtrace + dladdr)"
26+
- bash: cargo test --no-default-features --features 'unix-backtrace libbacktrace std'
27+
displayName: "Test backtrace (-default + unix-backtrace + libbacktrace)"
28+
- bash: cargo test --no-default-features --features 'serialize-serde std'
29+
displayName: "Test backtrace (-default + serialize-serde + std)"
30+
- bash: cargo test --no-default-features --features 'serialize-rustc std'
31+
displayName: "Test backtrace (-default + serialize-rustc + std)"
32+
- bash: cargo test --no-default-features --features 'serialize-rustc serialize-serde std'
33+
displayName: "Test backtrace (-default + serialize-rustc + serialize-serde + std)"
34+
- bash: cargo test --no-default-features --features 'cpp_demangle std'
35+
displayName: "Test backtrace (-default + cpp_demangle + std)"
36+
- bash: cargo test --no-default-features --features 'gimli-symbolize std'
37+
displayName: "Test backtrace (-default + gimli-symbolize + std)"
38+
- bash: cargo test --no-default-features --features 'dbghelp std'
39+
displayName: "Test backtrace (-default + dbghelp + std)"
40+
- bash: cd ./cpp_smoke_test && cargo test
41+
displayName: "Test cpp_smoke_test"
File renamed without changes.

cb/src/lib.rs renamed to crates/compiler-builtins-smoke-test/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
#![allow(dead_code)]
66
#![no_std]
77

8-
#[path = "../../src/math/mod.rs"]
8+
#[path = "../../../src/math/mod.rs"]
99
mod libm;
File renamed without changes.

input-generator/src/main.rs renamed to crates/input-generator/src/main.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn f32(rng: &mut XorShiftRng) -> Result<(), Box<Error>> {
4343

4444
let mut f = File::create("bin/input/f32")?;
4545
for i in set {
46-
f.write_all(&i.to_bytes())?;
46+
f.write_all(&i.to_le_bytes())?;
4747
}
4848

4949
Ok(())
@@ -61,8 +61,8 @@ fn f32f32(rng: &mut XorShiftRng) -> Result<(), Box<Error>> {
6161
}
6262

6363
i += 1;
64-
f.write_all(&x0.to_bits().to_bytes())?;
65-
f.write_all(&x1.to_bits().to_bytes())?;
64+
f.write_all(&x0.to_bits().to_le_bytes())?;
65+
f.write_all(&x1.to_bits().to_le_bytes())?;
6666
}
6767

6868
Ok(())
@@ -80,8 +80,8 @@ fn f32i16(rng: &mut XorShiftRng) -> Result<(), Box<Error>> {
8080
}
8181

8282
i += 1;
83-
f.write_all(&x0.to_bits().to_bytes())?;
84-
f.write_all(&x1.to_bytes())?;
83+
f.write_all(&x0.to_bits().to_le_bytes())?;
84+
f.write_all(&x1.to_le_bytes())?;
8585
}
8686

8787
Ok(())
@@ -100,9 +100,9 @@ fn f32f32f32(rng: &mut XorShiftRng) -> Result<(), Box<Error>> {
100100
}
101101

102102
i += 1;
103-
f.write_all(&x0.to_bits().to_bytes())?;
104-
f.write_all(&x1.to_bits().to_bytes())?;
105-
f.write_all(&x2.to_bits().to_bytes())?;
103+
f.write_all(&x0.to_bits().to_le_bytes())?;
104+
f.write_all(&x1.to_bits().to_le_bytes())?;
105+
f.write_all(&x2.to_bits().to_le_bytes())?;
106106
}
107107

108108
Ok(())
@@ -123,7 +123,7 @@ fn f64(rng: &mut XorShiftRng) -> Result<(), Box<Error>> {
123123

124124
let mut f = File::create("bin/input/f64")?;
125125
for i in set {
126-
f.write_all(&i.to_bytes())?;
126+
f.write_all(&i.to_le_bytes())?;
127127
}
128128

129129
Ok(())
@@ -141,8 +141,8 @@ fn f64f64(rng: &mut XorShiftRng) -> Result<(), Box<Error>> {
141141
}
142142

143143
i += 1;
144-
f.write_all(&x0.to_bits().to_bytes())?;
145-
f.write_all(&x1.to_bits().to_bytes())?;
144+
f.write_all(&x0.to_bits().to_le_bytes())?;
145+
f.write_all(&x1.to_bits().to_le_bytes())?;
146146
}
147147

148148
Ok(())
@@ -161,9 +161,9 @@ fn f64f64f64(rng: &mut XorShiftRng) -> Result<(), Box<Error>> {
161161
}
162162

163163
i += 1;
164-
f.write_all(&x0.to_bits().to_bytes())?;
165-
f.write_all(&x1.to_bits().to_bytes())?;
166-
f.write_all(&x2.to_bits().to_bytes())?;
164+
f.write_all(&x0.to_bits().to_le_bytes())?;
165+
f.write_all(&x1.to_bits().to_le_bytes())?;
166+
f.write_all(&x2.to_bits().to_le_bytes())?;
167167
}
168168

169169
Ok(())
@@ -181,8 +181,8 @@ fn f64i16(rng: &mut XorShiftRng) -> Result<(), Box<Error>> {
181181
}
182182

183183
i += 1;
184-
f.write_all(&x0.to_bits().to_bytes())?;
185-
f.write_all(&x1.to_bytes())?;
184+
f.write_all(&x0.to_bits().to_le_bytes())?;
185+
f.write_all(&x1.to_le_bytes())?;
186186
}
187187

188188
Ok(())
File renamed without changes.

0 commit comments

Comments
 (0)