An example of using Bitbucket Pipelines for a Rust project

Bitbucket is the Git solution for professional teams. Bitbucket Pipelines allows you to build, test and deploy from Bitbucket.

Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. If you are new to Rust check out Setting up a Rust project.

The project centers around matching patterns in a noisy signal against a dictionary of known words from an alien languge. To demonstrate the capabilities of Bitbucket Pipelines the project includes the following aspects:

Bitbucket Pipelines is used to

Build the project

cargo build --release

Format the source code

./fmt.sh

Run unit tests

cargo test --lib --release -v --no-fail-fast -- --nocapture --test

Test the project library's documentation

cargo test --doc --release -v --no-fail-fast -- --nocapture --test

Test only the specified integration test target

cargo test --test alienlanguage --release -v --no-fail-fast -- --nocapture --test

Run the benchmarks

cargo test --lib --release -v --no-fail-fast -- --nocapture --bench

Build the project's documentation

cargo doc --release --no-deps

target/doc/alienlanguage/index.html
target/doc/webservice/index.html

Package and upload this project to the registry

Deploy the web service