Skip to content

Commit

Permalink
Add buildkite pipelines
Browse files Browse the repository at this point in the history
At the moment, we're using Travis for vm-memory tests and buildkite
for other crates.

This change adds two buildkite pipelines: one for Windows, covering
x86_64 MSVC builds and one for Linux, covering x86 and arm using
the gnu standard C library as well as musl.

We're using the same workflow as the other CIs, going with the
Docker buildkite plugin and pointing to docker images that provide
Rust build tools.

Later on, those pipeline definitions can be moved to a common CI
repository, being split in multiple pipelines (e.g. based on
platform, standard library, etc) or even dynamically generated.

Note that on Windows, we're enabling automatic retries (3 attempts
by default) in order to avoid false positivies. Docker for Windows
is not as stable as it should right now.
  • Loading branch information
petrutlucian94 committed May 30, 2019
1 parent 8d0147d commit ff396db
Show file tree
Hide file tree
Showing 2 changed files with 234 additions and 0 deletions.
155 changes: 155 additions & 0 deletions .buildkite/pipeline.linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
steps:
- label: "build-gnu-x86"
commands:
- cargo build --release
retry:
automatic: false
agents:
platform: x86_64.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "build-gnu-x86-mmap"
commands:
- cargo build --release --features=backend-mmap
retry:
automatic: false
agents:
platform: x86_64.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "build-gnu-arm-mmap"
commands:
- cargo build --release --features=backend-mmap
retry:
automatic: false
agents:
platform: arm.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "build-musl-arm-mmap"
commands:
- cargo build --release --features=backend-mmap --target aarch64-unknown-linux-musl
retry:
automatic: false
agents:
platform: arm.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "style"
command: cargo fmt --all -- --check
retry:
automatic: false
agents:
platform: x86_64.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "unittests-gnu-x86"
commands:
- cargo test --all-features
retry:
automatic: false
agents:
platform: x86_64.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "unittests-musl-x86"
commands:
- cargo test --all-features --target x86_64-unknown-linux-musl
retry:
automatic: false
agents:
platform: x86_64.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "unittests-gnu-arm"
commands:
- cargo test --all-features
retry:
automatic: false
agents:
platform: arm.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "unittests-musl-arm"
commands:
- cargo test --all-features --target aarch64-unknown-linux-musl
retry:
automatic: false
agents:
platform: arm.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "clippy-x86"
commands:
- cargo clippy --all
retry:
automatic: false
agents:
platform: x86_64.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "check-warnings-x86"
commands:
- RUSTFLAGS="-D warnings" cargo check --all-targets
retry:
automatic: false
agents:
platform: x86_64.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true

- label: "check-warnings-arm"
commands:
- RUSTFLAGS="-D warnings" cargo check --all-targets
retry:
automatic: false
agents:
platform: arm.metal
os: linux
plugins:
- docker#v3.0.1:
image: "fandree/rust-vmm-dev"
always-pull: true
79 changes: 79 additions & 0 deletions .buildkite/pipeline.windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
steps:
- label: "build-msvc-x86"
commands:
- cargo build --release
retry:
automatic: true
agents:
platform: x86_64
os: windows
plugins:
- petrutlucian94/docker#v3.1.1:
image: "lpetrut/rust_win_buildtools"
always-pull: true

- label: "build-msvc-x86-mmap"
commands:
- cargo build --release --features=backend-mmap
retry:
automatic: true
agents:
platform: x86_64
os: windows
plugins:
- petrutlucian94/docker#v3.1.1:
image: "lpetrut/rust_win_buildtools"
always-pull: true

- label: "style"
command: cargo fmt --all -- --check
retry:
automatic: true
agents:
platform: x86_64
os: windows
plugins:
- petrutlucian94/docker#v3.1.1:
image: "lpetrut/rust_win_buildtools"
always-pull: true

- label: "unittests-msvc-x86"
commands:
- cargo test --all-features
retry:
automatic: true
agents:
platform: x86_64
os: windows
plugins:
- petrutlucian94/docker#v3.1.1:
image: "lpetrut/rust_win_buildtools"
always-pull: true

- label: "clippy-x86"
commands:
- cargo clippy --all
retry:
automatic: true
agents:
platform: x86_64
os: windows
plugins:
- petrutlucian94/docker#v3.1.1:
image: "lpetrut/rust_win_buildtools"
always-pull: true

- label: "check-warnings-x86"
commands:
- cargo check --all-targets
retry:
automatic: true
agents:
platform: x86_64
os: windows
plugins:
- petrutlucian94/docker#v3.1.1:
image: "lpetrut/rust_win_buildtools"
always-pull: true
environment:
- "RUSTFLAGS=-D warnings"

0 comments on commit ff396db

Please sign in to comment.