Skip to content

Commit

Permalink
Merge pull request #2 from wcampbell0x2a/add-ci
Browse files Browse the repository at this point in the history
ci: Add CI
  • Loading branch information
wcampbell0x2a authored Sep 6, 2023
2 parents 1d345c2 + 3efa6d0 commit 110e61b
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
push:
branches:
- master
pull_request:
branches:
- master

name: ci

jobs:
# build, test all supported targets
build-test-nightly:
runs-on: ubuntu-latest
strategy:
matrix:
targets:
- x86_64-unknown-linux-musl
toolchain:
- stable
# msrv
- 1.39.0

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.targets }}
- run: cargo test --locked --workspace --target ${{ matrix.targets }}

# fmt and clippy on nightly builds
fmt-clippy-nightly:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: x86_64-unknown-linux-musl
components: rustfmt, clippy
- run: cargo fmt --all --check
- run: cargo clippy --target x86_64-unknown-linux-gnu --workspace -- -D warnings
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/target
Cargo.lock
6 changes: 6 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ edition = "2018"
repository = "https://github.com/wcampbell0x2a/dbg_hex"
description = "display dbg result in hexadecimal {:#x?} format"
license = "MIT"
rust-version = "1.39.0"

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

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mod tests {
fn it_works() {
dbg_hex!(0x16 + 0x16);
}

#[test]
fn it_works_multiple() {
dbg_hex!(0x16 + 0x16, 0x32 - 0x16);
Expand Down

0 comments on commit 110e61b

Please sign in to comment.