Skip to content

Commit

Permalink
Updated CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mgjm committed Jun 7, 2024
1 parent da0db74 commit c7b0e77
Show file tree
Hide file tree
Showing 8 changed files with 337 additions and 14 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ env:
RUSTFLAGS: -C link-arg=-s

jobs:
format:
name: Check rust format
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- name: Setup rust
run: |
rustup toolchain install nightly --profile minimal --component rustfmt --no-self-update
- name: Run cargo fmt
run: cargo +nightly fmt --check

test:
name: ${{ matrix.cmd.name }} (Rust ${{ matrix.rust }}) ${{ matrix.features }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -83,6 +95,8 @@ jobs:
file target/${{ matrix.target.target }}/release/rust-github-actions-test${{ matrix.target.ext }}
stat target/${{ matrix.target.target }}/release/rust-github-actions-test${{ matrix.target.ext }}
mv target/${{ matrix.target.target }}/release/rust-github-actions-test${{ matrix.target.ext }} badgemagic.${{ matrix.target.target }}${{ matrix.target.ext }}
- name: Run for ${{ matrix.target.name }}
run: ./badgemagic.${{ matrix.target.target }}${{ matrix.target.ext }} --help
- uses: actions/upload-artifact@v4
with:
name: badgemagic.${{ matrix.target.target }}${{ matrix.target.ext }}
Expand All @@ -92,6 +106,7 @@ jobs:
ready:
name: All required checks passed
needs:
- format
- test
- build
runs-on: ubuntu-latest
Expand All @@ -104,6 +119,7 @@ jobs:
permissions:
contents: write
needs:
- format
- test
- build
runs-on: ubuntu-latest
Expand Down
250 changes: 239 additions & 11 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "rust-github-actions-test"
version = "0.1.0"
authors = ["Martin Michaelis <[email protected]>"]
edition = "2021"

[[bin]]
Expand All @@ -13,4 +14,5 @@ example = []
cli = ["example"]

[dependencies]
clap = { version = "4.5.6", features = ["derive"] }
hidapi = "2.6.1"
Loading

0 comments on commit c7b0e77

Please sign in to comment.