File: .gitlab-ci.yml

package info (click to toggle)
rust-rfc822-sanitizer 0.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 264 kB
  • sloc: makefile: 4
file content (88 lines) | stat: -rw-r--r-- 2,971 bytes parent folder | download
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
# before_script:
# - apt-get update -yqq
# - apt-get install -yqq --no-install-recommends build-essential


test:stable:
  # Stable img
  # https://hub.docker.com/_/rust/
  image: "rust"
  script:
  - rustc --version && cargo --version      # Print version info for debugging
  - cargo build --all --release
  - cargo test --all --release --verbose
  # - cargo test --all --verbose --jobs 1

test:nightly:
  # Nightly
  # https://hub.docker.com/r/rustlang/rust/
  image: "rustlang/rust:nightly"
  script:
  - rustc --version && cargo --version      # Print version info for debugging
  - cargo build --all --release
  - cargo test --all --release --verbose
  - cargo bench

musl:stable:
  # Stable img
  # https://hub.docker.com/r/ekidd/rust-musl-builder/
  image: "ekidd/rust-musl-builder"
  script:
  - rustc --version && cargo --version      # Print version info for debugging
  - cargo build --all --release
  - cargo test --all --release --verbose
  # - cargo test --all --verbose --jobs 1

musl:nightly:
  # Nightly
  # https://hub.docker.com/r/ekidd/rust-musl-builder/
  image: "ekidd/rust-musl-builder:nightly"
  script:
  - rustc --version && cargo --version      # Print version info for debugging
  - cargo build --all --release
  - cargo test --all --release --verbose
  - cargo bench

# Configure and run rustfmt on nightly
# Exits and builds fails if on bad format
rustfmt:
  image: "rustlang/rust:nightly"
  before_script:
  - export PATH="$PATH:$HOME/.cargo/bin"
  - which rustfmt || cargo install rustfmt-nightly
  script:
  - rustc --version && cargo --version
  - cargo fmt --all -- --write-mode=diff
  allow_failure: true

# Configure and run clippy on nightly
# Only fails on errors atm.
clippy:
  image: "rustlang/rust:nightly"
  before_script:
  - export PATH="$PATH:$HOME/.cargo/bin"
  - which rustfmt || cargo install clippy
  script:
  - rustc --version && cargo --version
  - cargo clippy --all
  allow_failure: true

kcov:
  # Stable img
  # https://hub.docker.com/_/rust/
  variables:
    RUSTFLAGS: "-C link-dead-code"
  image: "rust"
  before_script:
  # kcov
  - apt-get update -yqq
  - apt-get install -yqq libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev libiberty-dev
  script:
  - rustc --version && cargo --version      # Print version info for debugging
  - cargo build --all
  - cargo test --all --verbose
  # - cargo test --all --verbose --jobs 1
  allow_failure: true
  after_script:
  - wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && tar xzf master.tar.gz && cd kcov-master && mkdir build && cd build && cmake .. && make && make install DESTDIR=../../kcov-build && cd ../.. && rm -rf kcov-master && for file in target/debug/rfc822_sanitizer-*[^\.d]; do mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && bash <(curl -s https://codecov.io/bash) && echo "Uploaded code coverage"