diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc8cb636979e..2005ada06994 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,17 +9,24 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: 3.11 + python-version: 3.12 + allow-prereleases: true - uses: actions/cache@v3 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} + # - if: "contains(matrix.python-version, '-dev')" + - run: | + sudo apt-get update + # https://lxml.de/installation.html#requirements + sudo apt-get install -y libxml2 libxslt-dev - name: Install dependencies run: | python -m pip install --upgrade pip setuptools six wheel + # python -m pip install Cython git+https://github.com/cclauss/numpy.git@patch-1 python -m pip install pytest-cov -r requirements.txt - name: Run tests # TODO: #8818 Re-enable quantum tests diff --git a/.github/workflows/directory_writer.yml b/.github/workflows/directory_writer.yml index 702c15f1e29b..8ed02ee74695 100644 --- a/.github/workflows/directory_writer.yml +++ b/.github/workflows/directory_writer.yml @@ -11,7 +11,8 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v4 with: - python-version: 3.x + python-version: 3.12 + allow-prereleases: true - name: Write DIRECTORY.md run: | scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md diff --git a/.github/workflows/project_euler.yml b/.github/workflows/project_euler.yml index 7bbccf76e192..ed68341482ad 100644 --- a/.github/workflows/project_euler.yml +++ b/.github/workflows/project_euler.yml @@ -17,11 +17,12 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: 3.x + python-version: 3.12 + allow-prereleases: true - name: Install pytest and pytest-cov run: | python -m pip install --upgrade pip - python -m pip install --upgrade numpy pytest pytest-cov + python -m pip install --upgrade numpy==v1.26.0rc1 pytest pytest-cov - run: pytest --doctest-modules --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/ validate-solutions: runs-on: ubuntu-latest @@ -29,11 +30,12 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: 3.x + python-version: 3.12 + allow-prereleases: true - name: Install pytest and requests run: | python -m pip install --upgrade pip - python -m pip install --upgrade numpy pytest requests + python -m pip install --upgrade numpy==v1.26.0rc1 pytest requests - run: pytest scripts/validate_solutions.py env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/requirements.txt b/requirements.txt index 1128e9d66820..2570ca829485 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,20 +4,20 @@ imageio keras lxml matplotlib -numpy +numpy==v1.26.0rc1 opencv-python -pandas +pandas ; python_version < '3.12' pillow -projectq -qiskit -qiskit-aer +projectq ; python_version < '3.12' +qiskit ; python_version < '3.12' +qiskit-aer ; python_version < '3.12' requests rich scikit-fuzzy -scikit-learn -statsmodels +scikit-learn ; python_version < '3.12' +statsmodels ; python_version < '3.12' sympy -tensorflow +tensorflow ; python_version < '3.12' texttable tweepy xgboost