blob: 6ced047fdb1b9aea893468f9d4af1f44fa679788 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# Configuration for CirrusCI. This is primarily used for
# FreeBSD and macOS M1 tests and builds.
setup_template: &SETUP_TEMPLATE
setup_script:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
- sh rustup.sh --default-toolchain stable -y
cache_template: &CACHE_TEMPLATE
registry_cache:
folder: $HOME/.cargo/registry
reupload_on_changes: true
fingerprint_script:
- md5 Cargo.lock
- echo $CIRRUS_OS
- echo $CIRRUS_TASK_NAME
target_cache:
folder: target
reupload_on_changes: true
fingerprint_script:
- . $HOME/.cargo/env && rustc --version
- md5 Cargo.lock
- echo $CIRRUS_OS
- echo $CIRRUS_TASK_NAME
cleanup_template: &CLEANUP_TEMPLATE
before_cache_script:
- rm -rf $HOME/.cargo/registry/index
- rm -rf $HOME/.cargo/registry/src
- rm -f ./target/.rustc_info.json
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
test_task:
only_if: $CIRRUS_CRON == "" && ($CIRRUS_BRANCH == "master" || $CIRRUS_PR != "")
matrix:
- name: "FreeBSD 13 Test"
freebsd_instance:
image_family: freebsd-13-1
- name: "macOS M1 Test"
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
<<: *SETUP_TEMPLATE
<<: *CACHE_TEMPLATE
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
test_no_feature_script:
- . $HOME/.cargo/env
- cargo fmt --all -- --check
- cargo test --no-run --locked --no-default-features
- cargo test --no-fail-fast --no-default-features -- --nocapture --quiet
- cargo clippy --all-targets --workspace --no-default-features -- -D warnings
<<: *CLEANUP_TEMPLATE
build_task:
only_if: $CIRRUS_RELEASE != "" || $CIRRUS_CRON == "nightly" || $CIRRUS_API_CREATED == true || $CIRRUS_BRANCH == "master"
env:
BTM_GENERATE: true
COMPLETION_DIR: "target/tmp/bottom/completion/"
MANPAGE_DIR: "target/tmp/bottom/manpage/"
matrix:
- name: "FreeBSD 13 Build"
alias: "freebsd_build"
freebsd_instance:
image_family: freebsd-13-1
env:
TARGET: "x86_64-unknown-freebsd"
- name: "macOS M1 Build"
alias: "macos_build"
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
env:
TARGET: "aarch64-apple-darwin"
<<: *SETUP_TEMPLATE
<<: *CACHE_TEMPLATE
build_script:
- . $HOME/.cargo/env
- cargo build --release --verbose --locked --features deploy
- mv ./target/release/btm ./
- mv "$COMPLETION_DIR" completion
- mv "$MANPAGE_DIR" manpage
- tar -czvf bottom_$TARGET.tar.gz btm completion
binaries_artifacts:
path: bottom_$TARGET.tar.gz
<<: *CLEANUP_TEMPLATE
|