Skip to content

Commit

Permalink
latest standard
Browse files Browse the repository at this point in the history
  • Loading branch information
BlondeBurrito committed Nov 16, 2023
1 parent cc6ff75 commit 0aa796d
Show file tree
Hide file tree
Showing 11 changed files with 173 additions and 130 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ none ]
pull_request:
branches: [ main ]
branches: [ none ]
workflow_dispatch:

env:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/build_linux.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/build_macos.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/build_windows.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
nix_test:
name: nix_test
runs-on: ubuntu-latest
steps:
- name: Nix dependencies
run: sudo apt-get update; sudo apt-get -y install libasound2-dev libudev-dev lld
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --release --workspace --all-features
nix_build:
name: nix_build
runs-on: ubuntu-latest
steps:
- name: Nix dependencies
run: sudo apt-get update; sudo apt-get -y install libasound2-dev libudev-dev lld
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release --workspace
win_test:
name: win_test
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --release --workspace --all-features
win_build:
name: win_build
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release --workspace
# uses so many build action minutes :(
# macos_test:
# name: macos_test
# runs-on: macos-latest
# steps:
# - name: deps
# run: brew install michaeleisel/zld/zld
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@stable
# - run: cargo build --release --workspace --all-features
# macos_build:
# name: macos_build
# runs-on: macos-latest
# steps:
# - name: deps
# run: brew install michaeleisel/zld/zld
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@stable
# - run: cargo build --release --workspace
4 changes: 2 additions & 2 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Clippy

on:
push:
branches: [ none ]
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
Expand All @@ -19,5 +19,5 @@ jobs:
run: sudo apt-get update; sudo apt-get -y install libasound2-dev libudev-dev lld
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings -D clippy::cargo_common_metadata -D clippy::missing_docs_in_private_items -W clippy::todo -W clippy::unimplemented
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings -D clippy::cargo_common_metadata -D clippy::missing_docs_in_private_items -D clippy::todo -W clippy::unimplemented

24 changes: 24 additions & 0 deletions .github/workflows/code-cov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Code-cov

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
code_cov:
name: code_cov
runs-on: ubuntu-latest
steps:
- name: Nix dependencies
run: sudo apt-get update; sudo apt-get -y install libasound2-dev libudev-dev lld
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- run: |
cargo install cargo-tarpaulin
cargo tarpaulin --release --workspace --all-features --include-tests --engine=llvm --fail-under 85 --ignore-panics
24 changes: 24 additions & 0 deletions .github/workflows/doc-cov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Doc-cov

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
doc_cov:
name: doc_cov
runs-on: ubuntu-latest
steps:
- name: Nix dependencies
run: sudo apt-get update; sudo apt-get -y install libasound2-dev libudev-dev lld
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- run: |
export RUSTDOCFLAGS="-Z unstable-options --show-coverage"
cargo +nightly doc --workspace --all-features --no-deps --release
15 changes: 13 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
version = "0.1.0"
authors = ["BlondeBurrito"]
edition = "2021"
rust-version = "1.70"
rust-version = "1.74"
readme = "README.md"
homepage = "https://github.com/BlondeBurrito/repo_template"
repository = "https://github.com/BlondeBurrito/repo_template"
keywords = ["utility"]

[workspace]
members = ["crates/*"]

[workspace.lints.clippy]
cargo_common_metadata = "deny"
missing_docs_in_private_items = "deny"
todo = "deny"
unimplemented = "warn"

# Centralised way of managing versions across all crates and packages
[workspace.dependencies]
example_crate = { path = "crates/example_crate" }
Expand All @@ -36,6 +43,8 @@ criterion = "0.5"
[dependencies]
example_crate = { workspace = true }

[features]

[profile.dev]
opt-level = 1

Expand All @@ -46,6 +55,7 @@ strip = false

[profile.release]
codegen-units = 1
# lto = true # slow
strip = true # strip symbols to reduce binary size on linux and mac

[[bench]]
Expand All @@ -54,4 +64,5 @@ harness = false

[[example]]
name = "hello"
path = "examples/hello.rs"
path = "examples/hello.rs"
required-features = []
3 changes: 3 additions & 0 deletions crates/example_crate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ publish = false

[dependencies]
# clap = { workspace = true }

[lints]
workspace = true
Loading

0 comments on commit 0aa796d

Please sign in to comment.