Skip to content

Commit af04313

Browse files
github-actions[bot]Takishimadependabot[bot]web-flow
authored
Release version 0.7.1 (#426)
* Bump thomaseizinger/create-pull-request from 1.1.0 to 1.2.1 (#414) * Bump thomaseizinger/create-pull-request from 1.1.0 to 1.2.1 Bumps [thomaseizinger/create-pull-request](https://github.com/thomaseizinger/create-pull-request) from 1.1.0 to 1.2.1. - [Release notes](https://github.com/thomaseizinger/create-pull-request/releases) - [Changelog](https://github.com/thomaseizinger/create-pull-request/blob/master/CHANGELOG.md) - [Commits](thomaseizinger/create-pull-request@1.1.0...1.2.1) --- updated-dependencies: - dependency-name: thomaseizinger/create-pull-request dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update CHANGELOG Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nguyen Damien <[email protected]> * Bump thomaseizinger/keep-a-changelog-new-release from 1.2.1 to 1.3.0 (#416) * Bump thomaseizinger/keep-a-changelog-new-release from 1.2.1 to 1.3.0 Bumps [thomaseizinger/keep-a-changelog-new-release](https://github.com/thomaseizinger/keep-a-changelog-new-release) from 1.2.1 to 1.3.0. - [Release notes](https://github.com/thomaseizinger/keep-a-changelog-new-release/releases) - [Changelog](https://github.com/thomaseizinger/keep-a-changelog-new-release/blob/master/CHANGELOG.md) - [Commits](thomaseizinger/keep-a-changelog-new-release@1.2.1...1.3.0) --- updated-dependencies: - dependency-name: thomaseizinger/keep-a-changelog-new-release dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update CHANGELOG Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Damien Nguyen <[email protected]> * Bump thomaseizinger/create-pull-request from 1.2.1 to 1.2.2 (#419) * Bump thomaseizinger/create-pull-request from 1.2.1 to 1.2.2 Bumps [thomaseizinger/create-pull-request](https://github.com/thomaseizinger/create-pull-request) from 1.2.1 to 1.2.2. - [Release notes](https://github.com/thomaseizinger/create-pull-request/releases) - [Changelog](https://github.com/thomaseizinger/create-pull-request/blob/master/CHANGELOG.md) - [Commits](thomaseizinger/create-pull-request@1.2.1...1.2.2) --- updated-dependencies: - dependency-name: thomaseizinger/create-pull-request dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Update CHANGELOG Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nguyen Damien <[email protected]> * Update CI setup (#422) * Fix compiler flags cleanup routine * Update CHANGELOG * Use clang for linking on Clang CI workflows * Fix compiler_test(...) function in setup.py * Fix CI failure when testing locally * Remove LDSHARED for Clang build * Fix linter warnings in setup.py * Update CHANGELOG * Update more workflow files for local actions * Remove deprecated GitHub action for pre-commit * Update CHANGELOG * Update pre-commit hooks versions * Refrain from updating pylint pre-commit hook for now * Fix issue with running pre-commit on CI * Add cache support for pre-commit on CI * Fix name of caching step for pre-commit on CI * Add Python 3.10 for testing on CI * Add Python 3.10 in package metadata * Fix gen_reqfile command if --include-extras is not provided * Add setup option to avoid -march=native when building ProjectQ * Add support for CIBuildWheel in pyproject.toml * Tweak environment variables used during setup * Avoid Linux Musl in CIBuildWheel config * Update GitHub Workflow for publishing a release * Bump dangoslen/changelog-enforcer from 2 to 3 (#423) * Bump dangoslen/changelog-enforcer from 2 to 3 Bumps [dangoslen/changelog-enforcer](https://github.com/dangoslen/changelog-enforcer) from 2 to 3. - [Release notes](https://github.com/dangoslen/changelog-enforcer/releases) - [Changelog](https://github.com/dangoslen/changelog-enforcer/blob/master/CHANGELOG.md) - [Commits](dangoslen/changelog-enforcer@v2...v3) --- updated-dependencies: - dependency-name: dangoslen/changelog-enforcer dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Update CHANGELOG Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nguyen Damien <[email protected]> * Remove windows-2016 from GitHub workflows (#424) * Re-add build of binary wheels (#425) - For now without automatic upload of binaries to PyPi * Preparing release v0.7.1 * Update CHANGELOG.md * Last minute fix for release drafting workflow Co-authored-by: Nguyen Damien <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: GitHub actions <[email protected]>
1 parent db4a088 commit af04313

File tree

11 files changed

+235
-125
lines changed

11 files changed

+235
-125
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- 3.7
2121
- 3.8
2222
- 3.9
23+
- '3.10'
2324

2425
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
2526
runs-on: ${{ matrix.runs-on }}
@@ -28,6 +29,7 @@ jobs:
2829
- uses: actions/checkout@v2
2930

3031
- name: Get history and tags for SCM versioning to work
32+
if: ${{ !env.ACT }}
3133
run: |
3234
git fetch --prune --unshallow
3335
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
@@ -125,6 +127,7 @@ jobs:
125127
- uses: actions/checkout@v2
126128

127129
- name: Get history and tags for SCM versioning to work
130+
if: ${{ !env.ACT }}
128131
run: |
129132
git fetch --prune --unshallow
130133
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
@@ -134,6 +137,7 @@ jobs:
134137
apt-get update && apt-get install -y python3-dev python3-pip python3-setuptools python3-wheel
135138
python3-numpy python3-scipy python3-matplotlib python3-requests python3-networkx
136139
python3-pytest python3-pytest-cov python3-flaky
140+
libomp-dev
137141
--no-install-recommends
138142
139143
- name: Prepare Python env
@@ -169,6 +173,7 @@ jobs:
169173
- uses: actions/checkout@v2
170174

171175
- name: Get history and tags for SCM versioning to work
176+
if: ${{ !env.ACT }}
172177
run: |
173178
git fetch --prune --unshallow
174179
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
@@ -236,6 +241,7 @@ jobs:
236241
- uses: actions/checkout@v2
237242

238243
- name: Get history and tags for SCM versioning to work
244+
if: ${{ !env.ACT }}
239245
run: |
240246
git fetch --prune --unshallow
241247
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
@@ -285,6 +291,7 @@ jobs:
285291
restore-keys: ${{ runner.os }}-doc-pip-
286292

287293
- name: Get history and tags for SCM versioning to work
294+
if: ${{ !env.ACT }}
288295
run: |
289296
git fetch --prune --unshallow
290297
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
@@ -300,54 +307,3 @@ jobs:
300307

301308
- name: Make SDist
302309
run: python3 setup.py sdist
303-
304-
305-
win32-msvc2017:
306-
name: "🐍 ${{ matrix.python }} • MSVC 2017 • x64"
307-
runs-on: windows-2016
308-
strategy:
309-
fail-fast: false
310-
matrix:
311-
python:
312-
- 3.6
313-
- 3.7
314-
- 3.8
315-
- 3.9
316-
317-
steps:
318-
- uses: actions/checkout@v2
319-
320-
- name: Get history and tags for SCM versioning to work
321-
run: |
322-
git fetch --prune --unshallow
323-
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
324-
325-
- name: Get pip cache dir
326-
id: pip-cache
327-
run: |
328-
echo "::set-output name=dir::$(python -m pip cache dir)"
329-
330-
- name: Cache wheels
331-
uses: actions/cache@v2
332-
with:
333-
path: ${{ steps.pip-cache.outputs.dir }}
334-
key: ${{ runner.os }}-${{ matrix.python }}-pip-${{ hashFiles('**/setup.cfg') }}
335-
restore-keys: ${{ runner.os }}-${{ matrix.python }}-pip-
336-
337-
- name: Setup 🐍 ${{ matrix.python }}
338-
uses: actions/setup-python@v2
339-
with:
340-
python-version: ${{ matrix.python }}
341-
342-
- name: Prepare env
343-
run: |
344-
python setup.py gen_reqfile --include-extras=test,braket
345-
python -m pip install -r requirements.txt --prefer-binary
346-
347-
- name: Build and install package
348-
run: python -m pip install -ve .[braket,test]
349-
350-
- name: Run all checks
351-
run: |
352-
echo 'backend: Agg' > matplotlibrc
353-
python3 -m pytest -p no:warnings

.github/workflows/draft_release.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ name: "Draft new release"
33
on:
44
workflow_dispatch:
55
inputs:
6-
version:
7-
description: 'Version to release'
6+
tag:
7+
description: 'Tag to prepare (format: vXX.YY.ZZ)'
88
required: true
9-
109
jobs:
1110
new-release:
1211
name: "Draft a new release"
@@ -23,12 +22,12 @@ jobs:
2322
git flow init --default --tag v
2423
2524
- name: Create release branch
26-
run: git flow release start ${{ github.event.inputs.version }}
25+
run: git flow release start ${{ github.event.inputs.tag }}
2726

2827
- name: Update changelog
29-
uses: thomaseizinger/keep-a-changelog-new-release@1.2.1
28+
uses: thomaseizinger/keep-a-changelog-new-release@1.3.0
3029
with:
31-
version: ${{ github.event.inputs.version }}
30+
version: ${{ github.event.inputs.tag }}
3231

3332
- name: Initialize mandatory git config
3433
run: |
@@ -39,21 +38,21 @@ jobs:
3938
id: make-commit
4039
run: |
4140
git add CHANGELOG.md
42-
git commit --message "Preparing release v${{ github.event.inputs.version }}"
41+
git commit --message "Preparing release v${{ github.event.inputs.tag }}"
4342
4443
echo "::set-output name=commit::$(git rev-parse HEAD)"
4544
4645
- name: Push new branch
47-
run: git flow release publish ${{ github.event.inputs.version }}
46+
run: git flow release publish ${{ github.event.inputs.tag }}
4847

4948
- name: Create pull request
50-
uses: thomaseizinger/create-pull-request@1.1.0
49+
uses: thomaseizinger/create-pull-request@1.2.2
5150
env:
5251
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5352
with:
54-
head: release/${{ github.event.inputs.version }}
53+
head: release/${{ github.event.inputs.tag }}
5554
base: master
56-
title: Release version ${{ github.event.inputs.version }}
55+
title: Release version ${{ github.event.inputs.tag }}
5756
reviewers: ${{ github.actor }}
5857
# Write a nice message to the user.
5958
# We are claiming things here based on the `publish-new-release.yml` workflow.

.github/workflows/format.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,26 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: Get history and tags for SCM versioning to work
19+
if: ${{ !env.ACT }}
1920
run: |
2021
git fetch --prune --unshallow
2122
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2223
- uses: actions/setup-python@v2
23-
- uses: pre-commit/[email protected]
24+
25+
- name: Install pre-commit
26+
run: python3 -m pip install --upgrade pre-commit 'virtualenv!=20.11'
27+
28+
- name: Cache pre-commit hooks
29+
uses: actions/cache@v2
2430
with:
25-
# Slow hooks are marked with manual - slow is okay here, run them too
26-
extra_args: --hook-stage manual --all-files
31+
path: ~/.cache/pre-commit
32+
key: pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
33+
restore-keys: pre-commit-
34+
35+
- name: Run pre-commit
36+
run: |
37+
# Slow hooks are marked with manual - slow is okay here, run them too
38+
pre-commit run --hook-stage manual --all-files
2739
2840
clang-tidy:
2941
name: Clang-Tidy

.github/workflows/publish_release.yml

Lines changed: 63 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,18 @@ jobs:
1818
if: startsWith(github.ref, 'refs/tags/') || (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch'
1919
strategy:
2020
matrix:
21-
os:
22-
- ubuntu-latest
23-
21+
cibw_archs: ["auto64"]
22+
os: [ubuntu-latest, windows-latest, macos-latest]
23+
# include:
24+
# - os: ubuntu-18.04
25+
# cibw_archs: "aarch64"
2426
steps:
27+
- name: Set up QEMU
28+
if: matrix.cibw_archs == 'aarch64'
29+
uses: docker/setup-qemu-action@v1
30+
with:
31+
platforms: arm64
32+
2533
- uses: actions/checkout@v2
2634
if: github.event_name != 'workflow_dispatch'
2735

@@ -31,6 +39,7 @@ jobs:
3139
ref: 'master'
3240

3341
- name: Get history and tags for SCM versioning to work
42+
if: ${{ !env.ACT }}
3443
run: |
3544
git fetch --prune --unshallow
3645
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
@@ -69,19 +78,56 @@ jobs:
6978
7079
# ========================================================================
7180

72-
- name: Build source distribution
81+
- uses: actions/setup-python@v2
82+
83+
- name: Install Python packages
84+
run: python -m pip install -U --prefer-binary pip setuptools build wheel twine 'cibuildwheel<3,>=2'
85+
86+
- name: Build source distribution (Linux)
7387
if: runner.os == 'Linux'
74-
run: python3 setup.py sdist -d wheelhouse
88+
id: src-dist
89+
run: |
90+
python -m build --sdist
91+
python -m twine check dist/*
92+
93+
- name: Build binary wheels
94+
continue-on-error: true
95+
id: binary-dist
96+
run: |
97+
python -m cibuildwheel --output-dir binary_dist
98+
python -m twine check binary_dist/*
99+
env:
100+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
75101

76-
- name: Check metadata
102+
- name: Build binary wheels without (failing) testing
103+
if: steps.binary-dist.outcome == 'failure'
104+
id: failed-dist
77105
run: |
78-
python3 -m pip install twine --prefer-binary
79-
python3 -m twine check wheelhouse/*
106+
python -m cibuildwheel --output-dir failed_dist
107+
env:
108+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
109+
CIBW_TEST_SKIP: '*'
110+
111+
- name: Files for Pypi upload
112+
uses: actions/upload-artifact@v2
113+
if: steps.src-dist.outcome == 'success'
114+
with:
115+
name: pypy_wheels
116+
path: ./dist
80117

81-
- uses: actions/upload-artifact@v2
118+
- name: Binary wheels
119+
uses: actions/upload-artifact@v2
120+
if: steps.binary-dist.outcome == 'success'
82121
with:
83-
name: packages
84-
path: ./wheelhouse/*
122+
name: wheels
123+
path: ./binary_dist
124+
125+
- name: Binary wheels that failed tests
126+
uses: actions/upload-artifact@v2
127+
if: steps.failed-dist.outcome == 'success'
128+
with:
129+
name: failed_wheels
130+
path: ./failed_dist
85131

86132

87133
release:
@@ -134,7 +180,7 @@ jobs:
134180
ref: 'master'
135181

136182
# ------------------------------------------------------------------------
137-
# Downloads all to directories matching the artifact names
183+
138184
- uses: actions/download-artifact@v2
139185

140186
# Code below inspired from this action:
@@ -160,7 +206,9 @@ jobs:
160206
if [[ "${tag}" =~ ^v?[0-9\.]+-[a-zA-Z_0-9\.-]+(\+[a-zA-Z_0-9\.-]+)?$ ]]; then
161207
prerelease="--prerelease"
162208
fi
163-
gh release create "v${RELEASE_VERSION}" ${prerelease:-} --title "ProjectQ v${RELEASE_VERSION}" --notes "${notes:-}" packages/*
209+
210+
mkdir -p wheels pypy_wheels
211+
gh release create "v${RELEASE_VERSION}" ${prerelease:-} --title "ProjectQ v${RELEASE_VERSION}" --notes "${notes:-}" pypy_wheels/* wheels/*
164212
165213
166214
upload_to_pypi:
@@ -170,15 +218,14 @@ jobs:
170218
steps:
171219
- uses: actions/setup-python@v2
172220

173-
# Downloads all to directories matching the artifact names
174221
- uses: actions/download-artifact@v2
175222

176223
- name: Publish standard package
177224
uses: pypa/gh-action-pypi-publish@release/v1
178225
with:
179226
user: __token__
180227
password: ${{ secrets.pypi_password }}
181-
packages_dir: packages/
228+
packages_dir: pypy_wheels/
182229

183230
master_to_develop_pr:
184231
name: Merge master back into develop
@@ -188,7 +235,7 @@ jobs:
188235
- upload_to_pypi
189236
steps:
190237
- name: Merge master into develop branch
191-
uses: thomaseizinger/create-pull-request@1.1.0
238+
uses: thomaseizinger/create-pull-request@1.2.2
192239
env:
193240
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
194241
with:

.github/workflows/pull_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v2
1313

1414
- id: changelog-enforcer
15-
uses: dangoslen/changelog-enforcer@v2
15+
uses: dangoslen/changelog-enforcer@v3
1616
with:
1717
changeLogPath: 'CHANGELOG.md'
1818
skipLabels: 'Skip-Changelog'

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
- id: check-useless-excludes
2424

2525
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.0.1
26+
rev: v4.1.0
2727
hooks:
2828
- id: check-added-large-files
2929
- id: check-case-conflict
@@ -44,21 +44,21 @@ repos:
4444
- id: remove-tabs
4545

4646
- repo: https://github.com/PyCQA/isort
47-
rev: 5.9.1
47+
rev: 5.10.1
4848
hooks:
4949
- id: isort
5050
name: isort (python)
5151

5252
- repo: https://github.com/psf/black
53-
rev: 21.5b1
53+
rev: 21.12b0
5454
hooks:
5555
- id: black
5656
language_version: python3
5757
# This is a slow hook, so only run this if --hook-stage manual is passed
5858
stages: [manual]
5959

6060
- repo: https://gitlab.com/PyCQA/flake8
61-
rev: 3.9.2
61+
rev: 4.0.1
6262
hooks:
6363
- id: flake8
6464
name: flake8-strict
@@ -82,7 +82,7 @@ repos:
8282
additional_dependencies: [pybind11>=2.6, numpy, requests, boto3, matplotlib, networkx, sympy]
8383

8484
- repo: https://github.com/mgedmin/check-manifest
85-
rev: '0.46'
85+
rev: '0.47'
8686
hooks:
8787
- id: check-manifest
8888
additional_dependencies: ['setuptools-scm', 'pybind11>=2.6']

0 commit comments

Comments
 (0)