mirror of
https://github.com/fafhrd91/actix-net
synced 2024-12-04 20:31:56 +01:00
Upgrade GHA workflows to remove deprecation warnings (#477)
This commit is contained in:
parent
d13461b337
commit
045cf3f3e8
113
.github/workflows/ci-master.yml
vendored
113
.github/workflows/ci-master.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
if: matrix.target.os == 'macos-latest'
|
if: matrix.target.os == 'macos-latest'
|
||||||
run: sudo ifconfig lo0 alias 127.0.0.3
|
run: sudo ifconfig lo0 alias 127.0.0.3
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
# install OpenSSL on Windows
|
# install OpenSSL on Windows
|
||||||
- name: Set vcpkg root
|
- name: Set vcpkg root
|
||||||
@ -43,11 +43,10 @@ jobs:
|
|||||||
run: vcpkg install openssl:x86-windows
|
run: vcpkg install openssl:x86-windows
|
||||||
|
|
||||||
- name: Install ${{ matrix.version }}
|
- name: Install ${{ matrix.version }}
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }}
|
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||||
profile: minimal
|
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||||
override: true
|
|
||||||
|
|
||||||
# - name: Install MSYS2
|
# - name: Install MSYS2
|
||||||
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
|
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
|
||||||
@ -59,43 +58,34 @@ jobs:
|
|||||||
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
|
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
|
||||||
|
|
||||||
# - name: Generate Cargo.lock
|
# - name: Generate Cargo.lock
|
||||||
# uses: actions-rs/cargo@v1
|
# run: cargo generate-lockfile
|
||||||
# with: { command: generate-lockfile }
|
|
||||||
# - name: Cache Dependencies
|
# - name: Cache Dependencies
|
||||||
# uses: Swatinem/rust-cache@v1.2.0
|
# uses: Swatinem/rust-cache@v2.2.0
|
||||||
|
|
||||||
- name: Install cargo-hack
|
- name: Install cargo-hack
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo install cargo-hack
|
||||||
with:
|
|
||||||
command: install
|
|
||||||
args: cargo-hack
|
|
||||||
|
|
||||||
- name: check lib
|
- name: check lib
|
||||||
if: >
|
if: >
|
||||||
matrix.target.os != 'ubuntu-latest'
|
matrix.target.os != 'ubuntu-latest'
|
||||||
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
|
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check-lib
|
||||||
with: { command: ci-check-lib }
|
|
||||||
- name: check lib
|
- name: check lib
|
||||||
if: matrix.target.os == 'ubuntu-latest'
|
if: matrix.target.os == 'ubuntu-latest'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check-lib-linux
|
||||||
with: { command: ci-check-lib-linux }
|
|
||||||
- name: check lib
|
- name: check lib
|
||||||
if: matrix.target.triple == 'x86_64-pc-windows-gnu'
|
if: matrix.target.triple == 'x86_64-pc-windows-gnu'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check-min
|
||||||
with: { command: ci-check-min }
|
|
||||||
|
|
||||||
- name: check full
|
- name: check full
|
||||||
# TODO: compile OpenSSL and run tests on MinGW
|
# TODO: compile OpenSSL and run tests on MinGW
|
||||||
if: >
|
if: >
|
||||||
matrix.target.os != 'ubuntu-latest'
|
matrix.target.os != 'ubuntu-latest'
|
||||||
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
|
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check
|
||||||
with: { command: ci-check }
|
|
||||||
- name: check all
|
- name: check all
|
||||||
if: matrix.target.os == 'ubuntu-latest'
|
if: matrix.target.os == 'ubuntu-latest'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check-linux
|
||||||
with: { command: ci-check-linux }
|
|
||||||
|
|
||||||
- name: tests
|
- name: tests
|
||||||
if: >
|
if: >
|
||||||
@ -116,20 +106,18 @@ jobs:
|
|||||||
name: coverage
|
name: coverage
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust (nightly)
|
- name: Install Rust (nightly)
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: nightly
|
rustup install nightly
|
||||||
profile: minimal
|
rustup override set nightly
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Generate Cargo.lock
|
- name: Generate Cargo.lock
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with: { command: generate-lockfile }
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1.3.0
|
uses: Swatinem/rust-cache@v2.2.0
|
||||||
|
|
||||||
- name: Generate coverage file
|
- name: Generate coverage file
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
@ -138,73 +126,54 @@ jobs:
|
|||||||
cargo tarpaulin --out Xml --verbose
|
cargo tarpaulin --out Xml --verbose
|
||||||
- name: Upload to Codecov
|
- name: Upload to Codecov
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v3
|
||||||
with: { file: cobertura.xml }
|
with: { files: cobertura.xml }
|
||||||
|
|
||||||
minimal-versions:
|
minimal-versions:
|
||||||
name: minimal versions
|
name: minimal versions
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust (nightly)
|
- name: Install Rust (nightly)
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: nightly
|
rustup install nightly
|
||||||
profile: minimal
|
rustup override set nightly
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Generate Cargo.lock
|
- name: Generate Cargo.lock
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with: { command: generate-lockfile }
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1.3.0
|
uses: Swatinem/rust-cache@v2.2.0
|
||||||
|
|
||||||
- name: Install cargo-minimal-versions
|
- name: Install cargo-minimal-versions
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo install cargo-minimal-versions
|
||||||
with:
|
|
||||||
command: install
|
|
||||||
args: cargo-minimal-versions
|
|
||||||
|
|
||||||
- name: Install cargo-hack
|
- name: Install cargo-hack
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo install cargo-hack
|
||||||
with:
|
|
||||||
command: install
|
|
||||||
args: cargo-hack
|
|
||||||
|
|
||||||
- name: Check With Minimal Versions
|
- name: Check With Minimal Versions
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo minimal-versions check
|
||||||
with:
|
|
||||||
command: minimal-versions
|
|
||||||
args: check
|
|
||||||
|
|
||||||
nextest:
|
nextest:
|
||||||
name: nextest
|
name: nextest
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: stable
|
rustup install stable
|
||||||
profile: minimal
|
rustup override set stable
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Generate Cargo.lock
|
- name: Generate Cargo.lock
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with: { command: generate-lockfile }
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1.3.0
|
uses: Swatinem/rust-cache@v2.2.0
|
||||||
|
|
||||||
- name: Install cargo-nextest
|
- name: Install cargo-nextest
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo install cargo-nextest
|
||||||
with:
|
|
||||||
command: install
|
|
||||||
args: cargo-nextest
|
|
||||||
|
|
||||||
- name: Test with cargo-nextest
|
- name: Test with cargo-nextest
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo nextest run
|
||||||
with:
|
|
||||||
command: nextest
|
|
||||||
args: run
|
|
||||||
|
50
.github/workflows/ci.yml
vendored
50
.github/workflows/ci.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
if: matrix.target.os == 'macos-latest'
|
if: matrix.target.os == 'macos-latest'
|
||||||
run: sudo ifconfig lo0 alias 127.0.0.3
|
run: sudo ifconfig lo0 alias 127.0.0.3
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
# install OpenSSL on Windows
|
# install OpenSSL on Windows
|
||||||
- name: Set vcpkg root
|
- name: Set vcpkg root
|
||||||
@ -46,11 +46,10 @@ jobs:
|
|||||||
run: vcpkg install openssl:x86-windows
|
run: vcpkg install openssl:x86-windows
|
||||||
|
|
||||||
- name: Install ${{ matrix.version }}
|
- name: Install ${{ matrix.version }}
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }}
|
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||||
profile: minimal
|
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
|
||||||
override: true
|
|
||||||
|
|
||||||
# - name: Install MSYS2
|
# - name: Install MSYS2
|
||||||
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
|
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
|
||||||
@ -62,10 +61,9 @@ jobs:
|
|||||||
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
|
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
|
||||||
|
|
||||||
# - name: Generate Cargo.lock
|
# - name: Generate Cargo.lock
|
||||||
# uses: actions-rs/cargo@v1
|
# run: cargo generate-lockfile
|
||||||
# with: { command: generate-lockfile }
|
|
||||||
# - name: Cache Dependencies
|
# - name: Cache Dependencies
|
||||||
# uses: Swatinem/rust-cache@v1.2.0
|
# uses: Swatinem/rust-cache@v2.2.0
|
||||||
|
|
||||||
- name: Install cargo-hack
|
- name: Install cargo-hack
|
||||||
if: matrix.version != '1.59.0'
|
if: matrix.version != '1.59.0'
|
||||||
@ -84,8 +82,7 @@ jobs:
|
|||||||
cargo add env_logger@0.9 --dev -p=actix-server
|
cargo add env_logger@0.9 --dev -p=actix-server
|
||||||
|
|
||||||
- name: Generate Cargo.lock
|
- name: Generate Cargo.lock
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with: { command: generate-lockfile }
|
|
||||||
|
|
||||||
- name: workaround MSRV issues
|
- name: workaround MSRV issues
|
||||||
if: matrix.version != 'stable'
|
if: matrix.version != 'stable'
|
||||||
@ -96,28 +93,23 @@ jobs:
|
|||||||
if: >
|
if: >
|
||||||
matrix.target.os != 'ubuntu-latest'
|
matrix.target.os != 'ubuntu-latest'
|
||||||
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
|
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check-lib
|
||||||
with: { command: ci-check-lib }
|
|
||||||
- name: check lib
|
- name: check lib
|
||||||
if: matrix.target.os == 'ubuntu-latest'
|
if: matrix.target.os == 'ubuntu-latest'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check-lib-linux
|
||||||
with: { command: ci-check-lib-linux }
|
|
||||||
- name: check lib
|
- name: check lib
|
||||||
if: matrix.target.triple == 'x86_64-pc-windows-gnu'
|
if: matrix.target.triple == 'x86_64-pc-windows-gnu'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check-min
|
||||||
with: { command: ci-check-min }
|
|
||||||
|
|
||||||
- name: check full
|
- name: check full
|
||||||
# TODO: compile OpenSSL and run tests on MinGW
|
# TODO: compile OpenSSL and run tests on MinGW
|
||||||
if: >
|
if: >
|
||||||
matrix.target.os != 'ubuntu-latest'
|
matrix.target.os != 'ubuntu-latest'
|
||||||
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
|
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check
|
||||||
with: { command: ci-check }
|
|
||||||
- name: check all
|
- name: check all
|
||||||
if: matrix.target.os == 'ubuntu-latest'
|
if: matrix.target.os == 'ubuntu-latest'
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo ci-check-linux
|
||||||
with: { command: ci-check-linux }
|
|
||||||
|
|
||||||
- name: tests
|
- name: tests
|
||||||
if: matrix.target.os == 'macos-latest'
|
if: matrix.target.os == 'macos-latest'
|
||||||
@ -143,20 +135,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust (nightly)
|
- name: Install Rust (nightly)
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: nightly-x86_64-unknown-linux-gnu
|
rustup install nightly
|
||||||
profile: minimal
|
rustup override set nightly
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Generate Cargo.lock
|
- name: Generate Cargo.lock
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo generate-lockfile
|
||||||
with: { command: generate-lockfile }
|
|
||||||
- name: Cache Dependencies
|
- name: Cache Dependencies
|
||||||
uses: Swatinem/rust-cache@v1.3.0
|
uses: Swatinem/rust-cache@v2.2.0
|
||||||
|
|
||||||
- name: doc tests io-uring
|
- name: doc tests io-uring
|
||||||
run: |
|
run: |
|
||||||
|
39
.github/workflows/clippy-fmt.yml
vendored
39
.github/workflows/clippy-fmt.yml
vendored
@ -8,35 +8,30 @@ jobs:
|
|||||||
fmt:
|
fmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: stable
|
rustup install stable
|
||||||
profile: minimal
|
rustup override set stable
|
||||||
components: rustfmt
|
rustup component add rustfmt
|
||||||
override: true
|
|
||||||
- name: Rustfmt Check
|
- name: Rustfmt Check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo fmt --all -- --check
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --all -- --check
|
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
|
rustup set profile minimal
|
||||||
|
rustup install stable
|
||||||
|
rustup override set stable
|
||||||
|
rustup component add clippy
|
||||||
|
- uses: giraffate/clippy-action@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
reporter: "github-pr-check"
|
||||||
profile: minimal
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
components: clippy
|
clippy_flags: --workspace --all-features --tests --examples --bins -- -Dclippy::todo
|
||||||
override: true
|
|
||||||
- name: Clippy Check
|
|
||||||
uses: actions-rs/clippy-check@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --workspace --all-features --tests --examples --bins -- -Dclippy::todo
|
|
||||||
|
22
.github/workflows/upload-doc.yml
vendored
22
.github/workflows/upload-doc.yml
vendored
@ -9,27 +9,21 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
run: |
|
||||||
with:
|
rustup set profile minimal
|
||||||
toolchain: nightly-x86_64-unknown-linux-gnu
|
rustup install nightly
|
||||||
profile: minimal
|
rustup override set nightly
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Build Docs
|
- name: Build Docs
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo doc --workspace --all-features --no-deps
|
||||||
with:
|
|
||||||
command: doc
|
|
||||||
args: --workspace --all-features --no-deps
|
|
||||||
|
|
||||||
- name: Tweak HTML
|
- name: Tweak HTML
|
||||||
run: echo '<meta http-equiv="refresh" content="0;url=actix_server/index.html">' > target/doc/index.html
|
run: echo '<meta http-equiv="refresh" content="0;url=actix_server/index.html">' > target/doc/index.html
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
uses: JamesIves/github-pages-deploy-action@v4
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
folder: target/doc
|
||||||
BRANCH: gh-pages
|
|
||||||
FOLDER: target/doc
|
|
||||||
|
Loading…
Reference in New Issue
Block a user