Skip to content
Open
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
21 changes: 0 additions & 21 deletions .github/release-drafter-config.yml

This file was deleted.

55 changes: 15 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,9 @@ name: CI
on: [pull_request]

jobs:
get-nightly-version:
runs-on: ubuntu-latest
outputs:
nightly-version: ${{ steps.get-nightly.outputs.version }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Get nightly version from rust-toolchain.toml
id: get-nightly
run: |
NIGHTLY_VERSION=$(grep 'channel = ' rust-toolchain.toml | sed 's/.*"\(.*\)".*/\1/')
echo "version=$NIGHTLY_VERSION" >> $GITHUB_OUTPUT

test:
name: Build and run the unit tests using the latest rust.
runs-on: ${{ matrix.os }}
needs: get-nightly-version
strategy:
fail-fast: false
matrix:
Expand All @@ -33,35 +19,34 @@ jobs:
- [7-2, "7.2"]
toolchain:
- stable
- ${{ needs.get-nightly-version.outputs.nightly-version }}

steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
submodules: recursive
submodules: recursive

- name: Checkout redis sources
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
submodules: recursive
repository: redis/redis
ref: ${{ matrix.redis-version[1] }}
path: redis
submodules: recursive
repository: redis/redis
ref: ${{ matrix.redis-version[1] }}
path: redis

- name: Install redis
run: |
export HOMEBREW_NO_AUTO_UPDATE=1
cd redis
make -j
./src/redis-server --version
make install PREFIX=/usr/local
redis-server --version
export HOMEBREW_NO_AUTO_UPDATE=1
cd redis
make -j
./src/redis-server --version
make install PREFIX=/usr/local
redis-server --version

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: "3.10"

- name: Install Clang (for bindgen)
run: |
Expand All @@ -78,21 +63,11 @@ jobs:

- name: Install toolchain
id: tc
uses: dtolnay/rust-toolchain@master
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy

- name: Setup cache
if: runner.os != 'macOS'
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.toml') }}

- name: Format
run: cargo fmt --all -- --check

Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/cratesio-publish.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/release-drafter.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Open a release PR

on:
workflow_dispatch: # Manual trigger only

jobs:
# Create a PR with the new versions and changelog, preparing the next release.
# A release will be automatically published when the PR is merged into master.
release-pr:
name: Open a release PR
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
persist-credentials: false
- name: Install toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Run release-plz
uses: release-plz/[email protected]
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release-plz

on:
push:
branches:
- master
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this support releasing multiple release integration branches, e.g., a patch for 2.X and a minor for 3.X? (we do not release from master)
Is this a limitation? release-plz/release-plz#2159

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LukeMathWalker Will this support multiple concurrent releases? ☝🏼

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When looking at the version history, this didn't seem like a requirement—from what I can see, no backports have been made in the last few years.

I would recommend the following setup to minimise complexity:

  • Use master as trunk and cut releases for the latest major from there (i.e. all 2.x.y, until 3.0.0 is released)
  • Branch out when a new major release goes out (i.e. create a v2 branch once master moves over to 3.z.w)

If we need to backport something, we merge PRs into the backport branch and use something like cargo-release with a short-lived token to cut a release. In the meantime, I can look into adding support for branches to release-plz.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once release-plz/release-plz#2438 is merged, I should be able to adjust the workflow to cut backport releases from branches.


jobs:
# Release unpublished packages if the latest commit merged
# a release PR into master
release:
name: Publish a new release to crates.io
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
persist-credentials: false
- name: Install toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- name: Run release-plz
uses: release-plz/[email protected]
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
23 changes: 0 additions & 23 deletions .github/workflows/test-registry-token.yml

This file was deleted.

16 changes: 12 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
[workspace]
members = [".", "redismodule-rs-macros", "redismodule-rs-macros-internals"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it normal to have this root member like this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generally prefer to have all root members in subfolders, since it makes cargo build in the root of the repository equivalent to cargo build --workspace.
But I know that some projects prefer to have the "key" package at the root level, so no strong preferences here.


[workspace.package]
version = "2.0.7"
license = "BSD-3-Clause"
edition = "2021"

[package]
name = "redis-module"
version = "99.99.99"
version.workspace = true
edition.workspace = true
license.workspace = true
authors = ["Gavrie Philipson <[email protected]>", "Guy Korland <[email protected]>"]
edition = "2021"
build = "build.rs"
description = "A toolkit for building Redis modules in Rust"
license = "BSD-3-Clause"
repository = "https://github.com/RedisLabsModules/redismodule-rs"
readme = "README.md"
keywords = ["redis", "plugin"]
Expand Down Expand Up @@ -162,4 +170,4 @@ bindgen-static = ["bindgen/static"]
bindgen-runtime = ["bindgen/runtime"]

# List all features here, that are not in a exclusive or relationship
all-features-but-xor = []
all-features-but-xor = []
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[![Releases](https://img.shields.io/github/release/RedisLabsModules/redismodule-rs.svg)](https://github.com/RedisLabsModules/redismodule-rs/releases/latest)
[![crates.io](https://img.shields.io/crates/v/redis-module.svg)](https://crates.io/crates/redis-module)
[![docs](https://docs.rs/redis-module/badge.svg)](https://docs.rs/redis-module)
[![CircleCI](https://circleci.com/gh/RedisLabsModules/redismodule-rs/tree/master.svg?style=svg)](https://circleci.com/gh/RedisLabsModules/redismodule-rs/tree/master)

# redismodule-rs

Expand Down
6 changes: 3 additions & 3 deletions redismodule-rs-macros-internals/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "redis-module-macros-internals"
version = "99.99.99"
authors = ["Meir Shpilraien <[email protected]>"]
edition = "2021"
description = "A macros crate for redismodule-rs"
license = "BSD-3-Clause"
version.workspace = true
edition.workspace = true
license.workspace = true
repository = "https://github.com/RedisLabsModules/redismodule-rs"
keywords = ["redis", "plugin"]
categories = ["database", "api-bindings"]
Expand Down
8 changes: 3 additions & 5 deletions redismodule-rs-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "redis-module-macros"
version = "99.99.99"
version.workspace = true
edition.workspace = true
license.workspace = true
authors = ["Meir Shpilraien <[email protected]>"]
edition = "2021"
description = "A macros crate for redismodule-rs"
license = "BSD-3-Clause"
repository = "https://github.com/RedisLabsModules/redismodule-rs"
keywords = ["redis", "plugin"]
categories = ["database", "api-bindings"]
Expand All @@ -19,6 +19,4 @@ serde = { version = "1", features = ["derive"] }
serde_syn = "0.1.0"

[lib]
name = "redis_module_macros"
path = "src/lib.rs"
proc-macro = true
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2025-07-30"
channel = "1.90"
components = ["rustfmt", "clippy"]