Skip to content

Revamp CI: matrix, multi-Cirq #755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 20 additions & 57 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,32 @@ jobs:
- name: Lint
run: check/pylint
pytest:
name: Pytest Ubuntu
runs-on: ubuntu-18.04
name: Pytest
runs-on: ${{ matrix.os }}
strategy:
matrix:
# On each operating system, check latest version of python and cirq
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.9' ]
cirq-version: [ '~=0.13.0' ]
# Also check least-supported versions (linux only)
include:
- os: ubuntu-latest
python-version: 3.8
cirq-version: '~=0.12.0'
fail-fast: false
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.6'
architecture: 'x64'
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip install -r requirements.txt
pip install -r dev_tools/conf/pip-list-dev-tools.txt
git config --global user.name ${GITHUB_ACTOR}
pip install cirq-core${{matrix.cirq-version}} cirq-google${{matrix.cirq-version}} -r requirements.txt
- name: Pytest check
run: check/pytest --actually-quiet
pytest37:
name: Pytest Ubuntu
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.7'
architecture: 'x64'
- name: Install requirements
run: |
pip install -r requirements.txt
pip install -r dev_tools/conf/pip-list-dev-tools.txt
git config --global user.name ${GITHUB_ACTOR}
- name: Pytest check
run: check/pytest --actually-quiet
run: check/pytest
shell: bash
coverage:
name: Coverage check
runs-on: ubuntu-18.04
Expand All @@ -90,35 +85,3 @@ jobs:
git config --global user.name ${GITHUB_ACTOR}
- name: Coverage check
run: check/pytest-and-incremental-coverage --actually-quiet
windows:
name: Pytest Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.6'
architecture: 'x64'
- name: Install requirements
run: |
pip install -r requirements.txt
pip install -r dev_tools/conf/pip-list-dev-tools.txt
- name: Pytest Windows
run: check/pytest
shell: bash
macos:
name: Pytest MacOS
runs-on: macos-10.15
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.6'
architecture: 'x64'
- name: Install requirements
run: |
pip install -r requirements.txt
pip install -r dev_tools/conf/pip-list-dev-tools.txt
git config --global user.name ${GITHUB_ACTOR}
- name: Pytest check
run: check/pytest
28 changes: 28 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Cirq Pre-release

on:
schedule:
- cron: "0 0 * * *"

jobs:
cirq-next:
name: Cirq Pre-release
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.9' ]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: |
pip install -r dev_tools/conf/pip-list-dev-tools.txt
pip install -r requirements.txt
pip install -U cirq-core cirq-google --pre
- name: Pytest check
run: check/pytest
shell: bash
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
cirq-core~=0.12.0
cirq-google~=0.12.0
cirq-core>=0.12.0
cirq-google>=0.12.0
deprecation
h5py>=2.8
networkx
numpy>=1.11.0
pubchempy
requests~=2.18
requests>=2.18
scipy>=1.1.0
sympy
nbformat