2022-10-27 10:27:04 +00:00
|
|
|
%YAML 1.1
|
|
|
|
---
|
2022-10-29 09:37:45 +00:00
|
|
|
# Configuration for CirrusCI. This is primarily used for testing and building FreeBSD and macOS M1, since other
|
|
|
|
# CI platforms don't seem to support these platforms as of writing.
|
2022-10-28 02:00:37 +00:00
|
|
|
#
|
2023-04-11 08:57:29 +00:00
|
|
|
# Note that we set the YAML directive above to prevent some linting errors around the
|
2022-10-28 02:00:37 +00:00
|
|
|
# templates.
|
2022-10-20 05:27:14 +00:00
|
|
|
|
2022-10-21 14:47:55 +00:00
|
|
|
setup_template: &SETUP_TEMPLATE
|
2022-10-20 05:27:14 +00:00
|
|
|
setup_script:
|
2022-10-20 10:24:04 +00:00
|
|
|
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
|
2022-10-20 05:27:14 +00:00
|
|
|
- sh rustup.sh --default-toolchain stable -y
|
2022-10-21 14:47:55 +00:00
|
|
|
|
|
|
|
cache_template: &CACHE_TEMPLATE
|
2022-10-20 05:27:14 +00:00
|
|
|
registry_cache:
|
2022-10-20 07:19:29 +00:00
|
|
|
folder: $HOME/.cargo/registry
|
|
|
|
reupload_on_changes: true
|
2022-10-21 14:47:55 +00:00
|
|
|
fingerprint_script:
|
|
|
|
- md5 Cargo.lock
|
|
|
|
- echo $CIRRUS_OS
|
|
|
|
- echo $CIRRUS_TASK_NAME
|
2022-10-20 05:27:14 +00:00
|
|
|
target_cache:
|
|
|
|
folder: target
|
2022-10-20 07:19:29 +00:00
|
|
|
reupload_on_changes: true
|
2022-10-20 05:27:14 +00:00
|
|
|
fingerprint_script:
|
|
|
|
- . $HOME/.cargo/env && rustc --version
|
2022-10-20 07:19:29 +00:00
|
|
|
- md5 Cargo.lock
|
2022-10-21 14:47:55 +00:00
|
|
|
- echo $CIRRUS_OS
|
|
|
|
- echo $CIRRUS_TASK_NAME
|
|
|
|
|
|
|
|
cleanup_template: &CLEANUP_TEMPLATE
|
2022-10-20 07:19:29 +00:00
|
|
|
before_cache_script:
|
|
|
|
- rm -rf $HOME/.cargo/registry/index
|
2022-10-26 08:58:51 +00:00
|
|
|
- rm -rf $HOME/.cargo/registry/src
|
2022-10-20 07:19:29 +00:00
|
|
|
- rm -f ./target/.rustc_info.json
|
2022-10-20 05:27:14 +00:00
|
|
|
|
2022-10-21 14:47:55 +00:00
|
|
|
env:
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
CARGO_PROFILE_DEV_DEBUG: 0
|
|
|
|
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
|
|
|
|
|
|
|
|
test_task:
|
2022-10-27 10:27:04 +00:00
|
|
|
auto_cancellation: false
|
|
|
|
only_if: $CIRRUS_BUILD_SOURCE != "api" && ($CIRRUS_BRANCH == "master" || $CIRRUS_PR != "")
|
2022-10-29 09:37:45 +00:00
|
|
|
skip: "!changesInclude('.cargo/**', '.cirrus.yml', 'sample_configs/**', 'src/**', 'tests/**', 'build.rs', 'Cargo.lock', 'Cargo.toml', 'clippy.toml', 'rustfmt.toml')"
|
2022-10-21 14:47:55 +00:00
|
|
|
matrix:
|
|
|
|
- name: "FreeBSD 13 Test"
|
|
|
|
freebsd_instance:
|
|
|
|
image_family: freebsd-13-1
|
2022-12-03 01:12:49 +00:00
|
|
|
- name: "FreeBSD 12 Test"
|
|
|
|
freebsd_instance:
|
|
|
|
image_family: freebsd-12-3
|
2022-10-21 14:47:55 +00:00
|
|
|
- name: "macOS M1 Test"
|
|
|
|
macos_instance:
|
|
|
|
image: ghcr.io/cirruslabs/macos-monterey-base:latest
|
|
|
|
<<: *SETUP_TEMPLATE
|
|
|
|
<<: *CACHE_TEMPLATE
|
2022-10-20 10:41:20 +00:00
|
|
|
test_no_feature_script:
|
2022-10-20 07:19:29 +00:00
|
|
|
- . $HOME/.cargo/env
|
2022-10-20 05:27:14 +00:00
|
|
|
- cargo fmt --all -- --check
|
2022-10-20 10:41:20 +00:00
|
|
|
- cargo test --no-run --locked --no-default-features
|
2022-10-21 14:47:55 +00:00
|
|
|
- cargo test --no-fail-fast --no-default-features -- --nocapture --quiet
|
2022-10-20 10:41:20 +00:00
|
|
|
- cargo clippy --all-targets --workspace --no-default-features -- -D warnings
|
2023-03-07 05:18:42 +00:00
|
|
|
test_all_feature_script:
|
|
|
|
- . $HOME/.cargo/env
|
|
|
|
- cargo fmt --all -- --check
|
|
|
|
- cargo test --no-run --locked --all-features
|
|
|
|
- cargo test --no-fail-fast --all-features -- --nocapture --quiet
|
|
|
|
- cargo clippy --all-targets --workspace --all-features -- -D warnings
|
2022-10-21 14:47:55 +00:00
|
|
|
<<: *CLEANUP_TEMPLATE
|
|
|
|
|
|
|
|
build_task:
|
2022-10-27 10:27:04 +00:00
|
|
|
auto_cancellation: false
|
|
|
|
only_if: $CIRRUS_BUILD_SOURCE == "api"
|
2022-10-21 14:47:55 +00:00
|
|
|
env:
|
|
|
|
BTM_GENERATE: true
|
|
|
|
COMPLETION_DIR: "target/tmp/bottom/completion/"
|
|
|
|
MANPAGE_DIR: "target/tmp/bottom/manpage/"
|
2023-01-02 20:18:05 +00:00
|
|
|
# -PLACEHOLDER FOR CI-
|
2022-10-21 14:47:55 +00:00
|
|
|
matrix:
|
|
|
|
- name: "FreeBSD 13 Build"
|
2022-12-03 01:12:49 +00:00
|
|
|
alias: "freebsd_13_1_build"
|
2022-10-21 14:47:55 +00:00
|
|
|
freebsd_instance:
|
|
|
|
image_family: freebsd-13-1
|
|
|
|
env:
|
|
|
|
TARGET: "x86_64-unknown-freebsd"
|
2022-12-03 02:57:41 +00:00
|
|
|
NAME: "x86_64-unknown-freebsd-13-1"
|
2022-12-03 01:12:49 +00:00
|
|
|
- name: "FreeBSD 12 Build"
|
|
|
|
alias: "freebsd_12_3_build"
|
|
|
|
freebsd_instance:
|
|
|
|
image_family: freebsd-12-3
|
|
|
|
env:
|
|
|
|
TARGET: "x86_64-unknown-freebsd"
|
2022-12-03 02:57:41 +00:00
|
|
|
NAME: "x86_64-unknown-freebsd-12-3"
|
2022-10-21 14:47:55 +00:00
|
|
|
- name: "macOS M1 Build"
|
2022-10-26 08:58:51 +00:00
|
|
|
alias: "macos_build"
|
2022-10-21 14:47:55 +00:00
|
|
|
macos_instance:
|
|
|
|
image: ghcr.io/cirruslabs/macos-monterey-base:latest
|
|
|
|
env:
|
|
|
|
TARGET: "aarch64-apple-darwin"
|
2022-12-03 02:57:41 +00:00
|
|
|
NAME: "aarch64-apple-darwin"
|
2022-10-21 14:47:55 +00:00
|
|
|
<<: *SETUP_TEMPLATE
|
|
|
|
<<: *CACHE_TEMPLATE
|
|
|
|
build_script:
|
|
|
|
- . $HOME/.cargo/env
|
|
|
|
- cargo build --release --verbose --locked --features deploy
|
|
|
|
- mv ./target/release/btm ./
|
2023-01-02 20:18:05 +00:00
|
|
|
- ./btm -V
|
2022-10-21 14:47:55 +00:00
|
|
|
- mv "$COMPLETION_DIR" completion
|
|
|
|
- mv "$MANPAGE_DIR" manpage
|
2022-12-03 02:57:41 +00:00
|
|
|
- tar -czvf bottom_$NAME.tar.gz btm completion
|
2022-10-21 14:47:55 +00:00
|
|
|
binaries_artifacts:
|
2022-12-03 02:57:41 +00:00
|
|
|
path: bottom_$NAME.tar.gz
|
2022-10-21 14:47:55 +00:00
|
|
|
<<: *CLEANUP_TEMPLATE
|