From 461260af2884f74a12d5db94f4eb37563e530857 Mon Sep 17 00:00:00 2001 From: jfranmatheu <45881831+jfranmatheu@users.noreply.github.com> Date: Wed, 12 Feb 2025 17:17:50 +0100 Subject: [PATCH] cython build action dynamic shell and better conditioning --- .github/workflows/build_cython.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_cython.yml b/.github/workflows/build_cython.yml index fb3f613b..495a8cbc 100644 --- a/.github/workflows/build_cython.yml +++ b/.github/workflows/build_cython.yml @@ -41,16 +41,18 @@ jobs: python -m pip install cython numpy setuptools wheel - name: Build Cython extensions + shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} env: ARCHFLAGS: ${{ matrix.target == 'intel' && '-arch x86_64' || '' }} run: | - if [ "${{ matrix.os }}" == "macos-latest" ] && [ "${{ matrix.target }}" == "intel" ]; then + ${{ matrix.os != 'windows-latest' && format( + 'if [ "{0}" == "macos-latest" ] && [ "{1}" == "intel" ]; then PYTHON_CROSSENV=$(pwd)/crossenv python -m pip install crossenv python -m crossenv $(which python3) $PYTHON_CROSSENV source $PYTHON_CROSSENV/bin/activate python -m pip install cython numpy setuptools wheel - fi + fi', matrix.os, matrix.target) || '' }} python cy_setup.py build_ext --inplace - name: Rename compiled extensions