• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:std

7 #      http://www.apache.org/licenses/LICENSE-2.0
16 # specific components of the beto-rust repo. To load these into your environment
17 # run `source ./scripts/build-script.sh` Then run the functions from root
18 # This can also be sourced to help when writing further build scripts
20 export SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
24 set -e
25-c "Google LLC" -l apache -ignore=**/android/build/** -ignore=target/** -ignore=**/target/** -igno…
30 set -e
32 cargo deny --workspace check
35 # Checks everything in beto-rust
37 set -e
48 set -e
51 cargo fmt --check
53 cargo check --workspace --all-targets
55 cargo test --workspace --quiet
56 # ensure the docs are valid (cross-references to other code, etc)
57 cargo doc --workspace --no-deps
58 cargo clippy --all-targets
59 cargo deny --workspace check
60 # Check the build for targets without using RustCrypto dependencies
61 cargo check --features=openssl --no-default-features
66 set -e
70 if [ ! -x "$ADDLICENSE" ]; then
76 if ($ADDLICENSE -h >/dev/null 2>&1); then
83 if $ADDLICENSE -check \
84 -ignore="**/android/build/**" \
85 -ignore="target/**" \
86 -ignore="**/target/**" \
87 -ignore="**/.idea/**" \
88 -ignore="**/cmake-build/**" \
89 -ignore="**/java/build/**" \
90 -ignore="**/java/*/build/**" \
99 # Build all fuzz targets
101 set -e
105 (cd "$fuzzed_crate" && cargo +nightly fuzz build)
109 rm -Rf presence/ldt_np_adv_ffi_fuzz/cmake-build
110 …(cd presence/ldt_np_adv_ffi_fuzz && mkdir -p cmake-build && cd cmake-build && cmake ../.. -DENABLE…
111 rm -Rf presence/ldt_np_adv_ffi_fuzz/cmake-build
116 set -e
120 cargo fmt --check
122 # Default build, RustCrypto + no_std
123 cargo build --release
124 # Turn on std, still using RustCrypto
125 cargo build --features=std
126 # Turn off default features and try to build with std
127 cargo build --no-default-features --features=std
129 cargo build --no-default-features --features=openssl
131 cargo build --no-default-features --features=boringssl
132 cargo doc --no-deps
133 cargo clippy --release
134 cargo clippy --features=std
135 cargo clippy --no-default-features --features=openssl
136 cargo clippy --no-default-features --features=boringssl
137 cargo clippy --no-default-features --features=std
141 # build C/C++ samples, tests, and benches
142 mkdir -p cmake-build && cd cmake-build
143 cmake .. -DENABLE_TESTS=true
146 # test with default build settings (rustcrypto, no_std)
148 (cd ../ldt_np_adv_ffi && cargo build --release)
151 # test with std
152 echo "Testing std feature flag"
153 (cd ../ldt_np_adv_ffi && cargo build --features std --release)
158 (cd ../ldt_np_adv_ffi && cargo build --no-default-features --features boringssl --release)
163 (cd ../ldt_np_adv_ffi && cargo build --no-default-features --features openssl --release)
166 # test with std feature flag
167 echo "Testing std with no default features"
168 (cd ../ldt_np_adv_ffi && cargo build --no-default-features --features std --release)
176 set -e
179 mkdir -p boringssl-build && cd boringssl-build
181 if ! git -C boringssl pull origin master; then
184 cd boringssl && mkdir -p build && cd build
185 target=$(rustc -vV | awk '/host/ { print $2 }')
186 cmake -G Ninja .. -DRUST_BINDINGS="$target" && ninja
187 # A valid Rust crate is built under `boringssl-build/boringssl/build/rust/bssl-sys`
189 cd $projectroot/boringssl-build
190 rm -Rf rust-openssl
191 git clone https://github.com/sfackler/rust-openssl.git
192 git -C rust-openssl checkout 11797d9ecb73e94b7f55a49274318abc9dc074d2
193 git -C rust-openssl branch -f BASE_COMMIT
194 git -C rust-openssl am $projectroot/nearby/scripts/openssl-patches/*.patch
200 Preparation complete. The required repositories are downloaded to `beto-rust/boringssl-build`. If
203 You can now build and test with boringssl using the following command
204 `cargo --config .cargo/config-boringssl.toml test -p crypto_provider* --features=boringssl,std`
210 # Checks the build and tests for all boringssl related deps
215 set -e
221 cargo --config .cargo/config-boringssl.toml test -p crypto_provider_openssl --features=boringssl
226 cargo fmt --check
227 cargo clippy --all-targets
229 cargo doc --no-deps
233 # Helper for setting up dependencies on the build machine
235 set -e
237 curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain 1.68.0
238 cargo install --locked cargo-deny --color never 2>&1
241 brew install rapidjson google-benchmark ninja bindgen
244 # it is in fact there by default on the build machines