File: rust.yml

package info (click to toggle)
rust-humantime 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 280 kB
  • sloc: makefile: 2
file content (104 lines) | stat: -rw-r--r-- 2,746 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Rust

on:
  push:
    branches: ['main']
    tags: ['**']
  pull_request:

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: '-D warnings'

jobs:
  test:
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo test --lib --no-default-features
      - run: cargo test --all-features

# TODO: no_std
#  build-nostd:
#    name: Build on no_std target (thumbv7em-none-eabi)
#    runs-on: ubuntu-latest
#    steps:
#      - uses: actions/checkout@v3
#      - uses: dtolnay/rust-toolchain@master
#        with:
#          toolchain: stable
#          targets: thumbv7em-none-eabi
#      - run: cargo build --target thumbv7em-none-eabi --lib --release --no-default-features

  nightly:
    name: Test nightly compiler
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: dtolnay/rust-toolchain@nightly
    - run: cargo test --all-features

  clippy:
    name: Check that clippy is happy
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: dtolnay/rust-toolchain@stable
      with:
        components: clippy
    - run: cargo clippy --all-features --all-targets

  rustfmt:
    name: Check formatting
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: dtolnay/rust-toolchain@stable
      with:
        components: rustfmt
    - run: cargo fmt -- --check

  msrv:
    name: Current MSRV is 1.60.0
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    # First run `cargo +nightly -Z minimal-verisons check` in order to get a
    # Cargo.lock with the oldest possible deps
    # - uses: dtolnay/rust-toolchain@nightly
    # - run: cargo -Z minimal-versions check --all-features --lib
    # Now check that `cargo build` works with respect to the oldest possible
    # deps and the stated MSRV
    - uses: dtolnay/rust-toolchain@1.60.0
    - run: cargo build --all-features --lib

  semver:
    name: Check semver compatibility
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4
        with:
          persist-credentials: false
      - name: Check semver
        uses: obi1kenobi/cargo-semver-checks-action@v2

  audit:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: EmbarkStudios/cargo-deny-action@v2

#  TODO: broken - migrate to criterion
#  bench:
#    name: Check that benchmarks compile
#    runs-on: ubuntu-latest
#    steps:
#    - uses: actions/checkout@v3
#    - uses: dtolnay/rust-toolchain@nightly
#    - name: Build default (host native) bench
#      run: cargo build --benches