Skip to content
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

Split out test-windows-cross to speed up ci #2188

Merged
merged 3 commits into from
Aug 23, 2024
Merged
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
59 changes: 44 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,21 +209,6 @@ jobs:
fi
# Check wheels with twine
twine check --strict test-crates/pyo3-mixed/target/wheels/*.whl
- name: test cross compiling windows wheel
if: ${{ matrix.platform.os == 'ubuntu-latest' && !contains(matrix.platform.python-version, 'pypy') && !contains(matrix.platform.python-version, '-dev') }}
run: |
set -ex
sudo apt-get install -y mingw-w64
rustup component add llvm-tools-preview
rustup target add x86_64-pc-windows-gnu
rustup target add x86_64-pc-windows-msvc

# abi3
cargo run -- build -m test-crates/pyo3-pure/Cargo.toml --target x86_64-pc-windows-gnu
cargo run -- build -m test-crates/pyo3-pure/Cargo.toml --target x86_64-pc-windows-msvc

# no-abi3
cargo run -- build -i "python${PYTHON_VERSION}" -m test-crates/pyo3-mixed/Cargo.toml --target x86_64-pc-windows-msvc
- name: test compiling with PYO3_CONFIG_FILE
shell: bash
run: |
Expand All @@ -240,6 +225,50 @@ jobs:
cargo run new --mixed -b pyo3 test-crates/pyo3-new-mixed
cargo run build -m test-crates/pyo3-new-mixed/Cargo.toml --target-dir test-crates/targets/

test-windows-cross:
name: Test windows cross
needs: [generate-matrix]
strategy:
fail-fast: ${{ needs.generate-matrix.outputs.fail-fast != 'false' }}
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: "1"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@v4
- name: Sccache Setup
uses: mozilla-actions/[email protected]
with:
version: "v0.7.6"
- uses: actions/setup-python@v5
with:
python-version: 3.12
architecture: "x64"
- name: Set PYTHON_VERSION env var
shell: bash
run: |
set -ex
# remove -dev suffix
python_version=$(echo "3.12" | sed -e s/-dev//)
echo "PYTHON_VERSION=$python_version" >> "${GITHUB_ENV}"
- uses: dtolnay/rust-toolchain@stable
id: rustup
- name: test cross compiling windows wheel
run: |
set -ex
sudo apt-get install -y mingw-w64
rustup component add llvm-tools-preview
rustup target add x86_64-pc-windows-gnu
rustup target add x86_64-pc-windows-msvc

# abi3
cargo run -- build -m test-crates/pyo3-pure/Cargo.toml --target x86_64-pc-windows-gnu
cargo run -- build -m test-crates/pyo3-pure/Cargo.toml --target x86_64-pc-windows-msvc

# no-abi3
cargo run -- build -i "python${PYTHON_VERSION}" -m test-crates/pyo3-mixed/Cargo.toml --target x86_64-pc-windows-msvc

test-emscripten:
name: Test Emscripten
if: github.event_name != 'pull_request'
Expand Down
Loading