From 8efac8b7d4bc1c5f023b303a271577ca2b5cdb4f Mon Sep 17 00:00:00 2001 From: Vincent Michaud-Rioux Date: Thu, 12 Oct 2023 14:59:26 -0400 Subject: [PATCH] Use env vars for versions. --- .github/workflows/wheel_linux_x86_64_cu11.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheel_linux_x86_64_cu11.yml b/.github/workflows/wheel_linux_x86_64_cu11.yml index 308b50da1c..cc99ce754d 100644 --- a/.github/workflows/wheel_linux_x86_64_cu11.yml +++ b/.github/workflows/wheel_linux_x86_64_cu11.yml @@ -7,6 +7,8 @@ name: Wheel::Linux::x86_64::CUDA-11 env: GCC_VERSION: 11 + CUDA_VERSION_MAJOR: 11 + CUDA_VERSION_MINOR: 5 on: pull_request: @@ -17,7 +19,7 @@ on: types: [published] concurrency: - group: wheel_linux_x86_64_cu11-${{ github.ref }} + group: wheel_linux_x86_64_cu${CUDA_VERSION_MAJOR}-${{ github.ref }} cancel-in-progress: true jobs: @@ -62,31 +64,30 @@ jobs: CIBW_ARCHS_LINUX: ${{ matrix.arch }} CIBW_BUILD: ${{ matrix.cibw_build }} - CIBW_BUILD_FRONTEND: "pip" CIBW_SKIP: "*-musllinux*" - CIBW_CONFIG_SETTINGS: --global-option=build_ext --global-option=--define="CMAKE_CXX_COMPILER=$(which g++-11);CMAKE_C_COMPILER=$(which gcc-11);LIGHTNING_RELEASE_TAG=master" + CIBW_CONFIG_SETTINGS: --global-option=build_ext --global-option=--define="CMAKE_CXX_COMPILER=$(which g++-${GCC_VERSION});CMAKE_C_COMPILER=$(which gcc-${GCC_VERSION});LIGHTNING_RELEASE_TAG=master" # Python build settings CIBW_BEFORE_BUILD: | cat /etc/yum.conf | sed "s/\[main\]/\[main\]\ntimeout=5/g" > /etc/yum.conf - python -m pip install ninja cmake~=3.24.3 auditwheel custatevec-cu11 + python -m pip install ninja cmake~=3.24.3 auditwheel custatevec-cu${CUDA_VERSION_MAJOR} yum clean all -y yum install centos-release-scl-rh -y - yum install devtoolset-11-gcc-c++ -y - source /opt/rh/devtoolset-11/enable -y + yum install devtoolset-${GCC_VERSION}-gcc-c++ -y + source /opt/rh/devtoolset-${GCC_VERSION}/enable -y yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo -y - yum -y install cuda-11-5 git openssh wget + yum -y install cuda-${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR} git openssh wget # ensure nvcc is available CIBW_ENVIRONMENT: | PATH=$PATH:/usr/local/cuda/bin \ CUQUANTUM_SDK=$(python -c "import site; print( f'{site.getsitepackages()[0]}/cuquantum/lib')") \ + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64:$CUQUANTUM_SDK \ PL_BACKEND="${{ matrix.pl_backend }}" - # CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_REPAIR_WHEEL_COMMAND_LINUX: "./docker/auditwheel repair -w {dest_dir} {wheel}" + CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel repair -w {dest_dir} {wheel}" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014