Skip to content

Commit 87ec5b4

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 9da8d57 + 75386f4 commit 87ec5b4

File tree

49 files changed

+518
-397
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+518
-397
lines changed

.github/workflows/ci-post-merge.yml

Lines changed: 22 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: CI (post-merge)
22

33
on:
4-
push:
5-
branches: [master]
4+
push: { branches: [master] }
5+
6+
permissions: { contents: read }
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
611

712
jobs:
813
build_and_test_linux_nightly:
@@ -27,39 +32,26 @@ jobs:
2732
steps:
2833
- uses: actions/checkout@v3
2934

30-
- name: Install ${{ matrix.version }}
31-
uses: actions-rs/toolchain@v1
35+
- name: Install Rust (${{ matrix.version }})
36+
uses: actions-rust-lang/setup-rust-toolchain@v1
3237
with:
33-
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }}
34-
profile: minimal
35-
override: true
38+
toolchain: ${{ matrix.version }}
3639

37-
- name: Install cargo-hack
38-
uses: taiki-e/install-action@cargo-hack
39-
40-
- name: Generate Cargo.lock
41-
uses: actions-rs/cargo@v1
42-
with:
43-
command: generate-lockfile
44-
- name: Cache Dependencies
45-
uses: Swatinem/[email protected]
40+
- uses: taiki-e/cache-cargo-install-action@v1
41+
with: { tool: cargo-hack }
4642

4743
- name: check minimal
48-
uses: actions-rs/cargo@v1
49-
with: { command: ci-min }
44+
run: cargo ci-min
5045

5146
- name: check minimal + examples
52-
uses: actions-rs/cargo@v1
53-
with: { command: ci-check-min-examples }
47+
run: cargo ci-check-min-examples
5448

5549
- name: check default
56-
uses: actions-rs/cargo@v1
57-
with: { command: ci-check }
50+
run: cargo ci-check
5851

5952
- name: tests
60-
uses: actions-rs/cargo@v1
6153
timeout-minutes: 40
62-
with: { command: ci-test }
54+
run: cargo ci-test
6355

6456
- name: Clear the cargo caches
6557
run: |
@@ -86,18 +78,13 @@ jobs:
8678
steps:
8779
- uses: actions/checkout@v3
8880

89-
- name: Install ${{ matrix.version }}
90-
run: |
91-
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
92-
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
93-
94-
- name: Install cargo-hack
95-
uses: taiki-e/install-action@cargo-hack
81+
- name: Install Rust (${{ matrix.version }})
82+
uses: actions-rust-lang/setup-rust-toolchain@v1
83+
with:
84+
toolchain: ${{ matrix.version }}
9685

97-
- name: Generate Cargo.lock
98-
run: cargo generate-lockfile
99-
- name: Cache Dependencies
100-
uses: Swatinem/[email protected]
86+
- uses: taiki-e/cache-cargo-install-action@v1
87+
with: { tool: cargo-hack }
10188

10289
- name: check minimal
10390
run: cargo ci-min

.github/workflows/ci.yml

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

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

913
jobs:
1014
build_and_test_linux:
@@ -14,7 +18,7 @@ jobs:
1418
target:
1519
- { name: Linux, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
1620
version:
17-
- 1.59 # MSRV
21+
- '1.60' # MSRV
1822
- stable
1923

2024
name: ${{ matrix.target.name }} / ${{ matrix.version }}
@@ -35,18 +39,19 @@ jobs:
3539
steps:
3640
- uses: actions/checkout@v3
3741

38-
- name: Install ${{ matrix.version }}
39-
run: |
40-
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
41-
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
42+
- name: Install Rust (${{ matrix.version }})
43+
uses: actions-rust-lang/setup-rust-toolchain@v1
44+
with:
45+
toolchain: ${{ matrix.version }}
4246

4347
- name: Install cargo-hack
44-
uses: taiki-e/install-action@cargo-hack
48+
uses: taiki-e/cache-cargo-install-action@v1
49+
with: { tool: cargo-hack }
4550

46-
- name: Generate Cargo.lock
47-
run: cargo generate-lockfile
48-
- name: Cache Dependencies
49-
uses: Swatinem/[email protected]
51+
- name: workaround MSRV issues
52+
if: matrix.version != 'stable'
53+
run: |
54+
cargo update -p=time:0.3.20 --precise=0.3.16
5055
5156
- name: check minimal
5257
run: cargo ci-min
@@ -78,7 +83,7 @@ jobs:
7883
triple: x86_64-pc-windows-msvc,
7984
}
8085
version:
81-
- 1.59 # MSRV
86+
- '1.60' # MSRV
8287
- stable
8388

8489
name: ${{ matrix.target.name }} / ${{ matrix.version }}
@@ -87,18 +92,19 @@ jobs:
8792
steps:
8893
- uses: actions/checkout@v3
8994

90-
- name: Install ${{ matrix.version }}
91-
run: |
92-
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
93-
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
95+
- name: Install Rust (${{ matrix.version }})
96+
uses: actions-rust-lang/setup-rust-toolchain@v1
97+
with:
98+
toolchain: ${{ matrix.version }}
9499

95100
- name: Install cargo-hack
96-
uses: taiki-e/install-action@cargo-hack
101+
uses: taiki-e/cache-cargo-install-action@v1
102+
with: { tool: cargo-hack }
97103

98-
- name: Generate Cargo.lock
99-
run: cargo generate-lockfile
100-
- name: Cache Dependencies
101-
uses: Swatinem/[email protected]
104+
- name: workaround MSRV issues
105+
if: matrix.version != 'stable'
106+
run: |
107+
cargo update -p=time:0.3.20 --precise=0.3.16
102108
103109
- name: check minimal
104110
run: cargo ci-min
@@ -125,14 +131,8 @@ jobs:
125131
- uses: actions/checkout@v3
126132

127133
- name: Install Rust (nightly)
128-
run: |
129-
rustup install nightly
130-
rustup override set nightly
131-
132-
- name: Generate Cargo.lock
133-
run: cargo generate-lockfile
134-
- name: Cache Dependencies
135-
uses: Swatinem/[email protected]
134+
uses: actions-rust-lang/setup-rust-toolchain@v1
135+
with: { toolchain: nightly }
136136

137137
- name: doc tests
138138
timeout-minutes: 40

.github/workflows/coverage.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
# disabled because `cargo tarpaulin` currently segfaults
2-
31
name: Coverage
42

53
on:
6-
push:
7-
branches: [master]
4+
push: { branches: [master] }
5+
6+
permissions: { contents: read }
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
811

912
jobs:
1013
coverage:
@@ -20,20 +23,15 @@ jobs:
2023
steps:
2124
- uses: actions/checkout@v3
2225

23-
- name: Install stable
24-
run: |
25-
rustup override set stable
26-
rustup update stable
27-
28-
- name: Generate Cargo.lock
29-
run: cargo generate-lockfile
30-
- name: Cache Dependencies
31-
uses: Swatinem/[email protected]
26+
- name: Install Rust (nightly)
27+
uses: actions-rust-lang/setup-rust-toolchain@v1
28+
with: { toolchain: nightly }
3229

3330
- name: Generate coverage file
3431
run: |
3532
cargo install cargo-tarpaulin --vers "^0.13"
3633
cargo tarpaulin --workspace --out Xml --verbose
34+
3735
- name: Upload to Codecov
3836
uses: codecov/codecov-action@v3
3937
with: { file: cobertura.xml }

.github/workflows/lint.yml

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

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

711
jobs:
812
fmt:
913
runs-on: ubuntu-latest
1014
steps:
1115
- uses: actions/checkout@v3
1216

13-
- name: Install Rust
14-
run: |
15-
rustup override set nightly
16-
rustup update nightly
17-
rustup component add rustfmt
17+
- name: Install Rust (nightly)
18+
uses: actions-rust-lang/setup-rust-toolchain@v1
19+
with:
20+
toolchain: nightly
21+
components: rustfmt
22+
1823
- name: Check with rustfmt
1924
run: cargo fmt --all -- --check
2025

@@ -24,9 +29,35 @@ jobs:
2429
- uses: actions/checkout@v3
2530

2631
- name: Install Rust
27-
run: |
28-
rustup override set stable
29-
rustup update stable
30-
rustup component add rustfmt
32+
uses: actions-rust-lang/setup-rust-toolchain@v1
33+
with: { components: clippy }
34+
3135
- name: Check with Clippy
3236
run: cargo clippy --workspace --tests --all-features
37+
38+
public-api-diff:
39+
runs-on: ubuntu-latest
40+
steps:
41+
- name: checkout ${{ github.base_ref }}
42+
uses: actions/checkout@v3
43+
with:
44+
ref: ${{ github.base_ref }}
45+
46+
- name: checkout ${{ github.head_ref }}
47+
uses: actions/checkout@v3
48+
49+
- name: Install Rust (nightly)
50+
uses: actions-rust-lang/setup-rust-toolchain@v1
51+
with: { toolchain: nightly }
52+
53+
- name: Install cargo-public-api
54+
uses: taiki-e/cache-cargo-install-action@v1
55+
with: { tool: cargo-public-api }
56+
57+
- name: generate API diff
58+
run: |
59+
for f in $(find -mindepth 2 -maxdepth 2 -name Cargo.toml); do
60+
61+
cargo public-api --manifest-path "$f" --all-features diff ${{ github.event.pull_request.base.sha }}..${{ github.sha }} >> /tmp/diff.txt
62+
done
63+
cat /tmp/diff.txt

.github/workflows/upload-doc.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
name: Upload Documentation
22

33
on:
4-
push:
5-
branches: [master]
4+
push: { branches: [master] }
5+
6+
permissions: { contents: write }
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
611

712
jobs:
813
build:
@@ -11,10 +16,9 @@ jobs:
1116
steps:
1217
- uses: actions/checkout@v3
1318

14-
- name: Install Rust
15-
run: |
16-
rustup override set nightly
17-
rustup update nightly
19+
- name: Install Rust (nightly)
20+
uses: actions-rust-lang/setup-rust-toolchain@v1
21+
with: { toolchain: nightly }
1822

1923
- name: Build Docs
2024
run: cargo doc --workspace --all-features --no-deps

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ members = [
1111
"actix-web-httpauth",
1212
]
1313

14+
# TODO(MSRV 1.64)
15+
# [workspace.package]
16+
# edition = "2018"
17+
# rust-version = "1.60"
18+
1419
[patch.crates-io]
1520
actix-cors = { path = "./actix-cors" }
1621
actix-identity = { path = "./actix-identity" }

0 commit comments

Comments
 (0)