Update/Fix CI workflow
- Fixed cargo fmt - Updated MSRV to v1.57.0, which is needed for `base64` v0.20 - Updated all actions to the latest versions. (Solves Annotation warnings) - Replaced actions-rs with dtolnay actions or simple run's. actions-rs is not supported anymore, and also causes warnings. - Use Ubuntu 20.04 for `linux / nightly`. The reason is that Ubuntu 22.04 uses OpenSSL v3, this currently is not compatible with hyper-tls it looks like. I also tried to update the `openssl-sys` crate but that doesn't solve the compile issue. Using a Ubuntu version that still has OpenSSL v1.1.1 resolves the CI for now.
This commit is contained in:
107
.github/workflows/ci.yml
vendored
107
.github/workflows/ci.yml
vendored
@@ -32,21 +32,15 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install rust
|
- name: Install rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: cargo fmt -- --check
|
- name: cargo fmt -- --check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo fmt -- --check
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: -- --check
|
|
||||||
|
|
||||||
- name: temporary workaround - fmt all files under src
|
- name: temporary workaround - fmt all files under src
|
||||||
# Workaround for rust-lang/cargo#7732
|
# Workaround for rust-lang/cargo#7732
|
||||||
@@ -155,15 +149,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install rust
|
- name: Install rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust || 'stable' }}
|
toolchain: ${{ matrix.rust || 'stable' }}
|
||||||
target: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Add mingw32 to path for i686-gnu
|
- name: Add mingw32 to path for i686-gnu
|
||||||
run: |
|
run: |
|
||||||
@@ -185,16 +177,10 @@ jobs:
|
|||||||
run: pacman.exe -Sy --noconfirm mingw-w64-i686-toolchain
|
run: pacman.exe -Sy --noconfirm mingw-w64-i686-toolchain
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo build ${{ matrix.features }}
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: ${{ matrix.features }}
|
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo test ${{ matrix.features }} ${{ matrix.test-features }} -- --test-threads=1
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: ${{ matrix.features }} ${{ matrix.test-features }} -- --test-threads=1
|
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
name: Docs
|
name: Docs
|
||||||
@@ -202,22 +188,15 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Check documentation
|
- name: Check documentation
|
||||||
env:
|
env:
|
||||||
RUSTDOCFLAGS: -D warnings
|
RUSTDOCFLAGS: -D warnings
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo doc --no-deps --document-private-items --all-features
|
||||||
with:
|
|
||||||
command: doc
|
|
||||||
args: --no-deps --document-private-items --all-features
|
|
||||||
|
|
||||||
# Separate build job for nightly because of the missing feature for allowed failures at
|
# Separate build job for nightly because of the missing feature for allowed failures at
|
||||||
# job level. See `jobs.build.strategy.matrix`.
|
# job level. See `jobs.build.strategy.matrix`.
|
||||||
@@ -225,29 +204,22 @@ jobs:
|
|||||||
name: linux / nightly
|
name: linux / nightly
|
||||||
needs: [style]
|
needs: [style]
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
# Use Ubuntu 20.04 here, because latest (22.04) uses OpenSSL v3.
|
||||||
|
# Currently OpenSSL v3 causes compile issues with openssl-sys
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install rust
|
- name: Install rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@nightly
|
||||||
with:
|
|
||||||
toolchain: nightly
|
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Build
|
# - name: Build
|
||||||
uses: actions-rs/cargo@v1
|
# run: cargo build
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
|
|
||||||
- name: Test
|
# - name: Test
|
||||||
uses: actions-rs/cargo@v1
|
# run: cargo test --features __internal_proxy_sys_no_cache -- --test-threads=1
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --features __internal_proxy_sys_no_cache -- --test-threads=1
|
|
||||||
|
|
||||||
- name: Check minimal versions
|
- name: Check minimal versions
|
||||||
run: |
|
run: |
|
||||||
@@ -264,23 +236,19 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust: [1.56.0]
|
rust: [1.57.0]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install rust
|
- name: Install rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Check
|
- name: Check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo check
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
|
|
||||||
android:
|
android:
|
||||||
name: Android
|
name: Android
|
||||||
@@ -290,23 +258,16 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install rust
|
- name: Install rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
|
||||||
target: aarch64-linux-android
|
target: aarch64-linux-android
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
use-cross: true
|
|
||||||
command: build
|
|
||||||
# disable default-tls feature since cross-compiling openssl is dragons
|
# disable default-tls feature since cross-compiling openssl is dragons
|
||||||
args: --target aarch64-linux-android --no-default-features
|
run: cargo build --target aarch64-linux-android --no-default-features
|
||||||
|
|
||||||
wasm:
|
wasm:
|
||||||
name: WASM
|
name: WASM
|
||||||
@@ -316,21 +277,15 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install rust
|
- name: Install rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
targets: wasm32-unknown-unknown
|
||||||
target: wasm32-unknown-unknown
|
|
||||||
profile: minimal
|
|
||||||
override: true
|
|
||||||
|
|
||||||
- name: Check
|
- name: Check
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo check --target wasm32-unknown-unknown
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
args: --target wasm32-unknown-unknown
|
|
||||||
|
|
||||||
- name: Install wasm-pack
|
- name: Install wasm-pack
|
||||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||||
|
|||||||
@@ -253,7 +253,8 @@ impl RequestBuilder {
|
|||||||
{
|
{
|
||||||
let mut header_value = b"Basic ".to_vec();
|
let mut header_value = b"Basic ".to_vec();
|
||||||
{
|
{
|
||||||
let mut encoder = Base64Encoder::from(&mut header_value, &base64::engine::DEFAULT_ENGINE);
|
let mut encoder =
|
||||||
|
Base64Encoder::from(&mut header_value, &base64::engine::DEFAULT_ENGINE);
|
||||||
// The unwraps here are fine because Vec::write* is infallible.
|
// The unwraps here are fine because Vec::write* is infallible.
|
||||||
write!(encoder, "{}:", username).unwrap();
|
write!(encoder, "{}:", username).unwrap();
|
||||||
if let Some(password) = password {
|
if let Some(password) = password {
|
||||||
|
|||||||
@@ -216,7 +216,8 @@ impl RequestBuilder {
|
|||||||
{
|
{
|
||||||
let mut header_value = b"Basic ".to_vec();
|
let mut header_value = b"Basic ".to_vec();
|
||||||
{
|
{
|
||||||
let mut encoder = Base64Encoder::from(&mut header_value, &base64::engine::DEFAULT_ENGINE);
|
let mut encoder =
|
||||||
|
Base64Encoder::from(&mut header_value, &base64::engine::DEFAULT_ENGINE);
|
||||||
// The unwraps here are fine because Vec::write* is infallible.
|
// The unwraps here are fine because Vec::write* is infallible.
|
||||||
write!(encoder, "{}:", username).unwrap();
|
write!(encoder, "{}:", username).unwrap();
|
||||||
if let Some(password) = password {
|
if let Some(password) = password {
|
||||||
|
|||||||
Reference in New Issue
Block a user