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
11 changes: 7 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ version: 2
updates:
- package-ecosystem: cargo
directory: "/"
versioning-strategy: auto
schedule:
interval: weekly
day: friday
interval: monthly
time: "09:00"
timezone: Europe/Berlin
commit-message:
prefix: "chore"
cooldown:
default-days: 14
groups:
cargo:
patterns:
Expand All @@ -17,12 +19,13 @@ updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: friday
interval: monthly
time: "09:00"
timezone: Europe/Berlin
commit-message:
prefix: "chore"
cooldown:
default-days: 14
groups:
github-actions:
patterns:
Expand Down
41 changes: 12 additions & 29 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,25 @@ on:

jobs:
test:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: taiki-e/install-action@v2.87.3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
with:
tool: just
- run: echo "RUST_TOOLCHAIN=$(just rust-version)" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: debug-build
cache-shared-key: debug-build
- uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
- name: Test
run: just test

lint:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: taiki-e/install-action@v2.87.3
with:
tool: just
- run: |
echo "RUST_TOOLCHAIN=$(just rust-version)" >> $GITHUB_ENV
echo "RUST_TOOLCHAIN_NIGHTLY=$(just rust-nightly-version)" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: cp rust-toolchain-nightly.toml rust-toolchain.toml # use nightly
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
with:
toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }}
components: rustfmt
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
shared-key: debug-build
cache-shared-key: nightly-build
- uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
- name: Lint
run: just lint "strict"
run: just lint
18 changes: 7 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,18 @@ on:
jobs:
release:
name: Release
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: taiki-e/install-action@v2.87.3
- uses: actions-rust-lang/setup-rust-toolchain@ecabd13d1c56bd1345c230e542e9144811ad706f # v2.0.0
with:
tool: just
- run: |
echo "RUST_TOOLCHAIN=$(just rust-version)" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
cache-shared-key: release
- uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
uses: MarcoIeni/release-plz-action@b8d6b54b02889ff2ae2bb82e8b57c3a8fc1683a5 # v0.5.139
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
80 changes: 80 additions & 0 deletions .github/workflows/update-tools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Update Tool Versions

on:
schedule:
- cron: '0 7 1 * *' # Runs at 7 AM on the 1st of every month
workflow_dispatch: # Allow manual triggering

jobs:
update-rust:
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Get latest Rust version
id: get-rust-version
run: |
set -o pipefail
LATEST_RUST_VERSION=$(curl -s https://api.github.com/repos/rust-lang/rust/releases/latest | jq -r .tag_name | sed 's/^v//')
echo "latest_version=$LATEST_RUST_VERSION" >> $GITHUB_OUTPUT
CURRENT_RUST_VERSION=$(grep 'channel' rust-toolchain.toml | sed -E 's/channel *= *"([^"]+)".*/\1/')
echo "current_version=$CURRENT_RUST_VERSION" >> $GITHUB_OUTPUT
# Get current date for nightly
CURRENT_DATE=$(date +"%Y-%m-%d")
echo "nightly_date=$CURRENT_DATE" >> $GITHUB_OUTPUT
# Get current nightly version
CURRENT_NIGHTLY_VERSION=$(grep 'channel' rust-toolchain-nightly.toml | sed -E 's/channel *= *"([^"]+)".*/\1/')
echo "current_nightly_version=$CURRENT_NIGHTLY_VERSION" >> $GITHUB_OUTPUT
- name: Update Rust version in rust-toolchain.toml
if: steps.get-rust-version.outputs.current_version != steps.get-rust-version.outputs.latest_version
run: |
sed -i 's/channel = "[^"]*"/channel = "${{ steps.get-rust-version.outputs.latest_version }}"/g' rust-toolchain.toml
sed -i 's/channel = "[^"]*"/channel = "nightly-${{ steps.get-rust-version.outputs.nightly_date }}"/g' rust-toolchain-nightly.toml
- name: Create Pull Request for Rust
if: steps.get-rust-version.outputs.current_version != steps.get-rust-version.outputs.latest_version
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
commit-message: "chore: update Rust versions"
title: "chore: update Rust versions"
body: |
This PR includes the following changes:

- Update stable Rust version to ${{ steps.get-rust-version.outputs.latest_version }}
- Update nightly Rust version to nightly-${{ steps.get-rust-version.outputs.nightly_date }}

This is an automated PR created by the update-tools GitHub Action.
branch: update-rust-version
token: ${{ secrets.BOT_ACCOUNT_PAT }}
delete-branch: true

update-mise-tools:
runs-on: ubuntu-24.04
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0
with:
install: false
minimum_release_age: 14d
- name: Update mise-managed tools
run: mise upgrade --local --bump --yes
- name: Create Pull Request for mise tools
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
commit-message: "chore: update mise-managed tools"
title: "chore: update mise-managed tools"
body: |
This PR updates non-Rust tool versions in `mise.toml` using:

```bash
mise upgrade --local --bump --yes
```

This is an automated PR created by the update-tools GitHub Action.
branch: update-mise-tools
token: ${{ secrets.BOT_ACCOUNT_PAT }}
delete-branch: true
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ version = "0.0.2"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/moia-oss/tinybitset"
homepage = "https://github.com/moia-oss/tinybitset"
categories = ["data-structures"]
keywords = ["bitset", "stack", "small", "data-structure"]

Expand Down
16 changes: 2 additions & 14 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,11 @@ set quiet
rust_version := `sed -nr 's/channel = "(.*)"/\1/p' rust-toolchain.toml`
rust_nightly_version := `sed -nr 's/channel = "(.*)"/\1/p' rust-toolchain-nightly.toml`

rust-version:
echo '{{rust_version}}'

rust-nightly-version:
echo '{{rust_nightly_version}}'

test:
cargo test --workspace --all-targets --all-features
cargo test --workspace --doc

lint strict="":
lint:
cargo '+{{rust_nightly_version}}' fmt -- --check
cargo clippy \
--workspace \
Expand All @@ -28,14 +22,8 @@ lint strict="":
--all-targets \
--all-features \
--quiet \
-- {{ if strict != "" { "-D warnings" } else { "" } }}
-- -D warnings
cargo doc --all --no-deps --document-private-items --all-features --quiet

fmt:
cargo '+{{rust_nightly_version}}' fmt

udeps:
cargo '+{{rust_nightly_version}}' udeps

install-nightly:
rustup toolchain install '{{rust_nightly_version}}'
6 changes: 6 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[tools]
just = "1.58.0"
pinact = "5.0.0"

[settings]
minimum_release_age = "14d"
2 changes: 1 addition & 1 deletion rust-toolchain-nightly.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-09-06"
channel = "nightly-2026-09-24"
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.81.0"
channel = "1.98.1"