diff --git a/.github/workflows/test_development_versions.yml b/.github/workflows/test_development_versions.yml new file mode 100644 index 0000000..303cc62 --- /dev/null +++ b/.github/workflows/test_development_versions.yml @@ -0,0 +1,59 @@ +name: Development version tests + +on: + push: + branches: + - main + - 'stable/**' + pull_request: + branches: + - main + - 'stable/**' + schedule: + - cron: '0 1 * * *' + +jobs: + tests: + name: development version tests (${{ matrix.os }}, ${{ matrix.python-version }}) + runs-on: ${{ matrix.os }} + timeout-minutes: 30 + strategy: + fail-fast: false + max-parallel: 4 + matrix: + os: [ubuntu-latest] + python-version: ["3.10", "3.14"] + steps: + - uses: actions/checkout@v7 + with: + # The reference energies the tests check against come from data in the + # vendored upstream checkout, and setup.py needs its headers to compile. + submodules: recursive + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v7 + with: + python-version: ${{ matrix.python-version }} + - name: Install MPI and BLAS (Linux) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y libopenmpi-dev openmpi-bin libopenblas-dev + - name: Install tools from pypi + run: | + python -m pip install --upgrade pip + python -m pip install tox build 'extremal-python-dependencies<2' + - name: Build qiskit-addon-sqd development wheel + run: | + git clone https://github.com/Qiskit/qiskit-addon-sqd + cd qiskit-addon-sqd + git rev-parse HEAD + python -m build --wheel + - name: Pin development versions + shell: bash + run: >- + extremal-python-dependencies pin-dependencies --inplace + "qiskit-addon-sqd @ file:$(echo qiskit-addon-sqd/dist/*.whl)" + - name: Test using tox environments + shell: bash + run: | + tox -e py,notebook,mpi