-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from arcondello/dwave-samplers-dependency
Move the source code to dwave-samplers
- Loading branch information
Showing
36 changed files
with
92 additions
and
2,022 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,194 +1,121 @@ | ||
version: 2.1 | ||
|
||
parameters: | ||
package: | ||
type: string | ||
default: dwave-greedy | ||
|
||
orbs: | ||
ocean: dwave/[email protected] | ||
ocean: dwave/[email protected] | ||
win: circleci/[email protected] | ||
|
||
environment: | ||
PIP_PROGRESS_BAR: 'off' | ||
|
||
jobs: | ||
test-install: | ||
test-linux: | ||
parameters: | ||
python-version: | ||
type: string | ||
|
||
docker: | ||
- image: circleci/python:3.7 # last version pip==8.1.0 works on | ||
- image: circleci/python:<< parameters.python-version >> | ||
|
||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
|
||
- ocean/pip-install: | ||
requirements: tests/requirements.txt | ||
cache: true | ||
|
||
- ocean/pip-install: | ||
packages: . | ||
cache: false | ||
|
||
- ocean/coverage-run-unittest | ||
|
||
test-macos: | ||
parameters: | ||
python-version: | ||
type: string | ||
|
||
executor: | ||
name: ocean/macos | ||
xcode: "13.2.0" | ||
|
||
steps: | ||
- checkout | ||
|
||
- attach_workspace: &attach-dist | ||
at: dist | ||
- ocean/brew-install-pyenv | ||
|
||
- ocean/pyenv-install-python: | ||
python-version: << parameters.python-version >> | ||
cache: true | ||
|
||
- ocean/pip-install: | ||
requirements: tests/requirements.txt | ||
cache: true | ||
|
||
- ocean/pip-install: | ||
packages: . | ||
cache: false | ||
|
||
- ocean/coverage-run-unittest | ||
|
||
deploy: | ||
docker: | ||
- image: circleci/python:3.7 | ||
|
||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: | ||
# pip 19.0 is the first to support pyproject.toml build config *with* | ||
# environment markers (note: we split numpy on py310), and | ||
# *manylinux2010* wheels (required by the numpy version we use) | ||
name: Install from sdist with pip==19.0 | ||
name: create virtual env | ||
command: | | ||
python -m venv env-sdist-pip19 | ||
. env-sdist-pip19/bin/activate | ||
pip install 'pip==19.0' | ||
pip install ./dist/dwave-greedy*.tar.gz | ||
python -m venv env | ||
- run: | ||
name: Install from sdist with latest pip | ||
name: verify version matches tag | ||
command: | | ||
python -m venv env-sdist | ||
. env-sdist/bin/activate | ||
pip install -U pip | ||
pip install ./dist/dwave-greedy*.tar.gz | ||
. env/bin/activate | ||
pip install . | ||
echo $CIRCLE_TAG | ||
[[ "$(pip show dwave-greedy 2>/dev/null | grep Version)" == "Version: $CIRCLE_TAG" ]] | ||
- run: | ||
# pip 8.1.0 is the first version that supports manylinux1 | ||
name: Install from wheel with pip==8.1.0 | ||
name: build sdist and bdist | ||
command: | | ||
python -m venv env-wheel-pip8 | ||
. env-wheel-pip8/bin/activate | ||
pip install 'pip==8.1.0' | ||
# simulate install from wheel on pypi (but use local dist) | ||
# (1) install greedy only (no deps) from local dist | ||
pip install --no-index --find-links=dist --only-binary=dwave-greedy dwave-greedy --no-deps | ||
# (2) install deps only from pypi | ||
pip install --find-links=dist --only-binary=:all: dwave-greedy | ||
. env/bin/activate | ||
pip install -U pip setuptools wheel | ||
python setup.py sdist | ||
python setup.py bdist_wheel | ||
- run: | ||
name: Install from wheel with latest pip | ||
name: upload | ||
command: | | ||
python -m venv env-wheel | ||
. env-wheel/bin/activate | ||
pip install -U pip | ||
pip install -r requirements.txt | ||
pip install --no-index --find-links=dist --only-binary=dwave-greedy dwave-greedy | ||
. env/bin/activate | ||
pip install twine | ||
twine check dist/* | ||
twine upload -u "$PYPI_USERNAME" -p "$PYPI_PASSWORD" --skip-existing ./dist/* | ||
workflows: | ||
build-test-deploy: | ||
jobs: | ||
- ocean/build-sdist: | ||
filters: &always-run # required because it's indirectly required by the deploy job that runs on tags only | ||
tags: | ||
only: /.*/ | ||
version: 2 | ||
|
||
- ocean/build-manylinux-wheel: | ||
name: build-<< matrix.manylinux-tag >>_<< matrix.manylinux-arch >>-py<< matrix.python-version >> | ||
test: | ||
jobs: | ||
- test-linux: | ||
matrix: | ||
parameters: | ||
manylinux-tag: ["manylinux1", "manylinux2014"] | ||
manylinux-arch: ["x86_64"] | ||
python-version: &python-versions ["3.7.9", "3.8.9", "3.9.4", "3.10.0"] | ||
exclude: | ||
# py310 not available in manylinux1_x86_64 | ||
- manylinux-tag: "manylinux1" | ||
manylinux-arch: "x86_64" | ||
python-version: "3.10.0" | ||
filters: | ||
<<: *always-run | ||
|
||
- ocean/cibw-build-linux-aarch64-wheel: | ||
name: build-<< matrix.manylinux-tag >>_aarch64-py<< matrix.python-version >> | ||
matrix: | ||
parameters: | ||
manylinux-tag: ["manylinux2014"] | ||
python-version: *python-versions | ||
filters: | ||
<<: *always-run | ||
|
||
- ocean/test-linux-from-dist: | ||
name: test-linux-py<< matrix.python-version >>|<< matrix.constraints >> | ||
requires: | ||
- ocean/build-sdist | ||
- ocean/build-manylinux-wheel | ||
- ocean/cibw-build-linux-aarch64-wheel | ||
post-steps: | ||
- run: make -C tests/ | ||
matrix: | ||
parameters: | ||
python-version: *python-versions | ||
package: [<< pipeline.parameters.package >>] | ||
constraints: ["dimod~=0.9.0,>=0.9.2 dwave-system~=1.9.0", "dimod~=0.10.0", "dimod==0.11.0"] | ||
exclude: | ||
# dimod < 0.10 not supported on py310 | ||
- python-version: "3.10.0" | ||
package: << pipeline.parameters.package >> | ||
constraints: "dimod~=0.9.0,>=0.9.2 dwave-system~=1.9.0" | ||
filters: | ||
<<: *always-run | ||
|
||
- test-install: | ||
requires: | ||
- ocean/build-sdist | ||
- ocean/build-manylinux-wheel | ||
filters: | ||
<<: *always-run | ||
|
||
- ocean/test-docs: | ||
name: test-docs | ||
requires: | ||
- ocean/build-sdist | ||
- ocean/build-manylinux-wheel | ||
matrix: | ||
parameters: | ||
package: [<< pipeline.parameters.package >>] | ||
filters: | ||
<<: *always-run | ||
|
||
- ocean/cibw-build-macos-wheel: | ||
name: build-macos-py<< matrix.python-version >> | ||
matrix: | ||
parameters: | ||
python-version: *python-versions | ||
cibw-archs: ["x86_64 universal2"] | ||
filters: | ||
<<: *always-run | ||
|
||
- ocean/test-macos-from-dist: | ||
name: test-macos-py<< matrix.python-version >> | ||
requires: | ||
- ocean/build-sdist | ||
- ocean/cibw-build-macos-wheel | ||
post-steps: | ||
- run: make -C tests/ | ||
- test-macos: | ||
matrix: | ||
parameters: | ||
python-version: *python-versions | ||
xcode: ["13.2.0"] | ||
package: [<< pipeline.parameters.package >>] | ||
filters: | ||
<<: *always-run | ||
|
||
- ocean/build-windows-wheel: | ||
name: build-win-<< matrix.python-arch >>-py<< matrix.python-version >> | ||
matrix: | ||
parameters: | ||
python-version: *python-versions | ||
python-arch: &python-archs-win [""] | ||
filters: | ||
<<: *always-run | ||
|
||
- ocean/test-windows-from-dist: | ||
name: test-win-<< matrix.python-arch >>-py<< matrix.python-version >> | ||
requires: | ||
- ocean/build-windows-wheel | ||
matrix: | ||
parameters: | ||
python-version: *python-versions | ||
python-arch: *python-archs-win | ||
package: [<< pipeline.parameters.package >>] | ||
filters: | ||
<<: *always-run | ||
|
||
- ocean/pypi-deploy: | ||
requires: | ||
- ocean/test-linux-from-dist | ||
- ocean/test-macos-from-dist | ||
- ocean/test-windows-from-dist | ||
- ocean/test-docs | ||
- test-install | ||
filters: | ||
deploy: | ||
jobs: | ||
- deploy: | ||
filters: &deploy-filters | ||
tags: | ||
only: /^[0-9]+(\.[0-9]+)*((\.dev|rc)([0-9]+)?)?$/ | ||
only: /^[0-9]+(\.[0-9]+)*(\.dev([0-9]+)?)?$/ | ||
branches: | ||
ignore: /.*/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.