Fix Windows CI (#5168)

* pin openssl version for windows CI

* use cargo vcpkg

* install openssl with vcpkg

* use Swatinem/rust-cache right after dtolnay/rust-toolchain

* cargo install --target-dir=target cargo-vcpkg
---------

Co-authored-by: Dmitry Erlikh <d.erlikh@smartrecruiters.com>
This commit is contained in:
Dmitry ErlikhandDmitry Erlikh authored and GitHub committed 2024-02-19 02:36:18 +09:00
1 parent a88c2fe000
commit 97a0705d2e
2 files changed
+17 -15

No files matched your search

+7 -15
View File
@@ -123,22 +123,18 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Set up the Windows environment
shell: bash
run: |
choco install llvm openssl --no-progress
if [[ -d "C:\Program Files\OpenSSL-Win64" ]]; then
echo "OPENSSL_DIR=C:\Program Files\OpenSSL-Win64" >> $GITHUB_ENV
else
echo "OPENSSL_DIR=C:\Program Files\OpenSSL" >> $GITHUB_ENV
fi
cargo install --target-dir=target -v cargo-vcpkg
cargo vcpkg -v build
if: runner.os == 'Windows'
- name: Set up the Mac environment
run: brew install autoconf automake libtool
if: runner.os == 'macOS'
- uses: Swatinem/rust-cache@v2
- name: run clippy
run: cargo clippy ${{ env.CARGO_ARGS }} --workspace --exclude rustpython_wasm -- -Dwarnings
@@ -249,24 +245,20 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up the Windows environment
shell: bash
run: |
choco install llvm openssl --no-progress
if [[ -d "C:\Program Files\OpenSSL-Win64" ]]; then
echo "OPENSSL_DIR=C:\Program Files\OpenSSL-Win64" >> $GITHUB_ENV
else
echo "OPENSSL_DIR=C:\Program Files\OpenSSL" >> $GITHUB_ENV
fi
cargo install cargo-vcpkg
cargo vcpkg build
if: runner.os == 'Windows'
- name: Set up the Mac environment
run: brew install autoconf automake libtool openssl@3
if: runner.os == 'macOS'
- uses: Swatinem/rust-cache@v2
- name: build rustpython
run: cargo build --release --verbose --features=threading ${{ env.CARGO_ARGS }}
- uses: actions/setup-python@v4