diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..eb0e43a338 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Build +on: [push, pull_request] +# push: +# tags: +# - '*' +jobs: + build: + name: Build qiskit-aer-gpu wheels + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + name: Install Python + with: + python-version: '3.7' + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel==1.5.5 + - name: Build wheels + env: + CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && rpm -i cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && yum clean all && yum -y install cuda-10-1" + CIBW_BEFORE_BUILD: "pip install -U Cython pip virtualenv pybind11" + CIBW_SKIP: "cp27-* cp34-* *-manylinux_i686 pp*" + CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2010" + CIBW_MANYLINUX_I686_IMAGE: "manylinux2010" + CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu AER_THRUST_BACKEND=CUDA + CIBW_TEST_COMMAND: "python3 {project}/tools/verify_wheels.py" + CIBW_TEST_REQUIRES: "git+https://github.com/Qiskit/qiskit-terra.git" + run: | + python -m cibuildwheel --output-dir wheelhouse + - uses: actions/upload-artifact@v2 + with: + path: ./wheelhouse/*.whl +# - name: Publish Wheels +# env: +# TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} +# TWINE_USERNAME: qiskit +# run : | +# pip install -U twine +# twine upload wheelhouse/* diff --git a/CMakeLists.txt b/CMakeLists.txt index f9d23fe22e..e7762d82a8 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,7 +178,13 @@ endif() # GPU support through Thrust library (CPU fallbacks) # Defaults to TRUE, but if no Thrust backend has been defined, will set to FALSE -set(AER_THRUST_SUPPORTED TRUE) +if(NOT DEFINED AER_THRUST_BACKEND) + set(AER_THRUST_BACKEND $ENV{AER_THRUST_BACKEND}) + if(DEFINED AER_THRUST_BACKEND) + set(AER_THRUST_SUPPORTED TRUE) + endif() +endif() + if(AER_THRUST_SUPPORTED) if(AER_THRUST_BACKEND STREQUAL "CUDA") message(STATUS "Thrust library: Looking for CUDA backend...") diff --git a/setup.py b/setup.py index 9980afd1f2..fd71e9f58c 100644 --- a/setup.py +++ b/setup.py @@ -9,6 +9,8 @@ import sys import inspect +PACKAGE_NAME = os.getenv('QISKIT_AER_PACKAGE_NAME', 'qiskit-aer') + try: from conans import client except ImportError: @@ -69,7 +71,7 @@ README = readme_file.read() setup( - name='qiskit-aer', + name=PACKAGE_NAME, version=VERSION, packages=setuptools.find_namespace_packages(include=['qiskit.*']), cmake_source_dir='.',