Skip to content

Commit

Permalink
ci: Set default rust toolchain to MSRV for MSRV job (#555)
Browse files Browse the repository at this point in the history
* ci: Set default rust toolchain to MSRV for MSRV job

* Update .github/workflows/ci.yml
  • Loading branch information
kamilogorek committed Feb 24, 2023
1 parent 3437977 commit 569b0d9
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 35 deletions.
29 changes: 10 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy --no-self-update
- run: rustup component add rustfmt clippy

- uses: Swatinem/rust-cache@v2

Expand All @@ -30,20 +30,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]

name: Check feature permutations using Rust ${{ matrix.rust }} on ${{ matrix.os }}
name: Check feature permutations using Rust stable on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
RUSTFLAGS: -Dwarnings

steps:
- name: Checkout sources
uses: actions/checkout@v3

- run: rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update

- uses: Swatinem/rust-cache@v2

- run: make checkall
Expand All @@ -53,17 +47,14 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable]

name: Test using Rust ${{ matrix.rust }} on ${{ matrix.os }}
name: Test using Rust stable on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout sources
uses: actions/checkout@v3

- run: rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update

- uses: Swatinem/rust-cache@v2

- name: Run cargo test
Expand All @@ -74,19 +65,19 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [1.60.0]
rust: [1.66.0]

name: Check / Test MSRV on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

env:
RUSTFLAGS: -Dwarnings

steps:
- name: Checkout sources
uses: actions/checkout@v3

- run: rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update
- name: Install rust ${{ matrix.rust }} toolchain
run: |
rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update
rustup default ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2

Expand All @@ -101,7 +92,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- run: rustup toolchain install stable --profile minimal --component llvm-tools-preview --no-self-update
- run: rustup component add llvm-tools-preview

- uses: Swatinem/rust-cache@v2

Expand All @@ -123,7 +114,7 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v3

- run: rustup toolchain install stable --profile minimal --component rust-docs --no-self-update
- run: rustup component add rust-docs

- uses: Swatinem/rust-cache@v2

Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,14 @@ best API and adding new features.
We currently only verify this crate against a recent version of Sentry hosted on [sentry.io](https://sentry.io/) but it
should work with on-prem Sentry versions 20.6 and later.

The **Minimum Supported Rust Version** is currently at _1.60.0_.
The Sentry crates will support a _6 month_ old Rust version at time of release,
The **Minimum Supported Rust Version** is currently at _1.66.0_.
The Sentry crates will support a _6 months_ old Rust version at time of release,
and the MSRV will be increased in accordance with its dependencies.

**Note**: Due to the misconfiguration in our workflow that verified the MSRV builds,
we had to bump it all the way to _1.66.0_, breaking our own _6 months_ old rule.
As of version _0.30.0_, the workflow has been fixed, and the MSRV will be enforced correctly.

## Resources

- [Discord](https://discord.gg/ez5KZN7) server for project discussions.
Expand Down
2 changes: 1 addition & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
msrv = "1.60.0"
msrv = "1.66.0"
2 changes: 1 addition & 1 deletion sentry-actix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry client extension for actix-web 3.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[dependencies]
actix-web = { version = "4", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion sentry-anyhow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry integration for anyhow.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[features]
default = ["backtrace"]
Expand Down
2 changes: 1 addition & 1 deletion sentry-backtrace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry integration and utilities for dealing with stacktraces.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[dependencies]
backtrace = "0.3.44"
Expand Down
2 changes: 1 addition & 1 deletion sentry-contexts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Sentry integration for os, device, and rust contexts.
"""
build = "build.rs"
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[dependencies]
sentry-core = { version = "0.29.3", path = "../sentry-core" }
Expand Down
2 changes: 1 addition & 1 deletion sentry-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Core sentry library used for instrumentation and integration development.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion sentry-debug-images/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry integration that adds the list of loaded libraries to events.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[dependencies]
findshlibs = "=0.10.2"
Expand Down
2 changes: 1 addition & 1 deletion sentry-log/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry integration for log and env_logger crates.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[dependencies]
sentry-core = { version = "0.29.3", path = "../sentry-core" }
Expand Down
2 changes: 1 addition & 1 deletion sentry-panic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry integration for capturing panics.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[dependencies]
sentry-core = { version = "0.29.3", path = "../sentry-core" }
Expand Down
2 changes: 1 addition & 1 deletion sentry-slog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry integration for the slog crate.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[dependencies]
sentry-core = { version = "0.29.3", path = "../sentry-core" }
Expand Down
2 changes: 1 addition & 1 deletion sentry-tower/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry integration for tower-based crates.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[features]
http = ["dep:http", "pin-project", "url"]
Expand Down
2 changes: 1 addition & 1 deletion sentry-tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry integration for tracing and tracing-subscriber crates.
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[dependencies]
sentry-core = { version = "0.29.3", path = "../sentry-core", features = ["client"] }
Expand Down
2 changes: 1 addition & 1 deletion sentry-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Common reusable types for implementing the sentry.io protocol.
"""
keywords = ["sentry", "protocol"]
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion sentry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = """
Sentry (getsentry.com) client for rust ;)
"""
edition = "2021"
rust-version = "1.60"
rust-version = "1.66"
autoexamples = true

# To build locally:
Expand Down

0 comments on commit 569b0d9

Please sign in to comment.