Merge pull request #1065 from influxdata/cn/here-we-go-round-again
chore: Move regular CI to CircleCIpull/24376/head
commit
f77164c9c3
|
@ -13,7 +13,13 @@
|
||||||
# cargo target and pushes a container with the binary to
|
# cargo target and pushes a container with the binary to
|
||||||
# `quay.io/influxdb/fusion` (see perf_image below).
|
# `quay.io/influxdb/fusion` (see perf_image below).
|
||||||
#
|
#
|
||||||
# CI for all other branches is performed by the GitHub actions (see .github dir)
|
# CI for all other branches:
|
||||||
|
#
|
||||||
|
# - cargo build with the default cargo profile ("dev")
|
||||||
|
# - cargo test
|
||||||
|
# - cargo fmt
|
||||||
|
# - clippy (with warnings denied)
|
||||||
|
# - lint protobufs
|
||||||
|
|
||||||
version: 2.1
|
version: 2.1
|
||||||
|
|
||||||
|
@ -27,36 +33,71 @@ commands:
|
||||||
- run:
|
- run:
|
||||||
name: Install rustfmt and clippy for nightly-2020-11-19
|
name: Install rustfmt and clippy for nightly-2020-11-19
|
||||||
command: rustup component add rustfmt clippy --toolchain nightly-2020-11-19
|
command: rustup component add rustfmt clippy --toolchain nightly-2020-11-19
|
||||||
|
cache_restore:
|
||||||
|
description: Restore Cargo Cache
|
||||||
|
steps:
|
||||||
|
- restore_cache:
|
||||||
|
name: Restoring Cargo Cache
|
||||||
|
keys:
|
||||||
|
- cargo-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Cargo.lock" }}
|
||||||
|
- cargo-cache-{{ arch }}-{{ .Branch }}
|
||||||
|
- cargo-cache
|
||||||
|
cache_save:
|
||||||
|
description: Save Cargo Cache
|
||||||
|
steps:
|
||||||
|
- save_cache:
|
||||||
|
name: Save Cargo Cache
|
||||||
|
paths:
|
||||||
|
- /usr/local/cargo/registry
|
||||||
|
key: cargo-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Cargo.lock" }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
fmt:
|
fmt:
|
||||||
docker:
|
docker:
|
||||||
- image: quay.io/influxdb/rust:ci
|
- image: quay.io/influxdb/rust:ci
|
||||||
|
environment:
|
||||||
|
# Disable full debug symbol generation to speed up CI build
|
||||||
|
# "1" means line tables only, which is useful for panic tracebacks.
|
||||||
|
RUSTFLAGS: "-C debuginfo=1"
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- rust_nightly
|
- rust_nightly
|
||||||
|
- cache_restore
|
||||||
- run:
|
- run:
|
||||||
name: Rust fmt
|
name: Rust fmt
|
||||||
command: cargo fmt --all -- --check
|
command: cargo fmt --all -- --check
|
||||||
|
- cache_save
|
||||||
lint:
|
lint:
|
||||||
docker:
|
docker:
|
||||||
- image: quay.io/influxdb/rust:ci
|
- image: quay.io/influxdb/rust:ci
|
||||||
|
environment:
|
||||||
|
# Disable full debug symbol generation to speed up CI build
|
||||||
|
# "1" means line tables only, which is useful for panic tracebacks.
|
||||||
|
RUSTFLAGS: "-C debuginfo=1"
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- rust_nightly
|
- rust_nightly
|
||||||
|
- cache_restore
|
||||||
- run:
|
- run:
|
||||||
name: Clippy
|
name: Clippy
|
||||||
command: cargo clippy --all-targets --workspace -- -D warnings
|
command: cargo clippy --all-targets --workspace -- -D warnings
|
||||||
|
- cache_save
|
||||||
test:
|
test:
|
||||||
docker:
|
docker:
|
||||||
- image: quay.io/influxdb/rust:ci
|
- image: quay.io/influxdb/rust:ci
|
||||||
resource_class: xlarge # use of a smaller executor tends crashes on link
|
resource_class: xlarge # use of a smaller executor tends crashes on link
|
||||||
|
environment:
|
||||||
|
# Disable full debug symbol generation to speed up CI build
|
||||||
|
# "1" means line tables only, which is useful for panic tracebacks.
|
||||||
|
RUSTFLAGS: "-C debuginfo=1"
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- rust_nightly
|
- rust_nightly
|
||||||
|
- cache_restore
|
||||||
- run:
|
- run:
|
||||||
name: Cargo test
|
name: Cargo test
|
||||||
command: cargo test --workspace
|
command: cargo test --workspace
|
||||||
|
- cache_save
|
||||||
|
|
||||||
# Build a dev binary.
|
# Build a dev binary.
|
||||||
#
|
#
|
||||||
|
@ -65,12 +106,32 @@ jobs:
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: quay.io/influxdb/rust:ci
|
- image: quay.io/influxdb/rust:ci
|
||||||
|
resource_class: xlarge # use of a smaller executor tends crashes on link
|
||||||
|
environment:
|
||||||
|
# Disable full debug symbol generation to speed up CI build
|
||||||
|
# "1" means line tables only, which is useful for panic tracebacks.
|
||||||
|
RUSTFLAGS: "-C debuginfo=1"
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- rust_nightly
|
- rust_nightly
|
||||||
|
- cache_restore
|
||||||
- run:
|
- run:
|
||||||
name: Cargo build
|
name: Cargo build
|
||||||
command: cargo build --workspace
|
command: cargo build --workspace
|
||||||
|
- run:
|
||||||
|
name: Build benches
|
||||||
|
command: cargo test --workspace --benches --no-run
|
||||||
|
- cache_save
|
||||||
|
|
||||||
|
# Lint protobufs.
|
||||||
|
protobuf-lint:
|
||||||
|
docker:
|
||||||
|
- image: bufbuild/buf:0.40.0
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: buf lint
|
||||||
|
command: buf lint
|
||||||
|
|
||||||
# Compile a cargo "release" profile binary for branches that end in `/perf`
|
# Compile a cargo "release" profile binary for branches that end in `/perf`
|
||||||
#
|
#
|
||||||
|
@ -90,9 +151,14 @@ jobs:
|
||||||
perf_image:
|
perf_image:
|
||||||
docker:
|
docker:
|
||||||
- image: quay.io/influxdb/rust:ci
|
- image: quay.io/influxdb/rust:ci
|
||||||
|
environment:
|
||||||
|
# Disable full debug symbol generation to speed up CI build
|
||||||
|
# "1" means line tables only, which is useful for panic tracebacks.
|
||||||
|
RUSTFLAGS: "-C debuginfo=1"
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- rust_nightly
|
- rust_nightly
|
||||||
|
- cache_restore
|
||||||
- run:
|
- run:
|
||||||
name: Cargo release build with target arch set for CRoaring
|
name: Cargo release build with target arch set for CRoaring
|
||||||
command: ROARING_ARCH=x86-64 cargo build --release
|
command: ROARING_ARCH=x86-64 cargo build --release
|
||||||
|
@ -111,6 +177,7 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: Deploy tags
|
name: Deploy tags
|
||||||
command: ./.circleci/get-deploy-tags.sh "${BRANCH}"
|
command: ./.circleci/get-deploy-tags.sh "${BRANCH}"
|
||||||
|
- cache_save
|
||||||
|
|
||||||
# Prepare the CI image used for other tasks.
|
# Prepare the CI image used for other tasks.
|
||||||
#
|
#
|
||||||
|
@ -135,7 +202,16 @@ jobs:
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
# Internal pipeline for perf builds.
|
# CI for all pull requests.
|
||||||
|
ci:
|
||||||
|
jobs:
|
||||||
|
- fmt
|
||||||
|
- lint
|
||||||
|
- protobuf-lint
|
||||||
|
- test
|
||||||
|
- build
|
||||||
|
|
||||||
|
# Internal pipeline for perf builds.
|
||||||
#
|
#
|
||||||
# Filter ensures this only runs for git branches ending in `/perf`.
|
# Filter ensures this only runs for git branches ending in `/perf`.
|
||||||
perf_build:
|
perf_build:
|
||||||
|
|
Loading…
Reference in New Issue