Skip to content

Commit 278fe4a

Browse files
committed
Add CI stuff
Signed-off-by: Matthias Wahl <matthiaswahl@m7w3.de>
1 parent d210d91 commit 278fe4a

5 files changed

Lines changed: 135 additions & 4 deletions

File tree

.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: daily
7+
open-pull-requests-limit: 10

.github/workflows/nightly.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tests - Nightly
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
10+
jobs:
11+
build-nightly:
12+
strategy:
13+
matrix:
14+
rustflags:
15+
- '-C target-cpu=native'
16+
features:
17+
- ''
18+
- '--features 128bit'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v1
22+
- uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: nightly
25+
override: true
26+
- name: Build
27+
env:
28+
RUSTFLAGS: ${{ matrix.rustflags }}
29+
run: cargo build ${{ matrix.features }}
30+
- name: Run tests
31+
env:
32+
RUSTFLAGS: ${{ matrix.rustflags }}
33+
run: cargo test ${{ matrix.features }}

.github/workflows/quality.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Quality
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
10+
jobs:
11+
clippy_check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions-rs/toolchain@v1
16+
with:
17+
toolchain: stable
18+
profiles: minimal
19+
override: true
20+
components: rustfmt,clippy
21+
- name: Validate cargo format
22+
run: cargo fmt -- --check
23+
- name: Check workflow permissions
24+
id: check_permissions
25+
uses: scherermichael-oss/action-has-permission@1.0.6
26+
with:
27+
required-permission: write
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
- name: Run clippy action to produce annotations
31+
uses: actions-rs/clippy-check@v1
32+
if: steps.check_permissions.outputs.has-permission
33+
env:
34+
RUSTFLAGS: "-C target-cpu=native"
35+
with:
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
args: --all
38+
- name: Run clippy manually without annotations
39+
if: ${{ !steps.check_permissions.outputs.has-permission }}
40+
env:
41+
RUSTFLAGS: "-C target-cpu=native"
42+
run: cargo clippy --all
43+
coverage:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v1
47+
- uses: actions-rs/toolchain@v1
48+
with:
49+
toolchain: stable
50+
profile: minimal
51+
components: llvm-tools-preview
52+
- name: Install cargo-llvm-cov
53+
uses: taiki-e/install-action@cargo-llvm-cov
54+
- name: Run codecov
55+
env:
56+
RUSTFLAGS: "-C target-cpu=native"
57+
run: cargo llvm-cov --lcov --output-path lcov.txt
58+
- uses: codecov/codecov-action@v3
59+
with:
60+
files: ./lcov.txt # optional
61+
flags: ${{ env.flags }} # optional
62+
fail_ci_if_error: true # optional (default = false)
63+
verbose: true # optional (default = false)

.github/workflows/tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
rustflags:
14+
- '-C target-cpu=native'
15+
features:
16+
- ''
17+
- '--features 128bit'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v1
21+
- uses: actions-rs/toolchain@v1
22+
with:
23+
toolchain: stable
24+
override: true
25+
- name: Build
26+
env:
27+
RUSTFLAGS: ${{ matrix.rustflags }}
28+
run: cargo build ${{ matrix.features }}
29+
- name: Run tests
30+
env:
31+
RUSTFLAGS: ${{ matrix.rustflags }}
32+
run: cargo test ${{ matrix.features }}

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,5 @@ allow-non-simd = [
3737
[package.metadata.docs.rs]
3838
features = ["allow-non-simd"]
3939

40-
[[bench]]
41-
name = "value"
42-
harness = false
43-
4440
[[example]]
4541
name = "enum1"

0 commit comments

Comments
 (0)