From 12c3e07d7f64056b460015e18c59fb4a3eeec76b Mon Sep 17 00:00:00 2001 From: konstin Date: Wed, 21 Aug 2024 23:16:09 +0200 Subject: [PATCH 1/3] Split out test-windows-cross --- .github/workflows/test.yml | 60 ++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ddc80f867..a63ce66f2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: | @@ -240,6 +225,51 @@ 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/sccache-action@v0.0.5 + with: + version: "v0.7.6" + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.platform.python-version }} + architecture: "x64" + - name: Set PYTHON_VERSION env var + shell: bash + run: | + set -ex + # remove -dev suffix + python_version=$(echo ${{ matrix.platform.python-version }} | sed -e s/-dev//) + echo "PYTHON_VERSION=$python_version" >> "${GITHUB_ENV}" + - uses: dtolnay/rust-toolchain@stable + id: rustup + - 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 + test-emscripten: name: Test Emscripten if: github.event_name != 'pull_request' From 8eb879af6be36384c822084cd60633d0acea9c88 Mon Sep 17 00:00:00 2001 From: konstin Date: Wed, 21 Aug 2024 23:49:18 +0200 Subject: [PATCH 2/3] . --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a63ce66f2..f758bbe8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -255,7 +255,6 @@ jobs: - uses: dtolnay/rust-toolchain@stable id: rustup - 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 From 1e32f58440ec6e536a356da409afef52357bf6f3 Mon Sep 17 00:00:00 2001 From: konstin Date: Thu, 22 Aug 2024 09:42:52 +0200 Subject: [PATCH 3/3] 3.12 --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f758bbe8b..cf0dfda4b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -243,14 +243,14 @@ jobs: version: "v0.7.6" - uses: actions/setup-python@v5 with: - python-version: ${{ matrix.platform.python-version }} + python-version: 3.12 architecture: "x64" - name: Set PYTHON_VERSION env var shell: bash run: | set -ex # remove -dev suffix - python_version=$(echo ${{ matrix.platform.python-version }} | sed -e s/-dev//) + python_version=$(echo "3.12" | sed -e s/-dev//) echo "PYTHON_VERSION=$python_version" >> "${GITHUB_ENV}" - uses: dtolnay/rust-toolchain@stable id: rustup