8000 Fix Windows CI by derlih · Pull Request #5168 · RustPython/RustPython · GitHub
[go: up one dir, main page]

Skip to content

Fix Windows CI #5168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,13 @@ lto = "thin"
[patch.crates-io]
# REDOX START, Uncomment when you want to compile/check with redoxer
# REDOX END

# Used only on Windows to build the vcpkg dependencies
[package.metadata.vcpkg]
git = "https://github.com/microsoft/vcpkg"
# The revision of the vcpkg repository to use
# https://github.com/microsoft/vcpkg/tags
rev = "2024.02.14"

[package.metadata.vcpkg.target]
x86_64-pc-windows-msvc = { triplet = "x64-windows-static-md", dev-dependencies = ["openssl" ] }
0