From 819bb00adce4d183a0f0dde41f76d8889cd3bea0 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 21 Jun 2023 11:44:11 -0700 Subject: [PATCH 1/9] Pin Python to 3.7.16 for MacOS CI test Python 3.7.17 binary on MacOS seems to be binary incompatible with pandas-1.3.5, the last pandas release supporting Python 3.7. Fixes 6147 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5ba76e3668..8d12de52c3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -269,7 +269,7 @@ jobs: name: Pytest MacOS strategy: matrix: - python-version: [ '3.7', '3.8', '3.9', '3.10' ] + python-version: [ '3.7.16', '3.8', '3.9', '3.10' ] runs-on: macos-12 steps: - uses: actions/checkout@v2 From eea4d042f7a5bd3f2df2f4a3bbc10c2b04c31bf4 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 21 Jun 2023 12:12:52 -0700 Subject: [PATCH 2/9] Revert "Pin Python to 3.7.16 for MacOS CI test" This reverts commit 819bb00adce4d183a0f0dde41f76d8889cd3bea0. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d12de52c3c..d5ba76e3668 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -269,7 +269,7 @@ jobs: name: Pytest MacOS strategy: matrix: - python-version: [ '3.7.16', '3.8', '3.9', '3.10' ] + python-version: [ '3.7', '3.8', '3.9', '3.10' ] runs-on: macos-12 steps: - uses: actions/checkout@v2 From d90312b706d4adf530ea26372ca0494c86a35818 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 21 Jun 2023 12:13:26 -0700 Subject: [PATCH 3/9] DROPME - try to import bz2 before pandas --- conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conftest.py b/conftest.py index b23e1c70b02..7312600f830 100644 --- a/conftest.py +++ b/conftest.py @@ -13,6 +13,8 @@ # limitations under the License. import pytest +# FIXME +import bz2 def pytest_configure(config): From 103bda08c692429a1fbbe2e096596dfc7a82c526 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 21 Jun 2023 12:54:17 -0700 Subject: [PATCH 4/9] Revert "DROPME - try to import bz2 before pandas" This reverts commit d90312b706d4adf530ea26372ca0494c86a35818. --- conftest.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/conftest.py b/conftest.py index 7312600f830..b23e1c70b02 100644 --- a/conftest.py +++ b/conftest.py @@ -13,8 +13,6 @@ # limitations under the License. import pytest -# FIXME -import bz2 def pytest_configure(config): From e05da44c32ba90a4aa0a8863b8ef251b29cd8abe Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 21 Jun 2023 12:56:17 -0700 Subject: [PATCH 5/9] DROPME - try to just import the bz2 module --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5ba76e3668..1fb935dd044 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -269,7 +269,8 @@ jobs: name: Pytest MacOS strategy: matrix: - python-version: [ '3.7', '3.8', '3.9', '3.10' ] + # python-version: [ '3.7', '3.8', '3.9', '3.10' ] + python-version: ['3.7'] runs-on: macos-12 steps: - uses: actions/checkout@v2 @@ -286,7 +287,8 @@ jobs: pip install wheel pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt - name: Pytest check - run: check/pytest -n auto --ignore=cirq-core/cirq/contrib + # run: check/pytest -n auto --ignore=cirq-core/cirq/contrib + run: python -c 'import bz2' notebooks-stable: name: Changed Notebooks Isolated Test against Cirq stable env: From 8adc1ea0594e6e63f9a9f9cf664c40c9a1ce87b8 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 21 Jun 2023 13:08:26 -0700 Subject: [PATCH 6/9] Disable all CI checks except pytest macos Python 3.7 --- .github/workflows/ci.yml | 700 +++++++++++++++++++-------------------- 1 file changed, 350 insertions(+), 350 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1fb935dd044..258c317e6cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,258 +13,258 @@ concurrency: cancel-in-progress: true jobs: - quick_test: - name: Misc check - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Misc - run: check/misc - packaging_test: - name: Packaging test - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.7' - architecture: 'x64' - - name: Install dependencies - run: pip install -r dev_tools/requirements/deps/packaging.txt - - name: Run packaging test - run: ./dev_tools/packaging/packaging_test.sh - format: - name: Format check - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install dependencies - run: pip install -r dev_tools/requirements/deps/format.txt - - name: Format - run: check/format-incremental - mypy: - name: Type check - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install mypy - run: pip install -r dev_tools/requirements/mypy.env.txt - - name: Type check - run: check/mypy - changed_files: - name: Changed files test - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install changed files test dependencies - run: dev_tools/conf/pip-install-minimal-for-pytest-changed-files.sh - - name: Changed files test - run: check/pytest-changed-files -n auto - lint: - name: Lint check - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install pylint - run: pip install -r dev_tools/requirements/deps/pylint.txt - - name: Display version - run: check/pylint --version - - name: Lint - run: check/pylint -v - doc_test: - name: Doc test - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install requirements - run: pip install -r dev_tools/requirements/dev.env.txt - - name: RST check - run: find . -type f -name "*.rst" | xargs rstcheck --report warning --ignore-directives autoclass,automodule - - name: Doc check - run: check/doctest -q - nbformat: - name: Notebook formatting - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install requirements - run: pip install -r dev_tools/requirements/deps/tensorflow-docs.txt - - name: Doc check - run: check/nbformat - shellcheck: - name: Shell check - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Run shellcheck - run: check/shellcheck - isolated-modules: - name: Isolated pytest Ubuntu - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install dependencies - run: pip install -r dev_tools/requirements/isolated-base.env.txt - - name: Test each module in isolation - run: pytest -n auto -m slow dev_tools/packaging/isolated_packages_test.py - pytest: - name: Pytest Ubuntu - strategy: - matrix: - python-version: [ '3.7', '3.8', '3.9', '3.10' ] - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - architecture: 'x64' - - uses: actions/cache@v2 - with: - path: ${{ env.pythonLocation }} - key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} - - name: Install requirements - run: | - pip install wheel - pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt - - name: Run Quil dependencies - run: docker-compose -f cirq-rigetti/docker-compose.test.yaml up -d - - name: Pytest check - run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --rigetti-integration - - name: Stop Quil dependencies - run: docker-compose -f cirq-rigetti/docker-compose.test.yaml down - pip-compile: - name: Check consistency of requirements - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install requirements - run: pip install pip-tools - - name: Test dependencies with pip-compile - run: | - pip-compile --resolver=backtracking dev_tools/requirements/deps/cirq-all.txt -o- - build_docs: - name: Build docs - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install requirements - run: | - pip install -r rtd_docs/requirements.txt - - name: Build docs - run: dev_tools/docs/build-rtd-docs.sh - build_protos: - name: Build protos - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install requirements - run: | - pip install -r dev_tools/requirements/deps/protos.txt - - name: Build protos - run: check/build-changed-protos - coverage: - name: Coverage check - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - uses: actions/cache@v2 - with: - path: ${{ env.pythonLocation }} - key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} - - name: Install requirements - run: | - pip install wheel - pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt - - name: Run Quil dependencies - run: docker-compose -f cirq-rigetti/docker-compose.test.yaml up -d - - name: Coverage check - run: check/pytest-and-incremental-coverage -n auto --rigetti-integration - - name: Stop Quil dependencies - run: docker-compose -f cirq-rigetti/docker-compose.test.yaml down - windows: - name: Pytest Windows - strategy: - matrix: - python-version: [ '3.7', '3.8', '3.9', '3.10' ] - runs-on: windows-2019 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - architecture: 'x64' - - uses: actions/cache@v2 - with: - path: ${{ env.pythonLocation }} - key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} - - name: Install requirements - run: | - pip install wheel - pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt - - name: Pytest Windows - run: | - source dev_tools/pypath - check/pytest -n auto --ignore=cirq-core/cirq/contrib - shell: bash + # quick_test: + # name: Misc check + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Misc + # run: check/misc + # packaging_test: + # name: Packaging test + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.7' + # architecture: 'x64' + # - name: Install dependencies + # run: pip install -r dev_tools/requirements/deps/packaging.txt + # - name: Run packaging test + # run: ./dev_tools/packaging/packaging_test.sh + # format: + # name: Format check + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install dependencies + # run: pip install -r dev_tools/requirements/deps/format.txt + # - name: Format + # run: check/format-incremental + # mypy: + # name: Type check + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install mypy + # run: pip install -r dev_tools/requirements/mypy.env.txt + # - name: Type check + # run: check/mypy + # changed_files: + # name: Changed files test + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install changed files test dependencies + # run: dev_tools/conf/pip-install-minimal-for-pytest-changed-files.sh + # - name: Changed files test + # run: check/pytest-changed-files -n auto + # lint: + # name: Lint check + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install pylint + # run: pip install -r dev_tools/requirements/deps/pylint.txt + # - name: Display version + # run: check/pylint --version + # - name: Lint + # run: check/pylint -v + # doc_test: + # name: Doc test + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install requirements + # run: pip install -r dev_tools/requirements/dev.env.txt + # - name: RST check + # run: find . -type f -name "*.rst" | xargs rstcheck --report warning --ignore-directives autoclass,automodule + # - name: Doc check + # run: check/doctest -q + # nbformat: + # name: Notebook formatting + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install requirements + # run: pip install -r dev_tools/requirements/deps/tensorflow-docs.txt + # - name: Doc check + # run: check/nbformat + # shellcheck: + # name: Shell check + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - name: Run shellcheck + # run: check/shellcheck + # isolated-modules: + # name: Isolated pytest Ubuntu + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install dependencies + # run: pip install -r dev_tools/requirements/isolated-base.env.txt + # - name: Test each module in isolation + # run: pytest -n auto -m slow dev_tools/packaging/isolated_packages_test.py + # pytest: + # name: Pytest Ubuntu + # strategy: + # matrix: + # python-version: [ '3.7', '3.8', '3.9', '3.10' ] + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: ${{ matrix.python-version }} + # architecture: 'x64' + # - uses: actions/cache@v2 + # with: + # path: ${{ env.pythonLocation }} + # key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} + # - name: Install requirements + # run: | + # pip install wheel + # pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt + # - name: Run Quil dependencies + # run: docker-compose -f cirq-rigetti/docker-compose.test.yaml up -d + # - name: Pytest check + # run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --rigetti-integration + # - name: Stop Quil dependencies + # run: docker-compose -f cirq-rigetti/docker-compose.test.yaml down + # pip-compile: + # name: Check consistency of requirements + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install requirements + # run: pip install pip-tools + # - name: Test dependencies with pip-compile + # run: | + # pip-compile --resolver=backtracking dev_tools/requirements/deps/cirq-all.txt -o- + # build_docs: + # name: Build docs + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install requirements + # run: | + # pip install -r rtd_docs/requirements.txt + # - name: Build docs + # run: dev_tools/docs/build-rtd-docs.sh + # build_protos: + # name: Build protos + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install requirements + # run: | + # pip install -r dev_tools/requirements/deps/protos.txt + # - name: Build protos + # run: check/build-changed-protos + # coverage: + # name: Coverage check + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - uses: actions/cache@v2 + # with: + # path: ${{ env.pythonLocation }} + # key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} + # - name: Install requirements + # run: | + # pip install wheel + # pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt + # - name: Run Quil dependencies + # run: docker-compose -f cirq-rigetti/docker-compose.test.yaml up -d + # - name: Coverage check + # run: check/pytest-and-incremental-coverage -n auto --rigetti-integration + # - name: Stop Quil dependencies + # run: docker-compose -f cirq-rigetti/docker-compose.test.yaml down + # windows: + # name: Pytest Windows + # strategy: + # matrix: + # python-version: [ '3.7', '3.8', '3.9', '3.10' ] + # runs-on: windows-2019 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: ${{ matrix.python-version }} + # architecture: 'x64' + # - uses: actions/cache@v2 + # with: + # path: ${{ env.pythonLocation }} + # key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} + # - name: Install requirements + # run: | + # pip install wheel + # pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt + # - name: Pytest Windows + # run: | + # source dev_tools/pypath + # check/pytest -n auto --ignore=cirq-core/cirq/contrib + # shell: bash macos: name: Pytest MacOS strategy: @@ -282,104 +282,104 @@ jobs: with: path: ${{ env.pythonLocation }} key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} - - name: Install requirements - run: | - pip install wheel - pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt + # - name: Install requirements + # run: | + # pip install wheel + # pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt - name: Pytest check # run: check/pytest -n auto --ignore=cirq-core/cirq/contrib run: python -c 'import bz2' - notebooks-stable: - name: Changed Notebooks Isolated Test against Cirq stable - env: - NOTEBOOK_PARTITIONS: 4 - strategy: - matrix: - # partitions should be named partition-0 to partition-(NOTEBOOK_PARTITIONS-1) - partition: [partition-0, partition-1, partition-2, partition-3] - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install requirements - run: pip install -r dev_tools/requirements/isolated-base.env.txt - - name: Notebook tests - run: check/pytest -n auto -m slow dev_tools/notebooks/isolated_notebook_test.py -k ${{matrix.partition}} - - uses: actions/upload-artifact@v2 - if: failure() - with: - name: notebook-outputs - path: out - notebooks-branch: - name: Notebook Tests against PR - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: '3.8' - architecture: 'x64' - - name: Install requirements - run: pip install -r dev_tools/requirements/notebooks.env.txt - - name: Notebook tests - run: check/pytest -n auto -m slow dev_tools/notebooks/notebook_test.py - - uses: actions/upload-artifact@v2 - if: failure() - with: - name: notebook-outputs - path: out - ts-build: - name: Bundle file consistency - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '14.16.1' - - name: Install npm - run: check/npm ci - - name: Check build matches the current - run: check/ts-build-current - ts-lint: - name: Typescript lint check - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '14.16.1' - - name: Install npm - run: check/npm ci - - name: Lint - run: check/ts-lint - ts-test: - name: Typescript tests - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '14.16.1' - - name: Install npm dependencies - run: check/npm ci - - name: Unit tests - run: check/ts-test - - name: End to end tests - run: check/ts-test-e2e - ts-coverage: - name: Typescript tests coverage - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: '14.16.1' - - name: Install npm dependencies - run: check/npm ci - - name: Test - run: check/ts-coverage + # notebooks-stable: + # name: Changed Notebooks Isolated Test against Cirq stable + # env: + # NOTEBOOK_PARTITIONS: 4 + # strategy: + # matrix: + # # partitions should be named partition-0 to partition-(NOTEBOOK_PARTITIONS-1) + # partition: [partition-0, partition-1, partition-2, partition-3] + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # with: + # fetch-depth: 0 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install requirements + # run: pip install -r dev_tools/requirements/isolated-base.env.txt + # - name: Notebook tests + # run: check/pytest -n auto -m slow dev_tools/notebooks/isolated_notebook_test.py -k ${{matrix.partition}} + # - uses: actions/upload-artifact@v2 + # if: failure() + # with: + # name: notebook-outputs + # path: out + # notebooks-branch: + # name: Notebook Tests against PR + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-python@v1 + # with: + # python-version: '3.8' + # architecture: 'x64' + # - name: Install requirements + # run: pip install -r dev_tools/requirements/notebooks.env.txt + # - name: Notebook tests + # run: check/pytest -n auto -m slow dev_tools/notebooks/notebook_test.py + # - uses: actions/upload-artifact@v2 + # if: failure() + # with: + # name: notebook-outputs + # path: out + # ts-build: + # name: Bundle file consistency + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: '14.16.1' + # - name: Install npm + # run: check/npm ci + # - name: Check build matches the current + # run: check/ts-build-current + # ts-lint: + # name: Typescript lint check + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: '14.16.1' + # - name: Install npm + # run: check/npm ci + # - name: Lint + # run: check/ts-lint + # ts-test: + # name: Typescript tests + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: '14.16.1' + # - name: Install npm dependencies + # run: check/npm ci + # - name: Unit tests + # run: check/ts-test + # - name: End to end tests + # run: check/ts-test-e2e + # ts-coverage: + # name: Typescript tests coverage + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: '14.16.1' + # - name: Install npm dependencies + # run: check/npm ci + # - name: Test + # run: check/ts-coverage From 880cc52219e60ec95403411bd8c44f6dbd38a983 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 21 Jun 2023 13:12:51 -0700 Subject: [PATCH 7/9] Try to update actions steps for the macos test --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 258c317e6cf..008f83a5852 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -273,8 +273,8 @@ jobs: python-version: ['3.7'] runs-on: macos-12 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: 'x64' From b317c2f4d51107078d49a98a0f71320e4a0372b7 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 21 Jun 2023 13:14:41 -0700 Subject: [PATCH 8/9] Update macos version for the pytest --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 008f83a5852..30b53309cb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -271,7 +271,7 @@ jobs: matrix: # python-version: [ '3.7', '3.8', '3.9', '3.10' ] python-version: ['3.7'] - runs-on: macos-12 + runs-on: macos-13 steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 From 43f0422f1a57953b61c9911afa336506a7792668 Mon Sep 17 00:00:00 2001 From: Pavol Juhas Date: Wed, 21 Jun 2023 13:41:13 -0700 Subject: [PATCH 9/9] Delete disabled jobs --- .github/workflows/ci.yml | 352 --------------------------------------- 1 file changed, 352 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30b53309cb3..836d80ba864 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,263 +13,10 @@ concurrency: cancel-in-progress: true jobs: - # quick_test: - # name: Misc check - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Misc - # run: check/misc - # packaging_test: - # name: Packaging test - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.7' - # architecture: 'x64' - # - name: Install dependencies - # run: pip install -r dev_tools/requirements/deps/packaging.txt - # - name: Run packaging test - # run: ./dev_tools/packaging/packaging_test.sh - # format: - # name: Format check - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install dependencies - # run: pip install -r dev_tools/requirements/deps/format.txt - # - name: Format - # run: check/format-incremental - # mypy: - # name: Type check - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install mypy - # run: pip install -r dev_tools/requirements/mypy.env.txt - # - name: Type check - # run: check/mypy - # changed_files: - # name: Changed files test - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install changed files test dependencies - # run: dev_tools/conf/pip-install-minimal-for-pytest-changed-files.sh - # - name: Changed files test - # run: check/pytest-changed-files -n auto - # lint: - # name: Lint check - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install pylint - # run: pip install -r dev_tools/requirements/deps/pylint.txt - # - name: Display version - # run: check/pylint --version - # - name: Lint - # run: check/pylint -v - # doc_test: - # name: Doc test - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install requirements - # run: pip install -r dev_tools/requirements/dev.env.txt - # - name: RST check - # run: find . -type f -name "*.rst" | xargs rstcheck --report warning --ignore-directives autoclass,automodule - # - name: Doc check - # run: check/doctest -q - # nbformat: - # name: Notebook formatting - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install requirements - # run: pip install -r dev_tools/requirements/deps/tensorflow-docs.txt - # - name: Doc check - # run: check/nbformat - # shellcheck: - # name: Shell check - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - name: Run shellcheck - # run: check/shellcheck - # isolated-modules: - # name: Isolated pytest Ubuntu - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install dependencies - # run: pip install -r dev_tools/requirements/isolated-base.env.txt - # - name: Test each module in isolation - # run: pytest -n auto -m slow dev_tools/packaging/isolated_packages_test.py - # pytest: - # name: Pytest Ubuntu - # strategy: - # matrix: - # python-version: [ '3.7', '3.8', '3.9', '3.10' ] - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: ${{ matrix.python-version }} - # architecture: 'x64' - # - uses: actions/cache@v2 - # with: - # path: ${{ env.pythonLocation }} - # key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} - # - name: Install requirements - # run: | - # pip install wheel - # pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt - # - name: Run Quil dependencies - # run: docker-compose -f cirq-rigetti/docker-compose.test.yaml up -d - # - name: Pytest check - # run: check/pytest -n auto --ignore=cirq-core/cirq/contrib --rigetti-integration - # - name: Stop Quil dependencies - # run: docker-compose -f cirq-rigetti/docker-compose.test.yaml down - # pip-compile: - # name: Check consistency of requirements - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install requirements - # run: pip install pip-tools - # - name: Test dependencies with pip-compile - # run: | - # pip-compile --resolver=backtracking dev_tools/requirements/deps/cirq-all.txt -o- - # build_docs: - # name: Build docs - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install requirements - # run: | - # pip install -r rtd_docs/requirements.txt - # - name: Build docs - # run: dev_tools/docs/build-rtd-docs.sh - # build_protos: - # name: Build protos - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install requirements - # run: | - # pip install -r dev_tools/requirements/deps/protos.txt - # - name: Build protos - # run: check/build-changed-protos - # coverage: - # name: Coverage check - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - uses: actions/cache@v2 - # with: - # path: ${{ env.pythonLocation }} - # key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} - # - name: Install requirements - # run: | - # pip install wheel - # pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/dev.env.txt - # - name: Run Quil dependencies - # run: docker-compose -f cirq-rigetti/docker-compose.test.yaml up -d - # - name: Coverage check - # run: check/pytest-and-incremental-coverage -n auto --rigetti-integration - # - name: Stop Quil dependencies - # run: docker-compose -f cirq-rigetti/docker-compose.test.yaml down - # windows: - # name: Pytest Windows - # strategy: - # matrix: - # python-version: [ '3.7', '3.8', '3.9', '3.10' ] - # runs-on: windows-2019 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: ${{ matrix.python-version }} - # architecture: 'x64' - # - uses: actions/cache@v2 - # with: - # path: ${{ env.pythonLocation }} - # key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} - # - name: Install requirements - # run: | - # pip install wheel - # pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt - # - name: Pytest Windows - # run: | - # source dev_tools/pypath - # check/pytest -n auto --ignore=cirq-core/cirq/contrib - # shell: bash macos: name: Pytest MacOS strategy: matrix: - # python-version: [ '3.7', '3.8', '3.9', '3.10' ] python-version: ['3.7'] runs-on: macos-13 steps: @@ -282,104 +29,5 @@ jobs: with: path: ${{ env.pythonLocation }} key: ${{ env.pythonLocation }}-${{ hashFiles('**/requirements.txt', 'dev_tools/requirements/**/*.txt') }} - # - name: Install requirements - # run: | - # pip install wheel - # pip install --upgrade --upgrade-strategy eager -r dev_tools/requirements/no-contrib.env.txt - name: Pytest check - # run: check/pytest -n auto --ignore=cirq-core/cirq/contrib run: python -c 'import bz2' - # notebooks-stable: - # name: Changed Notebooks Isolated Test against Cirq stable - # env: - # NOTEBOOK_PARTITIONS: 4 - # strategy: - # matrix: - # # partitions should be named partition-0 to partition-(NOTEBOOK_PARTITIONS-1) - # partition: [partition-0, partition-1, partition-2, partition-3] - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 0 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install requirements - # run: pip install -r dev_tools/requirements/isolated-base.env.txt - # - name: Notebook tests - # run: check/pytest -n auto -m slow dev_tools/notebooks/isolated_notebook_test.py -k ${{matrix.partition}} - # - uses: actions/upload-artifact@v2 - # if: failure() - # with: - # name: notebook-outputs - # path: out - # notebooks-branch: - # name: Notebook Tests against PR - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-python@v1 - # with: - # python-version: '3.8' - # architecture: 'x64' - # - name: Install requirements - # run: pip install -r dev_tools/requirements/notebooks.env.txt - # - name: Notebook tests - # run: check/pytest -n auto -m slow dev_tools/notebooks/notebook_test.py - # - uses: actions/upload-artifact@v2 - # if: failure() - # with: - # name: notebook-outputs - # path: out - # ts-build: - # name: Bundle file consistency - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: '14.16.1' - # - name: Install npm - # run: check/npm ci - # - name: Check build matches the current - # run: check/ts-build-current - # ts-lint: - # name: Typescript lint check - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: '14.16.1' - # - name: Install npm - # run: check/npm ci - # - name: Lint - # run: check/ts-lint - # ts-test: - # name: Typescript tests - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: '14.16.1' - # - name: Install npm dependencies - # run: check/npm ci - # - name: Unit tests - # run: check/ts-test - # - name: End to end tests - # run: check/ts-test-e2e - # ts-coverage: - # name: Typescript tests coverage - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v2 - # - uses: actions/setup-node@v2 - # with: - # node-version: '14.16.1' - # - name: Install npm dependencies - # run: check/npm ci - # - name: Test - # run: check/ts-coverage