From 16cce490eb56da03e18719a8190cb2e4205ea066 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:22:29 +0100 Subject: [PATCH] Changed to install qiskit not qiskit-terra (#58) (#59) (cherry picked from commit f9a69097ed30f0fb9bc643de009854f66acc9b1d) Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> --- .../install-main-dependencies/action.yml | 34 +++++++++---------- .github/workflows/deploy-docs.yml | 4 +-- .github/workflows/main.yml | 4 +-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/actions/install-main-dependencies/action.yml b/.github/actions/install-main-dependencies/action.yml index 977e8f4..1cfe9f9 100644 --- a/.github/actions/install-main-dependencies/action.yml +++ b/.github/actions/install-main-dependencies/action.yml @@ -19,8 +19,8 @@ inputs: python-version: description: 'Python version' required: true - terra-main: - description: 'Use Terra main' + qiskit-main: + description: 'Use Qiskit main' required: true nature-main: description: 'Use Nature main' @@ -30,17 +30,17 @@ runs: steps: - name: Get main last commit ids run: | - echo "TERRA_HASH=$(git ls-remote --heads https://github.com/Qiskit/qiskit-terra.git refs/heads/main | awk '{print $1}')" >> $GITHUB_ENV + echo "QISKIT_HASH=$(git ls-remote --heads https://github.com/Qiskit/qiskit.git refs/heads/main | awk '{print $1}')" >> $GITHUB_ENV echo "NATURE_HASH=$(git ls-remote --heads https://github.com/Qiskit/qiskit-nature.git refs/heads/main | awk '{print $1}')" >> $GITHUB_ENV shell: bash - - name: Terra Cache + - name: Qiskit Cache env: CACHE_VERSION: v1 - id: terra-cache + id: qiskit-cache uses: actions/cache@v3 with: - path: terra-cache - key: terra-cache-${{ inputs.os }}-${{ inputs.python-version }}-${{ env.TERRA_HASH }}-${{ env.CACHE_VERSION }} + path: qiskit-cache + key: qiskit-cache-${{ inputs.os }}-${{ inputs.python-version }}-${{ env.QISKIT_HASH }}-${{ env.CACHE_VERSION }} - name: Nature Cache env: CACHE_VERSION: v1 @@ -49,15 +49,15 @@ runs: with: path: nature-cache key: nature-cache-${{ inputs.os }}-${{ inputs.python-version }}-${{ env.NATURE_HASH }}-${{ env.CACHE_VERSION }} - - name: Install Terra + - name: Install Qiskit env: MACOSX_DEPLOYMENT_TARGET: 10.15 run: | - if [ "${{ inputs.terra-main }}" == "true" ]; then - echo 'Install Terra from Main' - BASE_DIR=terra-cache + if [ "${{ inputs.qiskit-main }}" == "true" ]; then + echo 'Install Qiskit from Main' + BASE_DIR=qiskit-cache build_from_main=true - cache_hit=${{ steps.terra-cache.outputs.cache-hit }} + cache_hit=${{ steps.qiskit-cache.outputs.cache-hit }} echo "cache hit: ${cache_hit}" if [ "$cache_hit" == "true" ]; then pip_result=0 @@ -73,19 +73,19 @@ runs: if [ "$build_from_main" == "true" ]; then echo 'Create wheel file from main' pip install -U wheel setuptools_rust - git clone --depth 1 --branch main https://github.com/Qiskit/qiskit-terra.git /tmp/qiskit-terra - pushd /tmp/qiskit-terra + git clone --depth 1 --branch main https://github.com/Qiskit/qiskit.git /tmp/qiskit + pushd /tmp/qiskit python setup.py bdist_wheel popd - cp -rf /tmp/qiskit-terra/dist/*.whl "${BASE_DIR}" + cp -rf /tmp/qiskit/dist/*.whl "${BASE_DIR}" pushd "${BASE_DIR}" python -m pip install *.whl popd pip uninstall -y setuptools_rust fi else - echo 'Install Terra from Stable' - pip install -U qiskit-terra + echo 'Install Qiskit from Stable' + pip install -U qiskit fi shell: bash - name: Install Nature from Main diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index c0c45ae..6d71a3e 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2022, 2023. +# (C) Copyright IBM 2022, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory @@ -44,7 +44,7 @@ jobs: if: ${{ !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }} - name: Install Dependencies run: | - pip install jupyter qiskit-terra[visualization] + pip install jupyter qiskit[visualization] sudo apt-get install -y pandoc graphviz shell: bash - uses: ./.github/actions/install-nature-pyscf diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ce64b8..c57c3fd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,7 +65,7 @@ jobs: os: ${{ matrix.os }} - name: Install Dependencies run: | - pip install jupyter qiskit-terra[visualization] + pip install jupyter qiskit[visualization] sudo apt-get -y install pandoc graphviz sudo apt-get -y install python3-enchant sudo apt-get -y install hunspell-en-us @@ -134,7 +134,7 @@ jobs: with: os: ${{ matrix.os }} python-version: ${{ matrix.python-version }} - terra-main: "false" + qiskit-main: "false" nature-main: "false" if: ${{ !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }} - uses: ./.github/actions/install-nature-pyscf