Skip to content

Commit c0693da

Browse files
authored
update msrv to 1.60 (#482
* update msrv to 1.60 * inherit workspace msrv
1 parent 28f36e4 commit c0693da

File tree

29 files changed

+110
-193
lines changed

29 files changed

+110
-193
lines changed

.github/workflows/ci-master.yml

Lines changed: 22 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ on:
44
push:
55
branches: [master]
66

7+
permissions:
8+
contents: read
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
714
jobs:
815
build_and_test_nightly:
916
strategy:
@@ -21,8 +28,7 @@ jobs:
2128
name: ${{ matrix.target.name }} / ${{ matrix.version }}
2229
runs-on: ${{ matrix.target.os }}
2330

24-
env:
25-
VCPKGRS_DYNAMIC: 1
31+
env: {}
2632

2733
steps:
2834
- name: Setup Routing
@@ -31,36 +37,17 @@ jobs:
3137

3238
- uses: actions/checkout@v3
3339

34-
# install OpenSSL on Windows
35-
- name: Set vcpkg root
36-
if: matrix.target.triple == 'x86_64-pc-windows-msvc' || matrix.target.triple == 'i686-pc-windows-msvc'
37-
run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
38-
- name: Install OpenSSL
39-
if: matrix.target.triple == 'x86_64-pc-windows-msvc'
40-
run: vcpkg install openssl:x64-windows
4140
- name: Install OpenSSL
42-
if: matrix.target.triple == 'i686-pc-windows-msvc'
43-
run: vcpkg install openssl:x86-windows
41+
if: matrix.target.os == 'windows-latest'
42+
run: choco install openssl
43+
- name: Set OpenSSL dir in env
44+
if: matrix.target.os == 'windows-latest'
45+
run: echo 'OPENSSL_DIR=C:\Program Files\OpenSSL-Win64' | Out-File -FilePath $env:GITHUB_ENV -Append
4446

45-
- name: Install ${{ matrix.version }}
46-
run: |
47-
rustup set profile minimal
48-
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
49-
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
50-
51-
# - name: Install MSYS2
52-
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
53-
# uses: msys2/setup-msys2@v2
54-
# - name: Install MinGW Packages
55-
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
56-
# run: |
57-
# msys2 -c 'pacman -Sy --noconfirm pacman'
58-
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
59-
60-
# - name: Generate Cargo.lock
61-
# run: cargo generate-lockfile
62-
# - name: Cache Dependencies
63-
# uses: Swatinem/[email protected]
47+
- name: Install Rust (${{ matrix.version }})
48+
uses: actions-rust-lang/setup-rust-toolchain@v1
49+
with:
50+
toolchain: ${{ matrix.version }}
6451

6552
- name: Install cargo-hack
6653
run: cargo install cargo-hack
@@ -109,15 +96,8 @@ jobs:
10996
- uses: actions/checkout@v3
11097

11198
- name: Install Rust (nightly)
112-
run: |
113-
rustup set profile minimal
114-
rustup install nightly
115-
rustup override set nightly
116-
117-
- name: Generate Cargo.lock
118-
run: cargo generate-lockfile
119-
- name: Cache Dependencies
120-
uses: Swatinem/[email protected]
99+
uses: actions-rust-lang/setup-rust-toolchain@v1
100+
with: { toolchain: nightly }
121101

122102
- name: Generate coverage file
123103
if: github.ref == 'refs/heads/master'
@@ -136,15 +116,8 @@ jobs:
136116
- uses: actions/checkout@v3
137117

138118
- name: Install Rust (nightly)
139-
run: |
140-
rustup set profile minimal
141-
rustup install nightly
142-
rustup override set nightly
143-
144-
- name: Generate Cargo.lock
145-
run: cargo generate-lockfile
146-
- name: Cache Dependencies
147-
uses: Swatinem/[email protected]
119+
uses: actions-rust-lang/setup-rust-toolchain@v1
120+
with: { toolchain: nightly }
148121

149122
- name: Install cargo-minimal-versions
150123
run: cargo install cargo-minimal-versions
@@ -162,15 +135,7 @@ jobs:
162135
- uses: actions/checkout@v3
163136

164137
- name: Install Rust
165-
run: |
166-
rustup set profile minimal
167-
rustup install stable
168-
rustup override set stable
169-
170-
- name: Generate Cargo.lock
171-
run: cargo generate-lockfile
172-
- name: Cache Dependencies
173-
uses: Swatinem/[email protected]
138+
uses: actions-rust-lang/setup-rust-toolchain@v1
174139

175140
- name: Install cargo-nextest
176141
run: cargo install cargo-nextest

.github/workflows/ci.yml

Lines changed: 23 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
name: CI
22

3-
on:
4-
pull_request:
5-
types: [opened, synchronize, reopened]
6-
push:
7-
branches: [master]
3+
on:
4+
pull_request: {}
5+
push: { branches: [master] }
6+
7+
permissions:
8+
contents: read
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
813

914
jobs:
1015
build_and_test:
@@ -18,14 +23,13 @@ jobs:
1823
- { name: Windows (MinGW), os: windows-latest, triple: x86_64-pc-windows-gnu }
1924
- { name: Windows (32-bit), os: windows-latest, triple: i686-pc-windows-msvc }
2025
version:
21-
- 1.59.0
26+
- 1.60.0
2227
- stable
2328

2429
name: ${{ matrix.target.name }} / ${{ matrix.version }}
2530
runs-on: ${{ matrix.target.os }}
2631

27-
env:
28-
VCPKGRS_DYNAMIC: 1
32+
env: {}
2933

3034
steps:
3135
- name: Setup Routing
@@ -34,60 +38,28 @@ jobs:
3438

3539
- uses: actions/checkout@v3
3640

37-
# install OpenSSL on Windows
38-
- name: Set vcpkg root
39-
if: matrix.target.triple == 'x86_64-pc-windows-msvc' || matrix.target.triple == 'i686-pc-windows-msvc'
40-
run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
41-
- name: Install OpenSSL
42-
if: matrix.target.triple == 'x86_64-pc-windows-msvc'
43-
run: vcpkg install openssl:x64-windows
4441
- name: Install OpenSSL
45-
if: matrix.target.triple == 'i686-pc-windows-msvc'
46-
run: vcpkg install openssl:x86-windows
42+
if: matrix.target.os == 'windows-latest'
43+
run: choco install openssl
44+
- name: Set OpenSSL dir in env
45+
if: matrix.target.os == 'windows-latest'
46+
run: echo 'OPENSSL_DIR=C:\Program Files\OpenSSL-Win64' | Out-File -FilePath $env:GITHUB_ENV -Append
4747

4848
- name: Install ${{ matrix.version }}
49-
run: |
50-
rustup set profile minimal
51-
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
52-
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
53-
54-
# - name: Install MSYS2
55-
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
56-
# uses: msys2/setup-msys2@v2
57-
# - name: Install MinGW Packages
58-
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
59-
# run: |
60-
# msys2 -c 'pacman -Sy --noconfirm pacman'
61-
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
62-
63-
# - name: Generate Cargo.lock
64-
# run: cargo generate-lockfile
65-
# - name: Cache Dependencies
66-
# uses: Swatinem/[email protected]
49+
uses: actions-rust-lang/setup-rust-toolchain@v1
50+
with:
51+
toolchain: ${{ matrix.version }}
6752

6853
- name: Install cargo-hack
69-
if: matrix.version != '1.59.0'
7054
run: cargo install cargo-hack
7155

72-
# newer cargo-hack versions require 1.60 or above
73-
- name: Install cargo-hack (1.59.0)
74-
if: matrix.version == '1.59.0'
75-
run: cargo install cargo-hack --version=0.5.21
76-
77-
- name: workaround MSRV issues
78-
if: matrix.version == '1.59.0'
79-
run: |
80-
cargo install cargo-edit --version=0.8.0
81-
cargo add [email protected] --dev -p=actix-tls
82-
cargo add [email protected] --dev -p=actix-server
83-
8456
- name: Generate Cargo.lock
8557
run: cargo generate-lockfile
8658

8759
- name: workaround MSRV issues
8860
if: matrix.version != 'stable'
8961
run: |
90-
cargo update -p=time --precise=0.3.13 # time is only a dev dep so shouldn't affect msrv
62+
cargo update -p=time --precise=0.3.16 # time is only a dev dep so shouldn't affect msrv
9163
9264
- name: check lib
9365
if: >
@@ -125,7 +97,6 @@ jobs:
12597
sudo bash -c "ulimit -Sl 512 && ulimit -Hl 512 && PATH=$PATH:/usr/share/rust/.cargo/bin && RUSTUP_TOOLCHAIN=${{ matrix.version }} cargo ci-test && RUSTUP_TOOLCHAIN=${{ matrix.version }} cargo ci-test-linux"
12698
12799
- name: Clear the cargo caches
128-
if: matrix.version == 'stable' # MSRV(1.58) cargo-cache now fails to install on 1.59
129100
run: |
130101
cargo install cargo-cache --version 0.6.2 --no-default-features --features ci-autoclean
131102
cargo-cache
@@ -138,15 +109,8 @@ jobs:
138109
- uses: actions/checkout@v3
139110

140111
- name: Install Rust (nightly)
141-
run: |
142-
rustup set profile minimal
143-
rustup install nightly
144-
rustup override set nightly
145-
146-
- name: Generate Cargo.lock
147-
run: cargo generate-lockfile
148-
- name: Cache Dependencies
149-
uses: Swatinem/[email protected]
112+
uses: actions-rust-lang/setup-rust-toolchain@v1
113+
with: { toolchain: nightly }
150114

151115
- name: doc tests io-uring
152116
run: |

.github/workflows/clippy-fmt.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
11
name: Lint
22

3-
on:
4-
pull_request:
5-
types: [opened, synchronize, reopened]
3+
on: [pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
611

712
jobs:
813
fmt:
914
runs-on: ubuntu-latest
15+
1016
steps:
1117
- uses: actions/checkout@v3
1218

13-
- name: Install Rust
14-
run: |
15-
rustup set profile minimal
16-
rustup install stable
17-
rustup override set stable
18-
rustup component add rustfmt
19+
- uses: actions-rust-lang/setup-rust-toolchain@v1
20+
with:
21+
toolchain: nightly
22+
components: rustfmt
23+
1924
- name: Rustfmt Check
2025
run: cargo fmt --all -- --check
2126

2227
clippy:
28+
permissions:
29+
contents: write
30+
2331
runs-on: ubuntu-latest
32+
2433
steps:
2534
- uses: actions/checkout@v3
2635

27-
- name: Install Rust
28-
run: |
29-
rustup set profile minimal
30-
rustup install stable
31-
rustup override set stable
32-
rustup component add clippy
36+
- uses: actions-rust-lang/setup-rust-toolchain@v1
37+
with: { components: clippy }
38+
3339
- uses: giraffate/clippy-action@v1
3440
with:
35-
reporter: "github-pr-check"
41+
reporter: 'github-pr-check'
3642
github_token: ${{ secrets.GITHUB_TOKEN }}
3743
clippy_flags: --workspace --all-features --tests --examples --bins -- -Dclippy::todo

.github/workflows/upload-doc.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
name: Upload documentation
22

33
on:
4-
push:
5-
branches: [master]
4+
push: { branches: [master] }
65

76
jobs:
87
build:
8+
permissions:
9+
contents: write
10+
911
runs-on: ubuntu-latest
1012

1113
steps:
1214
- uses: actions/checkout@v3
1315

14-
- name: Install Rust
15-
run: |
16-
rustup set profile minimal
17-
rustup install nightly
18-
rustup override set nightly
16+
- uses: actions-rust-lang/setup-rust-toolchain@v1
17+
with: { toolchain: nightly }
1918

2019
- name: Build Docs
2120
run: cargo doc --workspace --all-features --no-deps

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ members = [
1212
"local-channel",
1313
"local-waker",
1414
]
15+
resolver = "2"
1516

1617
[patch.crates-io]
1718
actix-codec = { path = "actix-codec" }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ See example folders for [`actix-server`](./actix-server/examples) and [`actix-tl
1313

1414
## MSRV
1515

16-
Crates in this repo currently have a Minimum Supported Rust Version (MSRV) of 1.59. As a policy, we permit MSRV increases in non-breaking releases.
16+
Crates in this repo currently have a Minimum Supported Rust Version (MSRV) of 1.60. As a policy, we permit MSRV increases in non-breaking releases.
1717

1818
## License
1919

actix-codec/CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Unreleased - 2023-xx-xx
44

5-
- Minimum supported Rust version (MSRV) is now 1.59.
5+
- Minimum supported Rust version (MSRV) is now 1.60.
66

77
## 0.5.1 - 2022-03-15
88

actix-codec/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ keywords = ["network", "framework", "async", "futures"]
1010
repository = "https://github.com/actix/actix-net"
1111
categories = ["network-programming", "asynchronous"]
1212
license = "MIT OR Apache-2.0"
13-
edition = "2018"
14-
15-
[lib]
16-
name = "actix_codec"
17-
path = "src/lib.rs"
13+
edition = "2021"
14+
rust-version = "1.60"
1815

1916
[dependencies]
2017
bitflags = "1.2"

actix-macros/CHANGES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Unreleased - 2023-xx-xx
44

5-
- Minimum supported Rust version (MSRV) is now 1.59.
5+
- Minimum supported Rust version (MSRV) is now 1.60.
66

77
## 0.2.3 - 2021-10-19
88

0 commit comments

Comments
 (0)