Skip to content

Commit fcda222

Browse files
authored
Move to (functioning) GitHub Actions CI (#103)
1 parent c219708 commit fcda222

File tree

10 files changed

+135
-76
lines changed

10 files changed

+135
-76
lines changed

.codecov.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
coverage:
2+
range: 90..100 # set a high standard for ourselves
3+
round: down
4+
precision: 2
5+
status:
6+
project:
7+
default:
8+
threshold: 1%
9+
ignore:
10+
- "examples" # don't consider examples in coverage report
11+
- "tests" # we also don't care about coverage of test code
12+
- "src/tests"
13+
- "benches" # or coverage of benchmarks
14+
# Make less noisy comments
15+
comment:
16+
layout: "files"
17+
require_changes: yes

.github/workflows/coverage.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on: [push]
2+
name: coverage
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
container:
7+
image: xd009642/tarpaulin
8+
options: --security-opt seccomp=unconfined
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Generate code coverage
12+
run: |
13+
cargo tarpaulin --verbose --timeout 120 --out Xml
14+
- name: Upload to codecov.io
15+
uses: codecov/codecov-action@v2
16+
with:
17+
fail_ci_if_error: true

.github/workflows/features.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on: [push]
2+
name: cargo hack
3+
jobs:
4+
check:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions-rs/toolchain@v1
8+
with:
9+
profile: minimal
10+
toolchain: stable
11+
- uses: actions/checkout@v2
12+
- name: Install cargo-hack
13+
uses: actions-rs/[email protected]
14+
with:
15+
crate: cargo-hack
16+
version: latest
17+
use-tool-cache: true
18+
- name: cargo hack
19+
uses: actions-rs/cargo@v1
20+
with:
21+
command: hack
22+
args: --feature-powerset --exclude-features bench_private check

.github/workflows/msrv.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on: [push]
2+
name: Minimum Supported Rust Version
3+
jobs:
4+
check:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions-rs/toolchain@v1
8+
with:
9+
profile: minimal
10+
toolchain: 1.48.0 # nom 7
11+
- uses: actions/checkout@v2
12+
- name: cargo +1.48.0 check
13+
uses: actions-rs/cargo@v1
14+
with:
15+
command: check

.github/workflows/style.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
on: [push]
2+
name: style
3+
jobs:
4+
stable:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
toolchain: [stable, beta]
10+
steps:
11+
- uses: actions-rs/toolchain@v1
12+
with:
13+
profile: minimal
14+
toolchain: ${{ matrix.toolchain }}
15+
components: rustfmt, clippy
16+
- uses: actions/checkout@v2
17+
- name: cargo fmt --check
18+
uses: actions-rs/cargo@v1
19+
with:
20+
command: fmt
21+
args: --check
22+
- name: cargo doc
23+
uses: actions-rs/cargo@v1
24+
if: always()
25+
with:
26+
command: doc
27+
args: --no-deps --all-features
28+
- name: cargo clippy
29+
uses: actions-rs/clippy-check@v1
30+
if: always()
31+
with:
32+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on: [push]
2+
name: cargo test
3+
jobs:
4+
all:
5+
runs-on: ${{ matrix.os }}
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
os: [ubuntu-latest, macos-latest, windows-latest]
10+
toolchain: [stable]
11+
include:
12+
- os: ubuntu-latest
13+
toolchain: beta
14+
- os: ubuntu-latest
15+
toolchain: nightly
16+
steps:
17+
- uses: actions-rs/toolchain@v1
18+
with:
19+
profile: minimal
20+
toolchain: ${{ matrix.toolchain }}
21+
- uses: actions/checkout@v2
22+
- name: cargo test
23+
uses: actions-rs/cargo@v1
24+
with:
25+
command: test

.travis.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

Cargo.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ categories = ["data-structures", "development-tools::profiling"]
2020

2121
license = "MIT/Apache-2.0"
2222

23-
[badges]
24-
travis-ci = { repository = "HdrHistogram/HdrHistogram_rust" }
25-
maintenance = { status = "passively-maintained" }
26-
2723
[features]
2824
bench_private = [] # for enabling nightly-only feature(test) on the main crate to allow benchmarking private code
2925
serialization = [ "flate2", "nom", "base64" ]
@@ -40,10 +36,12 @@ crossbeam-channel = { version = "0.5", optional = true }
4036

4137
[dev-dependencies]
4238
rand = { version = "0.8", features = ["small_rng"] }
43-
rug = "1.2"
4439
ieee754 = "0.2.2"
4540
clap = "2.26.2"
4641

42+
[target.'cfg(unix)'.dev-dependencies]
43+
rug = "1.2"
44+
4745
[lib]
4846
path = "src/lib.rs"
4947

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Crates.io](https://img.shields.io/crates/v/hdrhistogram.svg)](https://crates.io/crates/hdrhistogram)
44
[![Documentation](https://docs.rs/hdrhistogram/badge.svg)](https://docs.rs/hdrhistogram/)
5-
[![Build Status](https://travis-ci.org/HdrHistogram/HdrHistogram_rust.svg?branch=master)](https://travis-ci.org/HdrHistogram/HdrHistogram_rust)
5+
[![cargo test](https://github.com/HdrHistogram/HdrHistogram_rust/actions/workflows/test.yml/badge.svg)](https://github.com/HdrHistogram/HdrHistogram_rust/actions/workflows/test.yml)
66
[![Codecov](https://codecov.io/github/HdrHistogram/HdrHistogram_rust/coverage.svg?branch=master)](https://codecov.io/gh/HdrHistogram/HdrHistogram_rust)
77

88
HdrSample is a port of Gil Tene's HdrHistogram to native Rust. It provides recording and

tests/quantile.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// rug doesn't support Windows
2+
#![cfg(unix)]
3+
14
use hdrhistogram::{Counter, Histogram};
25

36
use ieee754::Ieee754;

0 commit comments

Comments
 (0)