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
|
2024-01-28 11:09:06 +00:00
|
|
|
# CI platforms don't seem to support these platforms as of writing (GH may support M1 soon though).
|
2022-10-28 02:00:37 +00:00
|
|
|
#
|
2024-01-28 11:09:06 +00:00
|
|
|
# Note that we set the YAML directive above to prevent some linting errors around the 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
|
2024-01-28 10:23:17 +00:00
|
|
|
reupload_on_changes: "true"
|
2022-10-21 14:47:55 +00:00
|
|
|
fingerprint_script:
|
2024-01-28 23:11:05 +00:00
|
|
|
- $HOME/.cargo/bin/rustc --version
|
|
|
|
- cat Cargo.lock
|
2022-10-21 14:47:55 +00:00
|
|
|
- echo $CIRRUS_OS
|
|
|
|
- echo $CIRRUS_TASK_NAME
|
2022-10-20 05:27:14 +00:00
|
|
|
target_cache:
|
|
|
|
folder: target
|
2024-01-28 10:23:17 +00:00
|
|
|
reupload_on_changes: "true"
|
2022-10-20 05:27:14 +00:00
|
|
|
fingerprint_script:
|
2024-01-28 23:11:05 +00:00
|
|
|
- $HOME/.cargo/bin/rustc --version
|
|
|
|
- cat 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:
|
2024-01-28 10:23:17 +00:00
|
|
|
CARGO_INCREMENTAL: "0"
|
|
|
|
CARGO_PROFILE_DEV_DEBUG: "0"
|
|
|
|
CARGO_HUSKY_DONT_INSTALL_HOOKS: "true"
|
2022-10-21 14:47:55 +00:00
|
|
|
|
|
|
|
test_task:
|
2024-01-28 23:11:05 +00:00
|
|
|
auto_cancellation: "false" # We set this to false to prevent nightly builds from affecting this
|
2023-12-06 05:16:26 +00:00
|
|
|
only_if: $CIRRUS_BUILD_SOURCE != "api" && ($CIRRUS_BRANCH == "main" || $CIRRUS_PR != "")
|
2024-01-28 10:23:17 +00:00
|
|
|
timeout_in: "20m"
|
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:
|
2024-01-28 11:09:06 +00:00
|
|
|
- name: "FreeBSD 14 Test"
|
2022-10-21 14:47:55 +00:00
|
|
|
freebsd_instance:
|
2024-01-28 11:09:06 +00:00
|
|
|
image_family: freebsd-14-0
|
|
|
|
- name: "FreeBSD 13 Test"
|
2022-12-03 01:12:49 +00:00
|
|
|
freebsd_instance:
|
2024-01-28 11:09:06 +00:00
|
|
|
image_family: freebsd-13-2
|
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:
|
2024-01-28 10:23:17 +00:00
|
|
|
auto_cancellation: "false"
|
2022-10-27 10:27:04 +00:00
|
|
|
only_if: $CIRRUS_BUILD_SOURCE == "api"
|
2024-01-28 10:23:17 +00:00
|
|
|
timeout_in: "30m"
|
2022-10-21 14:47:55 +00:00
|
|
|
env:
|
2024-01-28 10:23:17 +00:00
|
|
|
BTM_GENERATE: "true"
|
2022-10-21 14:47:55 +00:00
|
|
|
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:
|
2024-01-28 11:09:06 +00:00
|
|
|
- name: "FreeBSD 14 Build"
|
|
|
|
alias: "freebsd_14_0_build"
|
2022-10-21 14:47:55 +00:00
|
|
|
freebsd_instance:
|
2024-01-28 11:09:06 +00:00
|
|
|
image_family: freebsd-14-0
|
2022-10-21 14:47:55 +00:00
|
|
|
env:
|
|
|
|
TARGET: "x86_64-unknown-freebsd"
|
2024-01-28 11:09:06 +00:00
|
|
|
NAME: "x86_64-unknown-freebsd-14-0"
|
|
|
|
- name: "FreeBSD 13 Build"
|
|
|
|
alias: "freebsd_13_2_build"
|
2022-12-03 01:12:49 +00:00
|
|
|
freebsd_instance:
|
2024-01-28 11:09:06 +00:00
|
|
|
image_family: freebsd-13-2
|
2022-12-03 01:12:49 +00:00
|
|
|
env:
|
|
|
|
TARGET: "x86_64-unknown-freebsd"
|
2024-01-28 11:09:06 +00:00
|
|
|
NAME: "x86_64-unknown-freebsd-13-2"
|
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"
|
2024-01-28 23:11:05 +00:00
|
|
|
- name: "Legacy Linux (2.17)"
|
|
|
|
alias: "linux_2_17_build"
|
|
|
|
container:
|
|
|
|
image: quay.io/pypa/manylinux2014_x86_64
|
|
|
|
env:
|
|
|
|
TARGET: "x86_64-unknown-linux-gnu"
|
|
|
|
NAME: "x86_64-unknown-linux-gnu-2-17"
|
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
|