Skip to content

Commit 7532ad9

Browse files
mpharriganncrubin
andauthored
Revamp CI: matrix, multi-Cirq (#755)
* CI fun * Try nightly Co-authored-by: Nicholas Rubin <[email protected]>
1 parent f4c17a6 commit 7532ad9

File tree

3 files changed

+51
-61
lines changed

3 files changed

+51
-61
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -43,37 +43,32 @@ jobs:
4343
- name: Lint
4444
run: check/pylint
4545
pytest:
46-
name: Pytest Ubuntu
47-
runs-on: ubuntu-18.04
46+
name: Pytest
47+
runs-on: ${{ matrix.os }}
48+
strategy:
49+
matrix:
50+
# On each operating system, check latest version of python and cirq
51+
os: [ ubuntu-latest, macos-latest, windows-latest ]
52+
python-version: [ '3.9' ]
53+
cirq-version: [ '~=0.13.0' ]
54+
# Also check least-supported versions (linux only)
55+
include:
56+
- os: ubuntu-latest
57+
python-version: 3.8
58+
cirq-version: '~=0.12.0'
59+
fail-fast: false
4860
steps:
49-
- uses: actions/checkout@v1
50-
- uses: actions/setup-python@v1
61+
- uses: actions/checkout@v2
62+
- uses: actions/setup-python@v2
5163
with:
52-
python-version: '3.6'
53-
architecture: 'x64'
64+
python-version: ${{ matrix.python-version }}
5465
- name: Install requirements
5566
run: |
56-
pip install -r requirements.txt
5767
pip install -r dev_tools/conf/pip-list-dev-tools.txt
58-
git config --global user.name ${GITHUB_ACTOR}
68+
pip install cirq-core${{matrix.cirq-version}} cirq-google${{matrix.cirq-version}} -r requirements.txt
5969
- name: Pytest check
60-
run: check/pytest --actually-quiet
61-
pytest37:
62-
name: Pytest Ubuntu
63-
runs-on: ubuntu-18.04
64-
steps:
65-
- uses: actions/checkout@v1
66-
- uses: actions/setup-python@v1
67-
with:
68-
python-version: '3.7'
69-
architecture: 'x64'
70-
- name: Install requirements
71-
run: |
72-
pip install -r requirements.txt
73-
pip install -r dev_tools/conf/pip-list-dev-tools.txt
74-
git config --global user.name ${GITHUB_ACTOR}
75-
- name: Pytest check
76-
run: check/pytest --actually-quiet
70+
run: check/pytest
71+
shell: bash
7772
coverage:
7873
name: Coverage check
7974
runs-on: ubuntu-18.04
@@ -90,35 +85,3 @@ jobs:
9085
git config --global user.name ${GITHUB_ACTOR}
9186
- name: Coverage check
9287
run: check/pytest-and-incremental-coverage --actually-quiet
93-
windows:
94-
name: Pytest Windows
95-
runs-on: windows-latest
96-
steps:
97-
- uses: actions/checkout@v1
98-
- uses: actions/setup-python@v1
99-
with:
100-
python-version: '3.6'
101-
architecture: 'x64'
102-
- name: Install requirements
103-
run: |
104-
pip install -r requirements.txt
105-
pip install -r dev_tools/conf/pip-list-dev-tools.txt
106-
- name: Pytest Windows
107-
run: check/pytest
108-
shell: bash
109-
macos:
110-
name: Pytest MacOS
111-
runs-on: macos-10.15
112-
steps:
113-
- uses: actions/checkout@v1
114-
- uses: actions/setup-python@v1
115-
with:
116-
python-version: '3.6'
117-
architecture: 'x64'
118-
- name: Install requirements
119-
run: |
120-
pip install -r requirements.txt
121-
pip install -r dev_tools/conf/pip-list-dev-tools.txt
122-
git config --global user.name ${GITHUB_ACTOR}
123-
- name: Pytest check
124-
run: check/pytest

.github/workflows/nightly.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Cirq Pre-release
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
cirq-next:
9+
name: Cirq Pre-release
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
os: [ ubuntu-latest, macos-latest, windows-latest ]
14+
python-version: [ '3.9' ]
15+
fail-fast: false
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install requirements
22+
run: |
23+
pip install -r dev_tools/conf/pip-list-dev-tools.txt
24+
pip install -r requirements.txt
25+
pip install -U cirq-core cirq-google --pre
26+
- name: Pytest check
27+
run: check/pytest
28+
shell: bash

requirements.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
cirq-core~=0.12.0
2-
cirq-google~=0.12.0
1+
cirq-core>=0.12.0
2+
cirq-google>=0.12.0
33
deprecation
44
h5py>=2.8
55
networkx
66
numpy>=1.11.0
77
pubchempy
8-
requests~=2.18
8+
requests>=2.18
99
scipy>=1.1.0
1010
sympy
11-
nbformat

0 commit comments

Comments
 (0)