-
Notifications
You must be signed in to change notification settings - Fork 28
/
.gitlab-ci.yml
79 lines (65 loc) · 2.11 KB
/
.gitlab-ci.yml
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
image: "rust:latest"
stages:
- build_clean
- test_fmt
- code_checks
- test_clippy
- test_cargo
- build_cargo
- test_cargo_deny
- test_functional
- test_sighash
variables:
RUST_LOG: debug
RUST_BACKTRACE: full
ML_CONTAINERIZED_TESTS: 1
# Create a random path to avoid collisions
GIT_CLONE_PATH: $CI_BUILDS_DIR/$CI_PIPELINE_ID/mintlayer-core
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
before_script:
- apt-get update -yqq
- apt-get install -yqq --no-install-recommends build-essential python3 python3-toml podman
build:clean:
stage: build_clean
script:
- rm -rf target
test:fmt:
stage: test_fmt
script:
- rustup component add rustfmt
- cargo fmt --all -- --check
test:code_checks:
stage: code_checks
script:
- ./build-tools/codecheck/codecheck.py
test:clippy:
stage: test_clippy
script:
- rustup component add clippy
- cargo clippy --all-features --workspace --all-targets -- -D warnings -A clippy::unnecessary_literal_unwrap -A clippy::new_without_default -W clippy::implicit_saturating_sub -W clippy::implicit_clone -W clippy::map_unwrap_or -W clippy::unnested_or_patterns -W clippy::manual_assert -W clippy::unused_async -W clippy::mut_mut -W clippy::todo
- cargo clippy --all-features --workspace --lib --bins --examples -- -A clippy::all -D clippy::float_arithmetic -W clippy::unwrap_used -W clippy::dbg_macro -W clippy::items_after_statements -W clippy::fallible_impl_from -W clippy::string_slice
test:cargo:
stage: test_cargo
script:
- rustc --version && cargo --version
- cargo test --release --all --workspace --verbose
build:cargo:
stage: build_cargo
script:
- cargo build --release --all --locked
test:cargo_deny:
stage: test_cargo_deny
script:
- cargo install cargo-deny --locked
- cargo deny check advisories licenses
test:func:
stage: test_functional
script:
- cargo test --release -p mintlayer-test --test functional -- --ignored
test:sighash:
stage: test_sighash
script:
- cargo test --release -p common mixed_sighash_types -- --ignored