Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): add a cargo timing buildspec #5176

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bindings/rust/extended/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ exclude = [
"bench"
]

resolver = "2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?


[profile.release]
lto = true
codegen-units = 1
Expand Down
36 changes: 36 additions & 0 deletions codebuild/spec/buildspec_timing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
version: 0.2
env:
shell: bash
variables:
# This assumes you have a Rust toolchain installed
CARGO: "cargo +nightly"
OPENSSL_DIR: "/usr/local/openssl-3.0"
RUST_TOOLCHAIN: "1.63.0-x86_64-unknown-linux-gnu"
phases:
install:
commands:
- echo "Installing Rust ..."
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- . $HOME/.cargo/env
- rustup toolchain install $RUST_TOOLCHAIN
pre_build:
commands:
- |
cd bindings/rust/extended
./generate.sh
cargo clean
build:
commands:
- cargo build --timings
post_build:
commands:
- cargo test --timings

artifacts:
# upload timing reports
files:
- "**/*"
base-directory: bindings/rust/extended/target/cargo-timings
Loading