Skip to content

Commit 110e61b

Browse files
Merge pull request #2 from wcampbell0x2a/add-ci
ci: Add CI
2 parents 1d345c2 + 3efa6d0 commit 110e61b

File tree

5 files changed

+52
-2
lines changed

5 files changed

+52
-2
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: ci
10+
11+
jobs:
12+
# build, test all supported targets
13+
build-test-nightly:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
targets:
18+
- x86_64-unknown-linux-musl
19+
toolchain:
20+
- stable
21+
# msrv
22+
- 1.39.0
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
- uses: dtolnay/rust-toolchain@master
27+
with:
28+
toolchain: ${{ matrix.toolchain }}
29+
target: ${{ matrix.targets }}
30+
- run: cargo test --locked --workspace --target ${{ matrix.targets }}
31+
32+
# fmt and clippy on nightly builds
33+
fmt-clippy-nightly:
34+
runs-on: ubuntu-latest
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: dtolnay/rust-toolchain@master
39+
with:
40+
toolchain: stable
41+
target: x86_64-unknown-linux-musl
42+
components: rustfmt, clippy
43+
- run: cargo fmt --all --check
44+
- run: cargo clippy --target x86_64-unknown-linux-gnu --workspace -- -D warnings

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
/target
2-
Cargo.lock

Cargo.lock

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition = "2018"
66
repository = "https://github.com/wcampbell0x2a/dbg_hex"
77
description = "display dbg result in hexadecimal {:#x?} format"
88
license = "MIT"
9+
rust-version = "1.39.0"
910

1011
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1112

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ mod tests {
4545
fn it_works() {
4646
dbg_hex!(0x16 + 0x16);
4747
}
48-
48+
4949
#[test]
5050
fn it_works_multiple() {
5151
dbg_hex!(0x16 + 0x16, 0x32 - 0x16);

0 commit comments

Comments
 (0)