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
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ on:
push:
paths:
- "**/Cargo.toml"
- "rust-toolchain.toml"
- ".github/workflows/publish.yml"
tags:
- "v*"
pull_request:
paths:
- "**/Cargo.toml"
- "rust-toolchain.toml"
- ".github/workflows/publish.yml"

permissions:
Expand All @@ -21,9 +23,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: stable
- name: Install pinned Rust toolchain
run: rustc --version --verbose
- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
- name: Verify workspace packaging
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/sqlx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose
- run: cargo fmt --all -- --check

check:
Expand All @@ -22,10 +24,8 @@ jobs:
tls: [native-tls, rustls]
steps:
- uses: actions/checkout@v6
- name: Install pinned Clippy toolchain
uses: dtolnay/rust-toolchain@ce678459e9fc7500d337468f904b95f1b5c10b5e
with:
components: clippy
- name: Install pinned Rust toolchain
run: rustc --version --verbose
- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
prefix-key: v1-sqlx
Expand Down Expand Up @@ -58,6 +58,8 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose
- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
prefix-key: v1-sqlx
Expand Down Expand Up @@ -90,6 +92,8 @@ jobs:

steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose
- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
prefix-key: v1-sqlx
Expand All @@ -113,6 +117,8 @@ jobs:
needs: check
steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose
- run: mkdir /tmp/sqlite3-lib && wget -O /tmp/sqlite3-lib/ipaddr.so https://github.com/nalgeon/sqlean/releases/download/0.15.2/ipaddr.so
- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
Expand Down Expand Up @@ -143,6 +149,8 @@ jobs:
needs: check
steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose

- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
Expand Down Expand Up @@ -192,6 +200,8 @@ jobs:
needs: check
steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose
- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
prefix-key: v1-sqlx
Expand All @@ -213,6 +223,8 @@ jobs:
needs: check
steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose

- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
Expand Down Expand Up @@ -255,6 +267,8 @@ jobs:
needs: check
steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose

- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
Expand Down Expand Up @@ -290,6 +304,8 @@ jobs:
needs: check
steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose

- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
Expand Down Expand Up @@ -322,6 +338,8 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- name: Install pinned Rust toolchain
run: rustc --version --verbose
- uses: Swatinem/rust-cache@65012b490220f477f20ab979e35ae732e6de4e68
with:
prefix-key: v1-sqlx
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ You can use this document to figure out how and where to start.
- Include the database driver and version.
- Include the database version.

## Rust toolchain

Install Rust through [rustup](https://rustup.rs/). The checked-in
`rust-toolchain.toml` selects the same Rust, Clippy, and rustfmt versions locally
and in CI. Rustup installs that toolchain automatically when you run a Rust command
in this checkout. Update the version in a dedicated PR and run the full CI suite.

## Making changes

- Fork the repository on GitHub.
Expand Down
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.98.1"
profile = "minimal"
components = ["clippy", "rustfmt"]
Loading