Skip to content

Commit

Permalink
Changed to install qiskit not qiskit-terra (#58)
Browse files Browse the repository at this point in the history
(cherry picked from commit f9a6909)
  • Loading branch information
woodsp-ibm authored and mergify[bot] committed Feb 23, 2024
1 parent c0d4e75 commit 2131ed9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
34 changes: 17 additions & 17 deletions .github/actions/install-main-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2131ed9

Please sign in to comment.