Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI

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

env:
CARGO_TERM_COLOR: always

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace -- -D warnings
- name: Run tests
run: cargo test --workspace 2>&1 | tee test-output.txt
- run: cargo doc --no-deps -p wavekat-core --all-features
- name: Job summary
if: always()
run: |
echo "## Check" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
rustc --version >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
if [ -f test-output.txt ]; then
echo "### Test Results" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
grep -E '^test result:|^running' test-output.txt >> "$GITHUB_STEP_SUMMARY" || true
echo '```' >> "$GITHUB_STEP_SUMMARY"
fi
56 changes: 56 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release-plz

on:
push:
branches: [main]
workflow_dispatch:

jobs:
release-plz-release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: release-plz/action@v0.5
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

release-plz-pr:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: release-plz/action@v0.5
id: release-plz
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Job summary
if: always()
run: |
echo "## Release PR" >> "$GITHUB_STEP_SUMMARY"
if [ "${{ steps.release-plz.outputs.prs_created }}" = "true" ]; then
echo "Release PR created." >> "$GITHUB_STEP_SUMMARY"
else
echo "No release PR created." >> "$GITHUB_STEP_SUMMARY"
fi
12 changes: 12 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: wavekat-core
abstract: Shared types for the WaveKat audio processing ecosystem.
type: software
authors:
- given-names: Yishi
family-names: Guo
alias: Eason
email: eason@wavekat.com
repository-code: https://github.com/wavekat/wavekat-core
license: Apache-2.0
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.PHONY: help check test fmt lint doc ci

help:
@echo "Available targets:"
@echo " check Check workspace compiles"
@echo " test Run all tests"
@echo " fmt Format code"
@echo " lint Run clippy with warnings as errors"
@echo " doc Build and open docs in browser"
@echo " ci Run all CI checks locally (fmt, clippy, test, doc)"

# Check workspace compiles
check:
cargo check --workspace

# Run all tests
test:
cargo test --workspace

# Format code
fmt:
cargo fmt --all

# Lint
lint:
cargo clippy --workspace -- -D warnings

# Build and open docs in browser
doc:
cargo doc --no-deps -p wavekat-core --all-features --open

# Run all CI checks locally (mirrors .github/workflows/ci.yml)
ci:
cargo fmt --all -- --check
cargo clippy --workspace -- -D warnings
cargo test --workspace
cargo doc --no-deps -p wavekat-core --all-features
4 changes: 4 additions & 0 deletions crates/wavekat-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ description = "Shared types for the WaveKat audio processing ecosystem"
version.workspace = true
edition.workspace = true
license.workspace = true
repository = "https://github.com/wavekat/wavekat-core"
homepage = "https://github.com/wavekat/wavekat-core"
documentation = "https://docs.rs/wavekat-core"
readme = "../../README.md"
keywords = ["audio", "voice", "telephony", "wavekat"]
categories = ["multimedia::audio"]

Expand Down
3 changes: 3 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[workspace]
git_tag_enable = true
git_release_enable = true