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