1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00

ci: fix windows openssl

This commit is contained in:
Rob Ede 2023-07-18 02:18:19 +01:00
parent bf03207ca9
commit a4c9361791
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
3 changed files with 22 additions and 52 deletions

View File

@ -26,39 +26,26 @@ jobs:
name: ${{ matrix.target.name }} / ${{ matrix.version }} name: ${{ matrix.target.name }} / ${{ matrix.version }}
runs-on: ${{ matrix.target.os }} runs-on: ${{ matrix.target.os }}
env:
CI: 1
CARGO_INCREMENTAL: 0
VCPKGRS_DYNAMIC: 1
CARGO_UNSTABLE_SPARSE_REGISTRY: true
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# install OpenSSL on Windows
# TODO: GitHub actions docs state that OpenSSL is
# already installed on these Windows machines somewhere
- name: Set vcpkg root
if: matrix.target.triple == 'x86_64-pc-windows-msvc'
run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Install OpenSSL - name: Install OpenSSL
if: matrix.target.triple == 'x86_64-pc-windows-msvc' if: matrix.target.os == 'windows-latest'
run: vcpkg install openssl:x64-windows run: choco install openssl -y --forcex64 --no-progress
- name: Set OpenSSL dir in env
- name: Install ${{ matrix.version }} if: matrix.target.os == 'windows-latest'
run: | run: |
rustup set profile minimal echo 'OPENSSL_DIR=C:\Program Files\OpenSSL-Win64' | Out-File -FilePath $env:GITHUB_ENV -Append
rustup install ${{ matrix.version }} echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' | Out-File -FilePath $env:GITHUB_ENV -Append
rustup override set ${{ matrix.version }}
- name: Install Rust (${{ matrix.version }})
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.version }}
- name: Install cargo-hack - name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack uses: taiki-e/install-action@cargo-hack
- name: Generate Cargo.lock
run: cargo generate-lockfile
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2.2.1
- name: check minimal - name: check minimal
run: cargo ci-check-min run: cargo ci-check-min
@ -88,23 +75,15 @@ jobs:
name: Verify Feature Combinations name: Verify Feature Combinations
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
CI: 1
CARGO_INCREMENTAL: 0
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable - name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-hack - name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack uses: taiki-e/install-action@cargo-hack
- name: Generate Cargo.lock
run: cargo generate-lockfile
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2.2.1
- name: check feature combinations - name: check feature combinations
run: cargo ci-check-all-feature-powerset run: cargo ci-check-all-feature-powerset
@ -115,22 +94,14 @@ jobs:
name: nextest name: nextest
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
CI: 1
CARGO_INCREMENTAL: 0
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable - name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install nextest - name: Install nextest
uses: taiki-e/install-action@nextest uses: taiki-e/install-action@nextest
- name: Generate Cargo.lock
run: cargo generate-lockfile
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2.2.1
- name: Test with cargo-nextest - name: Test with cargo-nextest
run: cargo nextest run run: cargo nextest run

View File

@ -29,17 +29,17 @@ jobs:
name: ${{ matrix.target.name }} / ${{ matrix.version }} name: ${{ matrix.target.name }} / ${{ matrix.version }}
runs-on: ${{ matrix.target.os }} runs-on: ${{ matrix.target.os }}
env: {}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Install OpenSSL - name: Install OpenSSL
if: matrix.target.os == 'windows-latest' if: matrix.target.os == 'windows-latest'
run: choco install openssl run: choco install openssl -y --forcex64 --no-progress
- name: Set OpenSSL dir in env - name: Set OpenSSL dir in env
if: matrix.target.os == 'windows-latest' if: matrix.target.os == 'windows-latest'
run: echo 'OPENSSL_DIR=C:\Program Files\OpenSSL-Win64' | Out-File -FilePath $env:GITHUB_ENV -Append run: |
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL-Win64' | Out-File -FilePath $env:GITHUB_ENV -Append
echo 'OPENSSL_DIR=C:\Program Files\OpenSSL' | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Install Rust (${{ matrix.version }}) - name: Install Rust (${{ matrix.version }})
uses: actions-rust-lang/setup-rust-toolchain@v1 uses: actions-rust-lang/setup-rust-toolchain@v1

View File

@ -19,7 +19,7 @@ all-features = true
[features] [features]
default = ["tempfile", "derive"] default = ["tempfile", "derive"]
derive = ["actix-multipart-derive"] derive = ["actix-multipart-derive"]
tempfile = ["tempfile-dep", "tokio/fs"] tempfile = ["dep:tempfile", "tokio/fs"]
[dependencies] [dependencies]
actix-multipart-derive = { version = "=0.6.0", optional = true } actix-multipart-derive = { version = "=0.6.0", optional = true }
@ -38,9 +38,8 @@ mime = "0.3"
serde = "1" serde = "1"
serde_json = "1" serde_json = "1"
serde_plain = "1" serde_plain = "1"
# TODO(MSRV 1.60): replace with dep: prefix tempfile-dep = { version = "3.4", optional = true }
tempfile-dep = { package = "tempfile", version = "3.4", optional = true } tokio = { version = "1.24.2", features = ["sync", "io-util"] }
tokio = { version = "1.24.2", features = ["io-util", "sync"] }
[dev-dependencies] [dev-dependencies]
actix-http = "3" actix-http = "3"