Unverified Commit a424c559 authored by René Fritze's avatar René Fritze Committed by GitHub
Browse files

Merge pull request #1613 from pymor/ci_update_images

Fix Wheel install checks
parents 78721f8a 8b25a674
Pipeline #137215 passed with stages
in 40 minutes and 57 seconds
......@@ -15,7 +15,6 @@ stages:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- api_failure
tags:
- autoscaling
......@@ -24,8 +23,8 @@ stages:
when: never
- when: on_success
variables:
PYPI_MIRROR_TAG: ef38304121ce0de0cf414036094b19c443ad16e2
CI_IMAGE_TAG: ef38304121ce0de0cf414036094b19c443ad16e2
PYPI_MIRROR_TAG: 94604308a724fed5167af7761eb1536c4d13bad6
CI_IMAGE_TAG: 94604308a724fed5167af7761eb1536c4d13bad6
PYMOR_HYPOTHESIS_PROFILE: ci
PYMOR_PYTEST_EXTRA: ""
BINDERIMAGE: ${CI_REGISTRY_IMAGE}/binder:${CI_COMMIT_REF_SLUG}
......@@ -122,6 +121,9 @@ stages:
.check_wheel:
extends: .test_base
stage: install_checks
timeout: 10 minutes
dependencies: ["sdist_and_wheel"]
needs: ["sdist_and_wheel"]
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
......@@ -135,6 +137,8 @@ stages:
- devpi use http://pymor__devpi:3141/root/public --set-cfg
- devpi login root --password ''
- devpi upload --from-dir --formats=* ./dist/*.whl
- python3 -m pip install pip~=21.0
- python3 -m pip remove -y pymor || true
# the docker service adressing fails on other runners
tags: [mike]
......@@ -764,32 +768,26 @@ pypi:
from wheel 1/3:
extends: .check_wheel
dependencies: ["sdist_and_wheel"]
needs: ["sdist_and_wheel"]
image: zivgitlab.wwu.io/pymor/docker/pymor/deploy_checks_fedora:${CI_IMAGE_TAG}
script:
- echo "Testing wheel install on fedora with Python 3.9"
- python3 -m pip --version
- python3 -m pip freeze --all
- devpi install pymor[full]
from wheel 2/3:
extends: .check_wheel
dependencies: ["sdist_and_wheel"]
needs: ["sdist_and_wheel"]
image: zivgitlab.wwu.io/pymor/docker/pymor/deploy_checks_debian-buster:${CI_IMAGE_TAG}
script:
- echo "Testing wheel install on debian-buster with Python 3.7"
- python3 -m pip --version
- python3 -m pip freeze --all
- devpi install pymor[full]
from wheel 3/3:
extends: .check_wheel
dependencies: ["sdist_and_wheel"]
needs: ["sdist_and_wheel"]
image: zivgitlab.wwu.io/pymor/docker/pymor/deploy_checks_debian-bullseye:${CI_IMAGE_TAG}
script:
- echo "Testing wheel install on debian-bullseye with Python 3.9"
- python3 -m pip --version
- python3 -m pip freeze --all
- devpi install pymor[full]
docs build 3 7:
......
......@@ -36,7 +36,6 @@ rules:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- api_failure
tags:
- autoscaling
......@@ -135,6 +134,9 @@ rules:
.check_wheel:
extends: .test_base
stage: install_checks
timeout: 10 minutes
dependencies: ["sdist_and_wheel"]
needs: ["sdist_and_wheel"]
{{ never_on_schedule_rule() }}
services:
- name: {{registry}}/pymor/devpi:${PYPI_MIRROR_TAG}
......@@ -145,6 +147,8 @@ rules:
- devpi use http://pymor__devpi:3141/root/public --set-cfg
- devpi login root --password ''
- devpi upload --from-dir --formats=* ./dist/*.whl
- python3 -m pip install pip~=21.0
- python3 -m pip remove -y pymor || true
# the docker service adressing fails on other runners
tags: [mike]
......@@ -333,12 +337,10 @@ pypi:
{% for OS, PY in testos %}
from wheel {{loop.index}}/{{loop.length}}:
extends: .check_wheel
dependencies: ["sdist_and_wheel"]
needs: ["sdist_and_wheel"]
image: {{registry}}/pymor/deploy_checks_{{OS}}:${CI_IMAGE_TAG}
script:
- echo "Testing wheel install on {{OS}} with Python {{PY}}"
- python3 -m pip --version
- python3 -m pip freeze --all
- devpi install pymor[full]
{% endfor %}
......
......@@ -2,8 +2,8 @@ DOCKER_BASE_PYTHON=3.9
PYMOR_TEST_SCRIPT=vanilla
PYPI_MIRROR=stable
PYMOR_TEST_OS=debian-buster
PYPI_MIRROR_TAG=ef38304121ce0de0cf414036094b19c443ad16e2
CI_IMAGE_TAG=ef38304121ce0de0cf414036094b19c443ad16e2
PYPI_MIRROR_TAG=94604308a724fed5167af7761eb1536c4d13bad6
CI_IMAGE_TAG=94604308a724fed5167af7761eb1536c4d13bad6
PYMOR_HYPOTHESIS_PROFILE=dev
PYMOR_PYTEST_EXTRA=--lf
......@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
- uses: renefritze/github-action-markdown-link-check@master
with:
use-verbose-mode: 'yes'
base-branch: 'main'
......
......@@ -71,7 +71,7 @@ command:
pip install --upgrade pip # make sure that pip is reasonably new
pip install pymor[full]
(Please note that pip must be at least version 19.0)
(Please note that pip versions prior to 21.1 might have problems resolving all dependencies)
This will install the latest release of pyMOR on your system with most optional
dependencies.
......
src/pymortests/conftest.py
\ No newline at end of file
# This file is part of the pyMOR project (https://www.pymor.org).
# Copyright pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause)
import os
from functools import wraps
from hypothesis import settings, Verbosity, HealthCheck
import pytest
import numpy as np
_common_settings = {
"print_blob": True,
"suppress_health_check": (HealthCheck.data_too_large, HealthCheck.too_slow),
"deadline": 1000,
"verbosity": Verbosity.normal,
}
settings.register_profile("ci_large", max_examples=400, **_common_settings)
settings.register_profile("ci_pr", max_examples=100, **_common_settings)
settings.register_profile("ci", max_examples=25, **_common_settings)
settings.register_profile("dev", max_examples=10, **_common_settings)
_common_settings["verbosity"] = Verbosity.verbose
settings.register_profile("debug", max_examples=10, **_common_settings)
settings.load_profile(os.getenv(u'PYMOR_HYPOTHESIS_PROFILE', 'dev'))
""" This makes sure all our fixtures are available to all tests
Individual test modules MUST NOT import fixtures from `pymortests.fixtures`,
as this can have strange side effects.
"""
pytest_plugins = [
"pymortests.fixtures.analyticalproblem",
"pymortests.fixtures.function",
"pymortests.fixtures.grid",
"pymortests.fixtures.model",
"pymortests.fixtures.operator",
"pymortests.fixtures.parameter",
]
@pytest.fixture(autouse=True)
def monkey_np_testing(monkeypatch):
"""All tests automagically use this, we only change the default tolerances
monkey np.testing.assert_allclose to behave the same as np.allclose
for some reason, the default atol of np.testing.assert_allclose is 0
while it is 1e-8 for np.allclose
"""
real_all_close = np.testing.assert_allclose
@wraps(real_all_close)
def monkey_allclose(a, b, rtol=1.e-5, atol=1.e-8):
__tracebackhide__ = True # Hide traceback for py.test
return real_all_close(a, b, rtol=rtol, atol=atol)
monkeypatch.setattr(np.testing, 'assert_allclose', monkey_allclose)
# This file is part of the pyMOR project (https://www.pymor.org).
# Copyright pyMOR developers and contributors. All rights reserved.
# License: BSD 2-Clause License (https://opensource.org/licenses/BSD-2-Clause)
import os
from functools import wraps
from hypothesis import settings, Verbosity, HealthCheck
import pytest
import numpy as np
_common_settings = {
"print_blob": True,
"suppress_health_check": (HealthCheck.data_too_large, HealthCheck.too_slow),
"deadline": 1000,
"verbosity": Verbosity.normal,
}
settings.register_profile("ci_large", max_examples=400, **_common_settings)
settings.register_profile("ci_pr", max_examples=100, **_common_settings)
settings.register_profile("ci", max_examples=25, **_common_settings)
settings.register_profile("dev", max_examples=10, **_common_settings)
_common_settings["verbosity"] = Verbosity.verbose
settings.register_profile("debug", max_examples=10, **_common_settings)
settings.load_profile(os.getenv(u'PYMOR_HYPOTHESIS_PROFILE', 'dev'))
""" This makes sure all our fixtures are available to all tests
Individual test modules MUST NOT import fixtures from `pymortests.fixtures`,
as this can have strange side effects.
"""
pytest_plugins = [
"pymortests.fixtures.analyticalproblem",
"pymortests.fixtures.function",
"pymortests.fixtures.grid",
"pymortests.fixtures.model",
"pymortests.fixtures.operator",
"pymortests.fixtures.parameter",
]
@pytest.fixture(autouse=True)
def monkey_np_testing(monkeypatch):
"""All tests automagically use this, we only change the default tolerances
monkey np.testing.assert_allclose to behave the same as np.allclose
for some reason, the default atol of np.testing.assert_allclose is 0
while it is 1e-8 for np.allclose
"""
real_all_close = np.testing.assert_allclose
@wraps(real_all_close)
def monkey_allclose(a, b, rtol=1.e-5, atol=1.e-8):
__tracebackhide__ = True # Hide traceback for py.test
return real_all_close(a, b, rtol=rtol, atol=atol)
monkeypatch.setattr(np.testing, 'assert_allclose', monkey_allclose)
......@@ -51,14 +51,7 @@ if __name__ == '__main__':
FenicsVisualizer.visualize = nop
def _fix_conftest_plugin_load_stalling():
# for unknown reason pytest stalls in loading these if they're not preloaded on all ranks
from pymortests.conftest import pytest_plugins
for plugin in pytest_plugins:
__import__(plugin)
mpi.call(monkey_plot)
mpi.call(_fix_conftest_plugin_load_stalling)
demo = str(pymor_root_dir / 'src' / 'pymortests' / 'demos.py')
args = ['-svx', '-k', 'test_demo', demo]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment