Skip to content

Commit 3621968

Browse files
authored
Merge pull request #1 from nmittler/ci
Setting up CI
2 parents 837e35f + 33c538c commit 3621968

File tree

4 files changed

+134
-0
lines changed

4 files changed

+134
-0
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: cargo
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
time: "13:00"

.github/workflows/codecov.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Coverage
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
7+
jobs:
8+
coverage:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions-rs/toolchain@v1
13+
with:
14+
profile: minimal
15+
toolchain: stable
16+
override: true
17+
- uses: taiki-e/install-action@cargo-llvm-cov
18+
- run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
19+
- name: Upload coverage to Codecov
20+
uses: codecov/codecov-action@v3
21+
with:
22+
files: lcov.info
23+
fail_ci_if_error: true

.github/workflows/rust.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
schedule:
8+
- cron: "21 3 * * 5"
9+
10+
jobs:
11+
test-freebsd:
12+
# see https://github.com/actions/runner/issues/385
13+
# use https://github.com/vmactions/freebsd-vm for now
14+
name: test on freebsd
15+
runs-on: macos-12
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: test on freebsd
19+
uses: vmactions/freebsd-vm@v0
20+
with:
21+
usesh: true
22+
mem: 4096
23+
copyback: false
24+
prepare: |
25+
pkg install -y curl
26+
curl https://sh.rustup.rs -sSf --output rustup.sh
27+
sh rustup.sh -y --profile minimal --default-toolchain stable
28+
echo "~~~~ rustc --version ~~~~"
29+
$HOME/.cargo/bin/rustc --version
30+
run: |
31+
freebsd-version
32+
$HOME/.cargo/bin/cargo build --all-targets
33+
$HOME/.cargo/bin/cargo test
34+
test:
35+
strategy:
36+
matrix:
37+
os: [ubuntu-latest, macos-latest, windows-latest]
38+
rust: [stable, beta, 1.59.0]
39+
exclude:
40+
- os: macos-latest
41+
rust: beta
42+
- os: macos-latest
43+
rust: 1.59.0
44+
- os: windows-latest
45+
rust: beta
46+
- os: windows-latest
47+
rust: 1.59.0
48+
49+
runs-on: ${{ matrix.os }}
50+
51+
steps:
52+
- uses: actions/checkout@v2
53+
- uses: actions-rs/toolchain@v1
54+
with:
55+
profile: minimal
56+
toolchain: ${{ matrix.rust }}
57+
override: true
58+
- uses: Swatinem/rust-cache@v1
59+
- uses: actions-rs/cargo@v1
60+
with:
61+
command: build
62+
args: --all-targets
63+
- uses: actions-rs/cargo@v1
64+
with:
65+
command: test
66+
67+
lint:
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v2
71+
- uses: actions-rs/toolchain@v1
72+
with:
73+
profile: minimal
74+
toolchain: stable
75+
override: true
76+
components: rustfmt, clippy
77+
- uses: Swatinem/rust-cache@v1
78+
- uses: actions-rs/cargo@v1
79+
with:
80+
command: fmt
81+
args: --all -- --check
82+
- uses: actions-rs/cargo@v1
83+
with:
84+
command: clippy
85+
args: --all-targets -- -D warnings
86+
- uses: actions-rs/toolchain@v1
87+
with:
88+
profile: minimal
89+
toolchain: stable
90+
override: true
91+
components: clippy
92+
- name: doc
93+
run: cargo doc --no-deps --document-private-items
94+
env:
95+
RUSTDOCFLAGS: -Dwarnings
96+
97+
audit:
98+
runs-on: ubuntu-latest
99+
steps:
100+
- uses: actions/checkout@v2
101+
- uses: EmbarkStudios/cargo-deny-action@v1

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ categories = ["network-programming", "asynchronous"]
99
edition = "2021"
1010
rust-version = "1.59"
1111

12+
[badges]
13+
maintenance = { status = "passively-maintained" }
14+
1215
[dependencies]

0 commit comments

Comments
 (0)