1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-23 22:51:07 +01:00

Upgrade GHA workflows to remove deprecation warnings (#477)

This commit is contained in:
Yuki Okushi 2023-01-28 05:36:05 +09:00 committed by GitHub
parent d13461b337
commit 045cf3f3e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 88 additions and 140 deletions

View File

@ -29,7 +29,7 @@ jobs:
if: matrix.target.os == 'macos-latest'
run: sudo ifconfig lo0 alias 127.0.0.3
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# install OpenSSL on Windows
- name: Set vcpkg root
@ -43,11 +43,10 @@ jobs:
run: vcpkg install openssl:x86-windows
- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }}
profile: minimal
override: true
run: |
rustup set profile minimal
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
# - name: Install MSYS2
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
@ -59,43 +58,34 @@ jobs:
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
# - name: Generate Cargo.lock
# uses: actions-rs/cargo@v1
# with: { command: generate-lockfile }
# run: cargo generate-lockfile
# - name: Cache Dependencies
# uses: Swatinem/rust-cache@v1.2.0
# uses: Swatinem/rust-cache@v2.2.0
- name: Install cargo-hack
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-hack
run: cargo install cargo-hack
- name: check lib
if: >
matrix.target.os != 'ubuntu-latest'
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
uses: actions-rs/cargo@v1
with: { command: ci-check-lib }
run: cargo ci-check-lib
- name: check lib
if: matrix.target.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
with: { command: ci-check-lib-linux }
run: cargo ci-check-lib-linux
- name: check lib
if: matrix.target.triple == 'x86_64-pc-windows-gnu'
uses: actions-rs/cargo@v1
with: { command: ci-check-min }
run: cargo ci-check-min
- name: check full
# TODO: compile OpenSSL and run tests on MinGW
if: >
matrix.target.os != 'ubuntu-latest'
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
uses: actions-rs/cargo@v1
with: { command: ci-check }
run: cargo ci-check
- name: check all
if: matrix.target.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
with: { command: ci-check-linux }
run: cargo ci-check-linux
- name: tests
if: >
@ -116,20 +106,18 @@ jobs:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Rust (nightly)
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
run: |
rustup set profile minimal
rustup install nightly
rustup override set nightly
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with: { command: generate-lockfile }
run: cargo generate-lockfile
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1.3.0
uses: Swatinem/rust-cache@v2.2.0
- name: Generate coverage file
if: github.ref == 'refs/heads/master'
@ -138,73 +126,54 @@ jobs:
cargo tarpaulin --out Xml --verbose
- name: Upload to Codecov
if: github.ref == 'refs/heads/master'
uses: codecov/codecov-action@v1
with: { file: cobertura.xml }
uses: codecov/codecov-action@v3
with: { files: cobertura.xml }
minimal-versions:
name: minimal versions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Rust (nightly)
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
run: |
rustup set profile minimal
rustup install nightly
rustup override set nightly
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with: { command: generate-lockfile }
run: cargo generate-lockfile
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1.3.0
uses: Swatinem/rust-cache@v2.2.0
- name: Install cargo-minimal-versions
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-minimal-versions
run: cargo install cargo-minimal-versions
- name: Install cargo-hack
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-hack
run: cargo install cargo-hack
- name: Check With Minimal Versions
uses: actions-rs/cargo@v1
with:
command: minimal-versions
args: check
run: cargo minimal-versions check
nextest:
name: nextest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
run: |
rustup set profile minimal
rustup install stable
rustup override set stable
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with: { command: generate-lockfile }
run: cargo generate-lockfile
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1.3.0
uses: Swatinem/rust-cache@v2.2.0
- name: Install cargo-nextest
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-nextest
run: cargo install cargo-nextest
- name: Test with cargo-nextest
uses: actions-rs/cargo@v1
with:
command: nextest
args: run
run: cargo nextest run

View File

@ -32,7 +32,7 @@ jobs:
if: matrix.target.os == 'macos-latest'
run: sudo ifconfig lo0 alias 127.0.0.3
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# install OpenSSL on Windows
- name: Set vcpkg root
@ -46,11 +46,10 @@ jobs:
run: vcpkg install openssl:x86-windows
- name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}-${{ matrix.target.triple }}
profile: minimal
override: true
run: |
rustup set profile minimal
rustup install ${{ matrix.version }}-${{ matrix.target.triple }}
rustup override set ${{ matrix.version }}-${{ matrix.target.triple }}
# - name: Install MSYS2
# if: matrix.target.triple == 'x86_64-pc-windows-gnu'
@ -62,10 +61,9 @@ jobs:
# msys2 -c 'pacman --noconfirm -S base-devel pkg-config'
# - name: Generate Cargo.lock
# uses: actions-rs/cargo@v1
# with: { command: generate-lockfile }
# run: cargo generate-lockfile
# - name: Cache Dependencies
# uses: Swatinem/rust-cache@v1.2.0
# uses: Swatinem/rust-cache@v2.2.0
- name: Install cargo-hack
if: matrix.version != '1.59.0'
@ -84,8 +82,7 @@ jobs:
cargo add env_logger@0.9 --dev -p=actix-server
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with: { command: generate-lockfile }
run: cargo generate-lockfile
- name: workaround MSRV issues
if: matrix.version != 'stable'
@ -96,28 +93,23 @@ jobs:
if: >
matrix.target.os != 'ubuntu-latest'
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
uses: actions-rs/cargo@v1
with: { command: ci-check-lib }
run: cargo ci-check-lib
- name: check lib
if: matrix.target.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
with: { command: ci-check-lib-linux }
run: cargo ci-check-lib-linux
- name: check lib
if: matrix.target.triple == 'x86_64-pc-windows-gnu'
uses: actions-rs/cargo@v1
with: { command: ci-check-min }
run: cargo ci-check-min
- name: check full
# TODO: compile OpenSSL and run tests on MinGW
if: >
matrix.target.os != 'ubuntu-latest'
&& matrix.target.triple != 'x86_64-pc-windows-gnu'
uses: actions-rs/cargo@v1
with: { command: ci-check }
run: cargo ci-check
- name: check all
if: matrix.target.os == 'ubuntu-latest'
uses: actions-rs/cargo@v1
with: { command: ci-check-linux }
run: cargo ci-check-linux
- name: tests
if: matrix.target.os == 'macos-latest'
@ -143,20 +135,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Rust (nightly)
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-x86_64-unknown-linux-gnu
profile: minimal
override: true
run: |
rustup set profile minimal
rustup install nightly
rustup override set nightly
- name: Generate Cargo.lock
uses: actions-rs/cargo@v1
with: { command: generate-lockfile }
run: cargo generate-lockfile
- name: Cache Dependencies
uses: Swatinem/rust-cache@v1.3.0
uses: Swatinem/rust-cache@v2.2.0
- name: doc tests io-uring
run: |

View File

@ -8,35 +8,30 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
override: true
run: |
rustup set profile minimal
rustup install stable
rustup override set stable
rustup component add rustfmt
- name: Rustfmt Check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- 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:
toolchain: stable
profile: minimal
components: clippy
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
reporter: "github-pr-check"
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: --workspace --all-features --tests --examples --bins -- -Dclippy::todo

View File

@ -9,27 +9,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-x86_64-unknown-linux-gnu
profile: minimal
override: true
run: |
rustup set profile minimal
rustup install nightly
rustup override set nightly
- name: Build Docs
uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --all-features --no-deps
run: cargo doc --workspace --all-features --no-deps
- name: Tweak HTML
run: echo '<meta http-equiv="refresh" content="0;url=actix_server/index.html">' > target/doc/index.html
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@3.7.1
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: target/doc
folder: target/doc