diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5488b7a26..44d3b8be1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,162 +1,27 @@ name: Build on: - push: - branches: [main, 'stable/*'] - pull_request: - branches: [main, 'stable/*'] -concurrency: - group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true -jobs: - standalone: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["macOS-latest", "ubuntu-latest", "windows-2019"] + push + + wheel-rocm: + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + name: Install Python with: - python-version: 3.8 - - name: Install deps - run: pip install "conan<2.0.0" - - name: Install openblas + python-version: '3.8' + - name: Install cibuildwheel run: | - set -e - sudo apt-get update - sudo apt-get install -y libopenblas-dev - shell: bash - if: runner.os == 'Linux' - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - if: runner.os == 'Windows' - - name: Compile Standalone Windows - run: | - set -e - mkdir out; cd out; cmake .. -DBUILD_TESTS=1 - cmake --build . --config Release - shell: bash - if: runner.os == 'Windows' - - name: Compile Standalone - run: | - set -e - mkdir out; cd out; cmake .. -DBUILD_TESTS=1 - make - shell: bash - if: runner.os != 'Windows' - - name: Run Unit Tests - run: | - cd out/bin - for test in test* - do echo $test - if ! ./$test - then - ERR=1 - fi - done - if [ ! -z "$ERR" ] - then - exit 1 - fi - shell: bash - - name: Run qobj - run: | - pip install -U qiskit - python tools/generate_qobj.py - cd out - Release/qasm_simulator ../qobj.json | python ../tools/verify_standalone_results.py - shell: bash - mpi_standalone: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["ubuntu-latest"] - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install deps - run: pip install "conan<2.0.0" - - name: Install openblas and mpi - run: | - set -e - sudo apt-get update - sudo apt-get install -y libopenblas-dev openmpi-bin libopenmpi-dev - shell: bash - - name: Compile Standalone - run: | - set -e - mkdir out; cd out; cmake .. -DBUILD_TESTS=1 -DAER_MPI=True - make - shell: bash - - name: Run Unit Tests with mpi - run: | - cd out/bin - for test in test* - do echo $test - if ! /usr/bin/mpirun.openmpi -host localhost:2 -np 2 ./$test - then - ERR=1 - fi - done - if [ ! -z "$ERR" ] - then - exit 1 - fi - shell: bash - - name: Run qobj - run: | - pip install -U qiskit - python tools/generate_qobj.py - cd out - /usr/bin/mpirun.openmpi -host localhost:2 -np 2 Release/qasm_simulator ../qobj.json | python ../tools/verify_standalone_results.py + python -m pip install cibuildwheel==2.16.2 + - name: Build wheels env: - USE_MPI: 1 - shell: bash - wheel: - runs-on: ${{ matrix.os }} - needs: ["standalone"] - strategy: - matrix: - os: ["macOS-latest", "ubuntu-latest", "windows-2019"] - steps: - - uses: actions/checkout@v2 - - name: Set up Python Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - if: runner.os == 'Windows' - - name: Install deps - run: python -m pip install -U cibuildwheel==2.16.5 - - name: Build Wheels - env: - AER_CMAKE_OPENMP_BUILD: 1 - run: cibuildwheel --output-dir wheelhouse - - uses: actions/upload-artifact@v2 - with: - path: ./wheelhouse/*.whl - wheel-arm64: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: ["macOS-latest"] - steps: - - uses: actions/checkout@v2 - - name: Set up Python Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install deps - run: python -m pip install -U cibuildwheel==2.16.2 - - name: Build Wheels - env: - CIBW_ARCHS_MACOS: arm64 - run: cibuildwheel --output-dir wheelhouse - - uses: actions/upload-artifact@v2 + CIBW_BEFORE_ALL: "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash && yum install -y yum-utils git-lfs && mkdir -p ~/bin/ && curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo && mkdir -p ~/ROCm/ +cd ~/ROCm/ && ~/bin/repo init -u http://github.com/ROCm/ROCm.git -b roc-6.0.x && ~/bin/repo sync" + CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* cp38* cp39* cp310* cp311* *musllinux*" + CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-rocm MAKE_VERBOSE_MAKEFILE=true AER_THRUST_BACKEND=ROCM AER_CIBUILD=true ROCM_PATH=~/ROCm + run: | + python -m cibuildwheel --output-dir wheelhouse + - uses: actions/upload-artifact@v3 with: path: ./wheelhouse/*.whl + diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index a5a9d82cae..0000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,293 +0,0 @@ -name: Deploy -on: - push: - tags: - - '*' -jobs: - wheel-build: - name: Build qiskit-aer wheels - strategy: - matrix: - os: ["macOS-latest", "ubuntu-latest", "windows-2019"] - runs-on: ${{ matrix.os }} - environment: release - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.8' - - name: Install cibuildwheel - run: | - python -m pip install cibuildwheel==2.16.2 - - name: Build wheels - env: - AER_CMAKE_OPENMP_BUILD: 1 - run: python -m cibuildwheel --output-dir wheelhouse - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl - name: publish-shared-wheels - build_wheels_aarch64: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - environment: release - permissions: - id-token: write - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.8' - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - with: - platforms: all - - name: Install cibuildwheel - run: | - python -m pip install cibuildwheel==2.16.2 - - name: Build wheels - run: | - python -m cibuildwheel --output-dir wheelhouse - env: - CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel" - CIBW_ARCHS_LINUX: aarch64 - CIBW_TEST_SKIP: "cp38* cp39* cp310* cp311*" - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: wheelhouse - wheel-arm64-macos: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["macOS-latest"] - environment: release - steps: - - uses: actions/checkout@v3 - - name: Set up Python Python 3.8 - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Install deps - run: python -m pip install -U cibuildwheel==2.16.2 - - name: Build Wheels - env: - CIBW_ARCHS_MACOS: arm64 - run: cibuildwheel --output-dir wheelhouse - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl - name: publish-shared-wheels - sdist: - name: Publish qiskit-aer sdist - runs-on: ubuntu-latest - needs: [publish-shared-wheels] - environment: release - permissions: - id-token: write - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.8' - - name: Install Deps - run: pip install -U scikit-build wheel - - name: Build Artifacts - run: | - python setup.py sdist - shell: bash - - uses: actions/upload-artifact@v3 - with: - path: ./dist/qiskit* - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: dist - gpu-build-cuda11: - name: Build qiskit-aer-gpu-cu11 wheels - strategy: - matrix: - os: ["ubuntu-latest"] - runs-on: ${{ matrix.os }} - environment: release - permissions: - id-token: write - steps: - - name: Maximize build space - uses: easimon/maximize-build-space@master - with: - root-reserve-mb: 40000 - swap-size-mb: 1024 - remove-dotnet: 'true' - remove-android: 'true' - remove-haskell: 'true' - remove-codeql: 'true' - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.8' - - name: Install cibuildwheel - run: | - python -m pip install cibuildwheel==2.16.2 - - name: Build wheels - env: - CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-11-8-local-11.8.0_520.61.05-1.x86_64.rpm && yum clean all && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all" - CIBW_BEFORE_BUILD : "pip install nvidia-cuda-runtime-cu11 nvidia-cublas-cu11 nvidia-cusolver-cu11 nvidia-cusparse-cu11 cuquantum-cu11" - CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* *musllinux*" - CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu-cu11 QISKIT_AER_CUDA_MAJOR=11 CMAKE_VERBOSE_MAKEFILE=true AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc AER_CUDA_ARCH="7.0 7.2 7.5 8.0 8.6 8.7" AER_PYTHON_CUDA_ROOT=/opt/_internal AER_CIBUILD=true - CIBW_REPAIR_WHEEL_COMMAND: 'auditwheel repair --exclude libcudart.so.11.0 --exclude libcustatevec.so.1 --exclude libcutensornet.so.2 --exclude libcutensor.so.1 --exclude libcutensorMg.so.1 --exclude libcusolver.so.11 --exclude libcusolverMg.so.11 --exclude libcusparse.so.11 --exclude libcublas.so.11 --exclude libcublasLt.so.11 -w {dest_dir} {wheel}' - run: | - python -m cibuildwheel --output-dir wheelhouse - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: wheelhouse - gpu-build-cuda12: - name: Build qiskit-aer-gpu-cu12 wheels - strategy: - matrix: - os: ["ubuntu-latest"] - runs-on: ${{ matrix.os }} - environment: release - permissions: - id-token: write - steps: - - name: Maximize build space - uses: easimon/maximize-build-space@master - with: - root-reserve-mb: 40000 - swap-size-mb: 1024 - remove-dotnet: 'true' - remove-android: 'true' - remove-haskell: 'true' - remove-codeql: 'true' - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.8' - - name: Install cibuildwheel - run: | - python -m pip install cibuildwheel==2.16.2 - - name: Build wheels - env: - CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget -q https://developer.download.nvidia.com/compute/cuda/12.2.2/local_installers/cuda-repo-rhel7-12-2-local-12.2.2_535.104.05-1.x86_64.rpm && rpm -i cuda-repo-rhel7-12-2-local-12.2.2_535.104.05-1.x86_64.rpm && yum clean all && yum -y install nvidia-driver-latest-dkms && yum -y install cuda && yum -y install openblas-devel && yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo && yum clean all" - CIBW_BEFORE_BUILD : "pip install nvidia-cuda-runtime-cu12 nvidia-nvjitlink-cu12 nvidia-cublas-cu12 nvidia-cusolver-cu12 nvidia-cusparse-cu12 cuquantum-cu12" - CIBW_SKIP: "*-manylinux_i686 pp* cp36* cp37* *musllinux*" - CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu QISKIT_AER_CUDA_MAJOR=12 CMAKE_VERBOSE_MAKEFILE=true AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc AER_CUDA_ARCH="7.0 7.2 7.5 8.0 8.6 8.7 9.0" AER_PYTHON_CUDA_ROOT=/opt/_internal AER_CIBUILD=true - CIBW_REPAIR_WHEEL_COMMAND: 'auditwheel repair --exclude libcudart.so.12 --exclude libcustatevec.so.1 --exclude libcutensornet.so.2 --exclude libcutensor.so.1 --exclude libcutensorMg.so.1 --exclude libcusolver.so.11 --exclude libcusolverMg.so.11 --exclude libcusolver.so.12 --exclude libcusolverMg.so.12 --exclude libcusparse.so.12 --exclude libcublas.so.12 --exclude libcublasLt.so.12 --exclude libnvJitLink.so.12 -w {dest_dir} {wheel}' - run: | - python -m cibuildwheel --output-dir wheelhouse - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: wheelhouse - build_wheels_s390x: - name: Build wheels on s390x - runs-on: ${{ matrix.os }} - environment: release - permissions: - id-token: write - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.8' - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - with: - platforms: all - - name: Build wheels - uses: pypa/cibuildwheel@v2.16.2 - env: - CIBW_ARCHS_LINUX: s390x - CIBW_TEST_SKIP: "cp*" - CIBW_BEFORE_ALL: "yum install -y epel-release && yum install -y openblas-devel" - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: wheelhouse - build_wheels_ppc64le: - name: Build wheels on ppc64le - runs-on: ${{ matrix.os }} - environment: release - permissions: - id-token: write - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - name: Install Python - with: - python-version: '3.8' - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - with: - platforms: all - - name: Build wheels - uses: pypa/cibuildwheel@v2.16.2 - env: - CIBW_ARCHS_LINUX: ppc64le - CIBW_TEST_SKIP: "cp*" - CIBW_BEFORE_ALL: "yum install -y epel-release && yum install -y openblas-devel" - - uses: actions/upload-artifact@v3 - with: - path: ./wheelhouse/*.whl - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: wheelhouse - publish-shared-wheels: - name: Publish shared wheels - runs-on: ubuntu-latest - needs: [wheel-build, wheel-arm64-macos] - environment: release - permissions: - id-token: write - steps: - - uses: actions/download-artifact@v3 - with: - path: deploy - name: publish-shared-wheels - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: deploy diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml deleted file mode 100644 index eb922217d0..0000000000 --- a/.github/workflows/docs-publish.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Docs Publish -on: - workflow_dispatch: - push: - tags: - - "*" - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -U virtualenv setuptools wheel tox - sudo apt-get install graphviz pandoc build-essential libopenblas-dev - - name: Build docs - env: - QISKIT_DOCS_BUILD_TUTORIALS: 'always' - run: tox -edocs - - name: Bypass Jekyll Processing # Necessary for setting the correct css path - run: touch docs/_build/html/.nojekyll - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4 - with: - folder: docs/_build/html/ diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 192e7bcd07..0000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Docs and Tutorial -on: - push: - branches: [main, 'stable/*'] - pull_request: - branches: [main, 'stable/*'] -concurrency: - group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true -jobs: - docs: - runs-on: ubuntu-latest - timeout-minutes: 60 - strategy: - matrix: - python-version: [3.8] - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.python-version}}-pip-docs-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version}}-pip-docs- - ${{ runner.os }}-${{ matrix.python-version}}-pip- - ${{ runner.os }}-${{ matrix.python-version}}- - - name: Install Deps - run: | - set -e - pip install -U pip virtualenv wheel - pip install -U tox - sudo apt-get update - sudo apt-get install -y build-essential libopenblas-dev pandoc - shell: bash - - name: Run Docs Build - run: tox -edocs - - uses: actions/upload-artifact@v2 - with: - name: html_docs - path: docs/_build/html - tutorials: - runs-on: ubuntu-latest - needs: [docs] - strategy: - matrix: - python-version: [3.8] - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~\AppData\Local\pip\Cache - key: ${{ runner.os }}-${{ matrix.python-version}}-pip-tutorials-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version}}-pip-tutorials- - ${{ runner.os }}-${{ matrix.python-version}}-pip- - ${{ runner.os }}-${{ matrix.python-version}}}- - - name: Setup tutorials job - run: | - set -e - git clone https://github.com/Qiskit/qiskit-tutorials --depth=1 - python -m pip install --upgrade pip wheel - pip install -U -r requirements-dev.txt -c constraints.txt - pip install -c constraints.txt git+https://github.com/Qiskit/qiskit - pip install -c constraints.txt . - pip install -U "qiskit-ibmq-provider" "z3-solver" "qiskit-ignis" "qiskit-aqua" "pyscf<1.7.4" "matplotlib>=3.3.0" jupyter pylatexenc nbsphinx cvxpy qiskit-sphinx-theme -c constraints.txt - sudo apt install -y graphviz pandoc libopenblas-dev - pip check - shell: bash - - name: Run Tutorials - run: | - set -e - cd qiskit-tutorials - rm -rf tutorials/chemistry tutorials/circuits tutorials/circuits_advanced tutorials/finance tutorials/optimization tutorials/algorithms tutorials/operators tutorials/noise tutorials/machine_learning - sphinx-build -b html . _build/html - - uses: actions/upload-artifact@v2 - with: - name: tutorials_html - path: qiskit-tutorials/_build/html diff --git a/.github/workflows/neko.yml b/.github/workflows/neko.yml deleted file mode 100644 index 5e1f3dbd42..0000000000 --- a/.github/workflows/neko.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Qiskit Neko Integration Tests -on: - push: - pull_request: - branches: ['main', 'stable/*'] -concurrency: - group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true -jobs: - neko: - name: Qiskit Neko Integration Tests - runs-on: ubuntu-latest - steps: - - uses: Qiskit/qiskit-neko@main - with: - test_selection: backend - repo_install_command: | - pip install conan - pip install . diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 2bd6e3020c..0000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,297 +0,0 @@ -name: Tests -on: - push: - branches: [main, 'stable/*'] - pull_request: - branches: [main, 'stable/*'] -concurrency: - group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true -jobs: - lint: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.8] - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.python-version}}-pip-lint-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version}}-pip-lint- - ${{ runner.os }}-${{ matrix.python-version}}-pip- - ${{ runner.os }}-${{ matrix.python-version}}- - - name: Install deps - run: | - set -e - pip install -U pip wheel - pip install -U -c constraints.txt -r requirements-dev.txt qiskit numpy scipy - shell: bash - - name: Run clang-format - run: | - set -e - sh tools/clang-format.sh --Werror -n - shell: bash - - name: Run Lint - run: | - set -e - black --check qiskit_aer test tools setup.py - pylint -j 2 -rn qiskit_aer - sdist: - runs-on: ${{ matrix.platform.os }} - needs: ["lint"] - strategy: - matrix: - python-version: [3.8, 3.9, "3.10", '3.11', "3.12.0"] - platform: [ - { os: "ubuntu-latest", python-architecture: "x64" }, - ] - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.python-version}}-pip-sdist-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version}}-pip-sdist- - ${{ runner.os }}-${{ matrix.python-version}}-pip- - ${{ runner.os }}-${{ matrix.python-version}}- - - name: Install Deps - run: python -m pip install -U setuptools wheel virtualenv build - - name: Install openblas - run: | - set -e - sudo apt-get update - sudo apt-get install -y libopenblas-dev - shell: bash - - name: Build Sdist - run: python -I -m build --sdist - - name: Install from sdist and test - run: | - set -e - mkdir out; cd out; virtualenv aer-test - aer-test/bin/pip install ../dist/*tar.gz - aer-test/bin/python ../tools/verify_wheels.py - aer-test/bin/pip check - shell: bash - tests_linux: - runs-on: ubuntu-latest - name: Linux Python ${{ matrix.python-version }}${{ matrix.qiskit-extra && format(' ({0})', matrix.qiskit-extra) }} - needs: [sdist, lint] - timeout-minutes: 60 - strategy: - matrix: - python-version: [3.8, 3.9, "3.10", "3.11", "3.12.0"] - qiskit-extra: [""] - include: - - python-version: "3.10" - qiskit-extra: "'qiskit>=1.0.0rc1'" - - env: - AER_THRUST_BACKEND: OMP - QISKIT_TEST_CAPTURE_STREAMS: 1 - # Needed to suppress a warning in jupyter-core 5.x by eagerly migrating to - # a new internal interface that will be the default in jupyter-core 6.x. - # This variable should become redundant on release of jupyter-core 6. - JUPYTER_PLATFORM_DIRS: 1 - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.python-version}}-pip-test-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version}}-pip-test- - ${{ runner.os }}-${{ matrix.python-version}}-pip- - ${{ runner.os }}-${{ matrix.python-version}}- - - name: Install openblas - run: | - set -e - sudo apt-get update - sudo apt-get install -y libopenblas-dev - shell: bash - - name: Install Aer and dependencies - run: | - python -m pip install -U \ - -c constraints.txt \ - -r requirements-dev.txt \ - ${{ matrix.qiskit-extra }} \ - . - - name: Run Tests - run: | - set -e - pip check - rm -rf qiskit_aer - stestr run --slowest - shell: bash - tests-json-input: - runs-on: ${{ matrix.os }} - needs: [sdist, lint] - timeout-minutes: 60 - strategy: - matrix: - python-version: [3.9] - os: ["ubuntu-latest"] - env: - AER_THRUST_BACKEND: OMP - QISKIT_TEST_CAPTURE_STREAMS: 1 - # Needed to suppress a warning in jupyter-core 5.x by eagerly migrating to - # a new internal interface that will be the default in jupyter-core 6.x. - # This variable should become redundant on release of jupyter-core 6. - JUPYTER_PLATFORM_DIRS: 1 - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.python-version}}-pip-test-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version}}-pip-test- - ${{ runner.os }}-${{ matrix.python-version}}-pip- - ${{ runner.os }}-${{ matrix.python-version}}- - - name: Install Deps - run: python -m pip install -U -c constraints.txt -r requirements-dev.txt wheel build - - name: Install openblas - run: | - set -e - sudo apt-get update - sudo apt-get install -y libopenblas-dev - shell: bash - - name: Install Aer - run: | - set -e - python -I -m build --wheel --config-setting=--build-option=-DTEST_JSON=1 - pip install -U dist/*.whl - - name: Run Tests - run: | - set -e - pip check - rm -rf qiskit_aer - stestr run --slowest - shell: bash - tests_macos: - runs-on: macOS-latest - name: macOS Python ${{ matrix.python-version }} - needs: [sdist, lint] - timeout-minutes: 60 - strategy: - matrix: - python-version: [3.8, 3.9, "3.10", '3.11', "3.12.0"] - env: - AER_THRUST_BACKEND: OMP - QISKIT_TEST_CAPTURE_STREAMS: 1 - # Needed to suppress a warning in jupyter-core 5.x by eagerly migrating to - # a new internal interface that will be the default in jupyter-core 6.x. - # This variable should become redundant on release of jupyter-core 6. - JUPYTER_PLATFORM_DIRS: 1 - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.python-version}}-pip-test-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version}}-pip-test- - ${{ runner.os }}-${{ matrix.python-version}}-pip- - ${{ runner.os }}-${{ matrix.python-version}}- - - name: Install Aer and dependencies - run: | - set -e - pip install -U \ - -c constraints.txt \ - -r requirements-dev.txt \ - . - - name: Run Tests - run: | - set -e - pip check - rm -rf qiskit_aer - stestr run --slowest - shell: bash - tests_windows: - runs-on: windows-2019 - name: Windows Python ${{ matrix.python-version }} - needs: ["lint", "sdist"] - timeout-minutes: 60 - strategy: - matrix: - python-version: [3.8, 3.9, "3.10", "3.11", "3.12.0"] - env: - AER_THRUST_BACKEND: OMP - QISKIT_TEST_CAPTURE_STREAMS: 1 - # Needed to suppress a warning in jupyter-core 5.x by eagerly migrating to - # a new internal interface that will be the default in jupyter-core 6.x. - # This variable should become redundant on release of jupyter-core 6. - JUPYTER_PLATFORM_DIRS: 1 - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~\AppData\Local\pip\Cache - key: ${{ runner.os }}-${{ matrix.python-version}}-pip-test-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version}}-pip-test- - ${{ runner.os }}-${{ matrix.python-version}}-pip- - ${{ runner.os }}-${{ matrix.python-version}}- - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.0.2 - - name: Build Aer Windows - env: - CMAKE_GENERATOR: "Visual Studio 16 2019" - run: | - set -e - pip install build - python -I -m build --wheel - shell: bash - - name: Install Aer and dependencies - run: | - set -e - shopt -s failglob - pip install -U \ - -c constraints.txt \ - -r requirements-dev.txt \ - dist/*.whl - shell: bash - - name: Run Tests - env: - LANG: 'C.UTF-8' - PYTHONIOENCODING: 'utf-8:backslashreplace' - run: | - set -e - chcp.com 65001 - pip check - rm -rf qiskit_aer - stestr run --slowest - shell: bash diff --git a/.github/workflows/unit-tests-latest-qiskit.yml b/.github/workflows/unit-tests-latest-qiskit.yml deleted file mode 100644 index a0ecd9f7a1..0000000000 --- a/.github/workflows/unit-tests-latest-qiskit.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Unit Tests for latest Qiskit -on: - schedule: - - cron: '0 5 * * *' -concurrency: - group: ${{ github.repository }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true -jobs: - unit-tests-latest-qiskit: - runs-on: ubuntu-latest - timeout-minutes: 60 - env: - AER_THRUST_BACKEND: OMP - QISKIT_TEST_CAPTURE_STREAMS: 1 - # Needed to suppress a warning in jupyter-core 5.x by eagerly migrating to - # a new internal interface that will be the default in jupyter-core 6.x. - # This variable should become redundant on release of jupyter-core 6. - JUPYTER_PLATFORM_DIRS: 1 - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.11 - uses: actions/setup-python@v2 - with: - python-version: 3.11 - - name: Pip cache - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-${{ matrix.python-version}}-pip-test-${{ hashFiles('setup.py','requirements-dev.txt','constraints.txt') }} - restore-keys: | - ${{ runner.os }}-${{ matrix.python-version}}-pip-test- - ${{ runner.os }}-${{ matrix.python-version}}-pip- - ${{ runner.os }}-${{ matrix.python-version}}- - - name: Install openblas - run: | - set -e - sudo apt-get update - sudo apt-get install -y libopenblas-dev - shell: bash - - name: Install dependencies and Aer - run: | - python -m pip install -U setuptools wheel - python -m pip install -U \ - -c constraints.txt \ - -r requirements-dev.txt \ - 'git+https://github.com/Qiskit/qiskit.git@main' \ - . - - name: Run Tests - run: | - set -e - pip check - rm -rf qiskit_aer - stestr run --slowest - shell: bash -