Skip to content

Commit d44828f

Browse files
committed
Update documentation and prep for crate release
- BREAKING: renamed the crate to concurrent-pqueue in prep for crates.io release - Updates to project README - Add/update rustdocs throughout - Add GH actions to automatically run tests, linters, format checks - Add GH actions to create release package and push to crates.io when new release tag is created - Ensured MIT license is correct - Add readme files
1 parent b88063f commit d44828f

16 files changed

Lines changed: 695 additions & 73 deletions

File tree

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
test:
14+
name: Test Suite
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
rust:
19+
- stable
20+
- beta
21+
- 1.70.0 # MSRV
22+
steps:
23+
- name: Checkout sources
24+
uses: actions/checkout@v4
25+
26+
- name: Install ${{ matrix.rust }} toolchain
27+
uses: actions-rust-lang/setup-rust-toolchain@v1
28+
with:
29+
toolchain: ${{ matrix.rust }}
30+
31+
- name: Run cargo test
32+
run: cargo test --workspace --all-features
33+
34+
fmt:
35+
name: Rustfmt
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout sources
39+
uses: actions/checkout@v4
40+
41+
- name: Install stable toolchain
42+
uses: actions-rust-lang/setup-rust-toolchain@v1
43+
with:
44+
components: rustfmt
45+
46+
- name: Run cargo fmt
47+
run: cargo fmt --all -- --check
48+
49+
clippy:
50+
name: Clippy
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout sources
54+
uses: actions/checkout@v4
55+
56+
- name: Install stable toolchain
57+
uses: actions-rust-lang/setup-rust-toolchain@v1
58+
with:
59+
components: clippy
60+
61+
- name: Run cargo clippy
62+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
63+
64+
docs:
65+
name: Documentation
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Checkout sources
69+
uses: actions/checkout@v4
70+
71+
- name: Install stable toolchain
72+
uses: actions-rust-lang/setup-rust-toolchain@v1
73+
74+
- name: Run cargo doc
75+
run: cargo doc --workspace --all-features --no-deps

.github/workflows/release.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
test:
13+
name: Test Suite
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout sources
17+
uses: actions/checkout@v4
18+
19+
- name: Install stable toolchain
20+
uses: actions-rust-lang/setup-rust-toolchain@v1
21+
with:
22+
toolchain: stable
23+
24+
- name: Run cargo test
25+
run: cargo test --workspace --all-features
26+
27+
- name: Run cargo fmt
28+
run: cargo fmt --all -- --check
29+
30+
- name: Run cargo clippy
31+
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
32+
33+
publish:
34+
name: Publish to crates.io
35+
runs-on: ubuntu-latest
36+
needs: test
37+
steps:
38+
- name: Checkout sources
39+
uses: actions/checkout@v4
40+
41+
- name: Install stable toolchain
42+
uses: actions-rust-lang/setup-rust-toolchain@v1
43+
with:
44+
toolchain: stable
45+
46+
- name: Extract version from tag
47+
id: version
48+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
49+
50+
- name: Update Cargo.toml version
51+
run: |
52+
sed -i 's/^version = ".*"/version = "${{ steps.version.outputs.VERSION }}"/' pqueue/Cargo.toml
53+
54+
- name: Verify version update
55+
run: |
56+
echo "Updated version in Cargo.toml:"
57+
grep '^version = ' pqueue/Cargo.toml
58+
59+
- name: Publish to crates.io
60+
run: cargo publish --manifest-path pqueue/Cargo.toml
61+
env:
62+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
63+
64+
- name: Create GitHub Release
65+
uses: actions/create-release@v1
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
with:
69+
tag_name: ${{ github.ref }}
70+
release_name: Release ${{ steps.version.outputs.VERSION }}
71+
draft: false
72+
prerelease: false
73+
body: |
74+
Release version ${{ steps.version.outputs.VERSION }} of concurrent-pqueue.
75+
76+
## What's Changed
77+
78+
See the [CHANGELOG](https://github.com/willbuckner/pqueue/blob/main/README.md#changelog) for details.
79+
80+
## Installation
81+
82+
```toml
83+
[dependencies]
84+
concurrent-pqueue = "${{ steps.version.outputs.VERSION }}"
85+
```

Cargo.lock

Lines changed: 10 additions & 10 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ members = [
55
"pqueue_client"
66
]
77
resolver = "2"
8-
8+
package.version = "0.3.0"
99

1010

1111
[workspace.dependencies]

LICENSE.txt

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1+
MIT License
2+
13
Copyright 2024 Dwayn Matthies
24

3-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4-
documentation files (the “Software”), to deal in the Software without restriction, including without limitation the
5-
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
6-
permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
711

8-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
914

10-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
11-
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
12-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
13-
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)