From afadc9c476ed0325044e2eda120ff223c2bd32f4 Mon Sep 17 00:00:00 2001 From: Roland Schwan Date: Fri, 1 Nov 2024 20:01:14 +0100 Subject: [PATCH] set correct environment variables for python wheels --- .github/workflows/wheels.yml | 1 + ci/build_install_blasfeo.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index b715aba..f79f1a3 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -61,6 +61,7 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.21.3 env: + CIBW_ENVIRONMENT: ${{ (matrix.target.arch == 'x86_64' || matrix.target.arch == 'amd64') && 'CMAKE_ARGS="-DBLASFEO_X64_DIR=/opt/blasfeo_x64 -DBLASFEO_X64_AVX2_DIR=/opt/blasfeo_x64_avx2 -DBLASFEO_X64_AVX512_DIR=/opt/blasfeo_x64_avx512"' || ((matrix.target.arch == 'arm64' || matrix.target.arch == 'aarch64') && 'CMAKE_ARGS="-DBLASFEO_ARM64_DIR=/opt/blasfeo_arm64"' || '') }} CIBW_ARCHS_LINUX: ${{ matrix.target.arch }} CIBW_BEFORE_ALL_LINUX: bash ci/cibw_before_all_linux.sh CIBW_BEFORE_ALL_WINDOWS: bash ci/cibw_before_all_windows.sh diff --git a/ci/build_install_blasfeo.sh b/ci/build_install_blasfeo.sh index e6fd366..b7e9d3d 100644 --- a/ci/build_install_blasfeo.sh +++ b/ci/build_install_blasfeo.sh @@ -17,12 +17,12 @@ mkdir "build_$ARCH_SUFFIX" cd "build_$ARCH_SUFFIX" case "$(uname -sr)" in CYGWIN*|MINGW*|MINGW32*|MSYS*) # detect windows - cmake .. -G"Ninja" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_BUILD_TYPE=Release -DBLASFEO_CROSSCOMPILING=ON -DTARGET="$BLASFEO_TARGET" -DBLASFEO_REF_API=OFF -DBLAS_API=OFF -DBLASFEO_EXAMPLES=OFF ${3:+-DCMAKE_INSTALL_PREFIX="$3"} + cmake .. -G"Ninja" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_BUILD_TYPE=Release -DBLASFEO_CROSSCOMPILING=ON -DTARGET="$BLASFEO_TARGET" -DBLAS_API=OFF -DBLASFEO_EXAMPLES=OFF ${3:+-DCMAKE_INSTALL_PREFIX="$3"} cmake --build . cmake --install . ;; *) # other OS - cmake .. -DCMAKE_BUILD_TYPE=Release -DBLASFEO_CROSSCOMPILING=ON -DTARGET="$BLASFEO_TARGET" -DBLASFEO_REF_API=OFF -DBLAS_API=OFF -DBLASFEO_EXAMPLES=OFF ${3:+-DCMAKE_INSTALL_PREFIX="$3"} + cmake .. -DCMAKE_BUILD_TYPE=Release -DBLASFEO_CROSSCOMPILING=ON -DTARGET="$BLASFEO_TARGET" -DBLAS_API=OFF -DBLASFEO_EXAMPLES=OFF ${3:+-DCMAKE_INSTALL_PREFIX="$3"} cmake --build . if [ "$EUID" -ne 0 ] # check if already root then