CI for Rust
Build, lint, and test a Rust application using Cargo and Clippy.
Use template →1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
steps: - label: ":rust: Lint" key: lint commands: - "rustup component add clippy" - "cargo clippy" plugins: - docker#v5.9.0: image: "rust:1.74.1" - label: ":rust: Test" key: test command: "cargo test" plugins: - docker#v5.9.0: image: "rust:1.74.1" - label: ":rust: Build" command: "cargo build --release" depends_on: ["lint", "test"] plugins: - docker#v5.9.0: image: "rust:1.74.1" artifact_paths: - "target/release/*"
- Languages
- Rust
- Use cases
- Continuous integration, Web application
- Platforms
- Docker
CI for Rust
This template gives you a continuous integration (CI) pipeline that builds, lints, and tests a Rust application.
At a glance:
How it works
This template:
- Lints the Rust code with Clippy.
- Runs tests with Cargo.
- Compiles and uploads a Rust binary as a build artifact.
Next steps
After you select Use template, you’ll:
- Connect the Git repository with your Rust application.
- Modify the commands if necessary.
- Configure the compute—run locally, on-premises, or in the cloud.
- Run the pipeline.
You can then play around with the pipeline settings. For example, run the pipeline locally while you iterate on the definition or set a schedule to trigger a nightly build.
If you need help, please check our documentation, raise an issue , or reach out to support.