Skip to content

Commit

Permalink
Fix development version tests (#31)
Browse files Browse the repository at this point in the history
Propagation of Qiskit/qiskit-addon-aqc-tensor#26
to here
  • Loading branch information
garrison authored Nov 8, 2024
1 parent 807d4e5 commit c999a9f
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions .github/workflows/test_development_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,39 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Determine development versions
shell: bash
run: |
# NOTE: by determining the current git commit SHAs, we can ensure that
# the individually run tox environments indeed actually use the exact
# same versions (which may not be the case if at the exact time a new
# commit gets added to the respective repositories).
# Additionally, using these commit SHAs ensures that the locally built
# Python wheels get cached, ensuring a faster tox environment setup
# for the multiple jobs below.
QISKIT_SHA=$(git ls-remote "https://github.com/Qiskit/qiskit" | grep HEAD | awk '{print $1}')
echo "QISKIT_SHA=$QISKIT_SHA" >> "$GITHUB_ENV"
echo "Using Qiskit/qiskit @ $QISKIT_SHA"
QISKIT_IBM_RUNTIME_SHA=$(git ls-remote "https://github.com/Qiskit/qiskit-ibm-runtime" | grep HEAD | awk '{print $1}')
echo "QISKIT_IBM_RUNTIME_SHA=$QISKIT_IBM_RUNTIME_SHA" >> "$GITHUB_ENV"
echo "Using Qiskit/qiskit-ibm-runtime @ $QISKIT_IBM_RUNTIME_SHA"
- name: Pinning development versions
shell: bash
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
python -m pip install tox extremal-python-dependencies==0.0.3
extremal-python-dependencies pin-dependencies \
"qiskit @ git+https://github.com/Qiskit/qiskit.git@$QISKIT_SHA" \
"qiskit-ibm-runtime @ git+https://github.com/Qiskit/qiskit-ibm-runtime.git@$QISKIT_IBM_RUNTIME_SHA" \
--inplace
- name: Install tools from pypi
run: |
python -m pip install tox build extremal-python-dependencies==0.0.3
- name: Build Qiskit SDK development wheel
run: |
git clone https://github.com/Qiskit/qiskit
cd qiskit
git rev-parse HEAD
python -m build --wheel
- name: Build qiskit-ibm-runtime development wheel
run: |
git clone https://github.com/Qiskit/qiskit-ibm-runtime
cd qiskit-ibm-runtime
git rev-parse HEAD
python -m build --wheel
- name: Build qiskit-addon-utils development wheel
run: |
git clone https://github.com/Qiskit/qiskit-addon-utils
cd qiskit-addon-utils
git rev-parse HEAD
# Unpin qiskit<2
extremal-python-dependencies pin-dependencies --inplace qiskit
python -m build --wheel
- name: Pin development versions
shell: bash
run: >-
extremal-python-dependencies pin-dependencies --inplace
"qiskit @ file:$(echo qiskit/dist/*.whl)"
"qiskit-ibm-runtime @ file:$(echo qiskit-ibm-runtime/dist/*.whl)"
"qiskit-addon-utils @ file:$(echo qiskit-addon-utils/dist/*.whl)"
- name: Test using tox environment
shell: bash
run: |
Expand Down

0 comments on commit c999a9f

Please sign in to comment.