Skip to content

Commit 6f51102

Browse files
authored
Merge pull request #5 from gfx-rs/repo-procedures
2 parents 8ded7db + f102eaf commit 6f51102

File tree

10 files changed

+233
-8
lines changed

10 files changed

+233
-8
lines changed

.github/pull_request_template.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!-- Thank you for making a pull request! Below are the recommended steps to validate that your PR will pass CI -->
2+
3+
## Checklist
4+
5+
- [ ] `cargo clippy` reports no issues
6+
- [ ] `cargo doc` reports no issues
7+
- [ ] [`cargo deny`](https://github.com/EmbarkStudios/cargo-deny/) issues have been fixed or added to `deny.toml`
8+
- [ ] Human-readable change descriptions added to CHANGELOG.md under the "Unreleased" heading.
9+
- [ ] If the change does not affect the user (or is a process change), preface the change with "Internal:"
10+
- [ ] Add credit to yourself for each change: `Added new functionality. @githubname`
11+
12+
## Description
13+
14+
## Related Issues

.github/workflows/ci.yml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,66 @@ on:
55
branches: ["trunk"]
66
pull_request:
77

8+
env:
9+
CI_RUST_VERSION: "1.94"
10+
CI_RUST_MSRV: "1.39"
11+
RUSTFLAGS: "-Dwarnings"
12+
RUSTDOCFLAGS: "-Dwarnings"
13+
814
jobs:
915
fmt:
1016
name: Format
1117
runs-on: ubuntu-latest
1218
steps:
1319
- uses: actions/checkout@v4
14-
- run: rustup component add rustfmt
20+
- uses: cwfitzgerald/repo-common/.github/actions/install-rust@trunk
21+
with:
22+
version: ${{ env.CI_RUST_VERSION }}
23+
components: rustfmt
1524
- run: cargo fmt --check
1625

1726
clippy:
1827
name: Clippy
1928
runs-on: ubuntu-latest
2029
steps:
2130
- uses: actions/checkout@v4
22-
- run: rustup component add clippy
23-
- run: cargo clippy -- -D warnings
31+
- uses: cwfitzgerald/repo-common/.github/actions/install-rust@trunk
32+
with:
33+
version: ${{ env.CI_RUST_VERSION }}
34+
components: clippy
35+
- run: cargo clippy --all-features -- -D warnings
36+
- run: cargo doc --no-deps
2437

2538
test:
2639
name: Test
2740
runs-on: ubuntu-latest
2841
steps:
2942
- uses: actions/checkout@v4
30-
- run: cargo test
43+
- uses: cwfitzgerald/repo-common/.github/actions/install-rust@trunk
44+
with:
45+
version: ${{ env.CI_RUST_VERSION }}
46+
- uses: taiki-e/install-action@cargo-nextest
47+
- run: cargo nextest run
48+
- run: cargo test --doc
49+
50+
deny:
51+
name: Deny
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v4
55+
- uses: taiki-e/install-action@cargo-deny
56+
- run: cargo deny --all-features check
3157

3258
msrv:
3359
name: MSRV (1.39)
3460
runs-on: ubuntu-latest
61+
env:
62+
RUSTFLAGS: ""
63+
RUSTDOCFLAGS: ""
3564
steps:
3665
- uses: actions/checkout@v4
37-
- uses: dtolnay/rust-toolchain@master
66+
- uses: cwfitzgerald/repo-common/.github/actions/install-rust@trunk
3867
with:
39-
toolchain: "1.39"
40-
- run: cargo +1.39 check
68+
version: ${{ env.CI_RUST_MSRV }}
69+
- run: cargo check
70+
- run: cargo check --no-default-features

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@ target/
1212
examples/generated-wasm
1313

1414
# Service
15-
Cargo.lock
1615
*.swp

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to cargo's version of [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
Per Keep a Changelog there are 6 main categories of changes:
9+
- Added
10+
- Changed
11+
- Deprecated
12+
- Removed
13+
- Fixed
14+
- Security
15+
16+
#### Table of Contents
17+
18+
- [Unreleased](#unreleased)
19+
- [v0.1.5](#v015)
20+
- [v0.1.4](#v014)
21+
- [v0.1.3](#v013)
22+
23+
## Unreleased
24+
25+
- Changed: Switched to `#![no_std]` with `alloc` dependency. @waywardmonkeys
26+
- Changed: Updated MSRV from 1.36 to 1.39 to enable `no_std`.
27+
28+
## v0.1.5
29+
30+
- Added: `allocate_range_aligned` method for aligned sub-range allocation without wasting padding space.
31+
- Added: Documentation comments for all public items.
32+
- Added: README with usage examples, MSRV policy, and license info.
33+
- Added: CI workflow with format, clippy, test, and MSRV jobs.
34+
- Internal: Updated edition from 2015 to 2018.
35+
36+
## v0.1.4
37+
38+
- Fixed: `grow_to` incorrectly assumed the last free range was always at the end of the pool, corrupting the free list when the tail was allocated and an earlier range was free. @dbartussek
39+
- Internal: Clippy lint fixes.
40+
41+
## v0.1.3
42+
43+
Initial release on separate repository (previously part of [gfx-rs](https://github.com/gfx-rs/gfx)).
44+
45+
## Diffs
46+
47+
- [Unreleased](https://github.com/gfx-rs/range-alloc/compare/v0.1.5...HEAD)
48+
- [v0.1.5](https://github.com/gfx-rs/range-alloc/compare/v0.1.4...v0.1.5)
49+
- [v0.1.4](https://github.com/gfx-rs/range-alloc/compare/v0.1.3...v0.1.4)

Cargo.lock

Lines changed: 6 additions & 0 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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ authors = ["the gfx-rs Developers"]
1010
documentation = "https://docs.rs/range-alloc"
1111
categories = ["memory-management"]
1212
edition = "2018"
13+
rust-version = "1.39"
1314
readme = "README.md"

RELEASE.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Release Process
2+
3+
This document describes how to publish a new release of `range-alloc`.
4+
5+
## Prerequisites
6+
7+
- Push access to the default branch
8+
- A crates.io API token with publish rights for all workspace crates
9+
- `gh` CLI installed and authenticated (for creating the GitHub release)
10+
11+
## Steps
12+
13+
### 1. Determine the new version
14+
15+
Pick the new version number following cargo semver conventions. For this document,
16+
we'll use `X.Y.Z` as a placeholder.
17+
18+
### 2. Update CHANGELOG.md
19+
20+
**a) Add the new version to the Table of Contents:**
21+
22+
Find the line:
23+
```
24+
- [Unreleased](#unreleased)
25+
```
26+
Add a new entry directly below it:
27+
```
28+
- [vX.Y.Z](#vXYZ)
29+
```
30+
(The anchor is the version with dots removed, e.g. `v0.2.0` -> `#v020`)
31+
32+
**b) Add a version heading under Unreleased:**
33+
34+
Find:
35+
```
36+
## Unreleased
37+
```
38+
Add a blank line and a new version section below it, moving all existing unreleased
39+
items under the new heading:
40+
```
41+
## Unreleased
42+
43+
## vX.Y.Z
44+
45+
Released YYYY-MM-DD
46+
47+
- (move all previously unreleased items here)
48+
```
49+
50+
**c) Update the Diffs section at the bottom:**
51+
52+
Find the existing unreleased diff link:
53+
```
54+
- [Unreleased](https://github.com/gfx-rs/range-alloc/compare/vPREVIOUS...HEAD)
55+
```
56+
Update it and add a new entry:
57+
```
58+
- [Unreleased](https://github.com/gfx-rs/range-alloc/compare/vX.Y.Z...HEAD)
59+
- [vX.Y.Z](https://github.com/gfx-rs/range-alloc/compare/vPREVIOUS...vX.Y.Z)
60+
```
61+
62+
### 3. Update Cargo.toml
63+
64+
Set the `version` field to the new version:
65+
```toml
66+
version = "X.Y.Z"
67+
```
68+
69+
If this is a workspace, update `workspace.package.version` and any intra-workspace
70+
dependency versions as needed.
71+
72+
### 4. Update README.md
73+
74+
Update any version references (dependency snippets, compatibility tables, etc.)
75+
to reflect the new version.
76+
77+
### 5. Commit and tag
78+
79+
```bash
80+
jj commit -m "Release vX.Y.Z"
81+
jj tag create vX.Y.Z
82+
jj git push
83+
```
84+
85+
### 6. Publish to crates.io
86+
87+
```bash
88+
cargo publish
89+
```
90+
91+
### 7. Create the GitHub release
92+
93+
Extract the release notes from `CHANGELOG.md` and create a release:
94+
95+
```bash
96+
gh release create vX.Y.Z --title "vX.Y.Z" --notes "<paste release notes here>"
97+
```
98+
99+
### 8. Post-release
100+
101+
Verify:
102+
- [ ] The crate is visible at https://crates.io/crates/range-alloc/X.Y.Z
103+
- [ ] Docs are building at https://docs.rs/range-alloc/X.Y.Z
104+
- [ ] The GitHub release exists at https://github.com/gfx-rs/range-alloc/releases/tag/vX.Y.Z

deny.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[licenses]
2+
allow = [
3+
"Apache-2.0",
4+
"MIT",
5+
]
6+
7+
[bans]
8+
multiple-versions = "deny"
9+
skip = []
10+
11+
[sources]
12+
unknown-registry = "deny"
13+
unknown-git = "allow"
14+
15+
[advisories]
16+
ignore = []

renovate.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["github>cwfitzgerald/repo-common"]
4+
}

rust-toolchain.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[toolchain]
2+
channel = "1.94"

0 commit comments

Comments
 (0)