From 08e0fd237dca64b2e908ad73ec2757418ea7d7f7 Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Mon, 19 Oct 2020 18:40:49 +0100 Subject: [PATCH 1/9] Add manylinux wheels for python 3.8 --- .github/workflows/build_wheels_and_publish.yml | 2 ++ build_manylinux_wheels/entrypoint.sh | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/build_wheels_and_publish.yml b/.github/workflows/build_wheels_and_publish.yml index 62d184c1c5..c4f04734dc 100644 --- a/.github/workflows/build_wheels_and_publish.yml +++ b/.github/workflows/build_wheels_and_publish.yml @@ -26,6 +26,8 @@ jobs: - name: Build manylinux Python wheels if: matrix.os == 'ubuntu-latest' uses: './build_manylinux_wheels' + with: + python-versions: "cp36-cp36m cp37-cp37m cp38-cp38" - name: Install standard python dependencies if: matrix.os != 'ubuntu-latest' diff --git a/build_manylinux_wheels/entrypoint.sh b/build_manylinux_wheels/entrypoint.sh index 77c19ade58..203e5471d3 100644 --- a/build_manylinux_wheels/entrypoint.sh +++ b/build_manylinux_wheels/entrypoint.sh @@ -1,6 +1,11 @@ #!/bin/bash set -e -x +# GitHub runners add "-e LD_LIBRARY_PATH" option to "docker run", +# overriding default value of LD_LIBRARY_PATH in manylinux image. This +# causes libcrypt.so.2 to be missing (it lives in /usr/local/lib) +export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH + # CLI arguments PY_VERSIONS=$1 From 4a422d60c1768e8fadffe8a6186578d1c41e2ddc Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Mon, 19 Oct 2020 18:44:36 +0100 Subject: [PATCH 2/9] Bump post version number --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f5cc247aa7..f9a7a09c60 100644 --- a/setup.py +++ b/setup.py @@ -172,7 +172,7 @@ def compile_KLU(): setup( name="pybamm", - version=load_version() + ".post2", + version=load_version() + ".post3", description="Python Battery Mathematical Modelling.", long_description=readme, long_description_content_type="text/markdown", From d2712d107fad7da07ef6372026b1300a1f692ea2 Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Tue, 20 Oct 2020 10:12:18 +0100 Subject: [PATCH 3/9] Fix tests on Windows (see PR #1190) --- run-tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/run-tests.py b/run-tests.py index 728d0f8a13..3e17920076 100755 --- a/run-tests.py +++ b/run-tests.py @@ -31,6 +31,10 @@ def run_code_tests(executable=False, folder: str = "unit", interpreter="python") tests = "tests/" + folder if folder == "unit": pybamm.settings.debug_mode = True + if interpreter == "python": + # Make sure to refer to the interpreter for the + # currently activated virtual environment + interpreter = sys.executable if executable is False: suite = unittest.defaultTestLoader.discover(tests, pattern="test*.py") unittest.TextTestRunner(verbosity=2).run(suite) From 30cba2af7f72fa263098d83d523bfea6de5a3d2e Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Tue, 27 Oct 2020 09:02:21 +0000 Subject: [PATCH 4/9] Apply workaround for brew update (see PR #1214) --- .github/workflows/test_on_push.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test_on_push.yml b/.github/workflows/test_on_push.yml index 6997fda137..21ee6c3bf5 100644 --- a/.github/workflows/test_on_push.yml +++ b/.github/workflows/test_on_push.yml @@ -50,6 +50,10 @@ jobs: - name: Install MacOS system dependencies if: matrix.os == 'macos-latest' run: | + # Temporary fix for https://github.com/actions/virtual-environments/issues/1811 + brew untap local/homebrew-openssl + brew untap local/homebrew-python2 + # End of fix brew update brew install graphviz brew install openblas From 228202be1df33f17ea75c84c4b5ea7bf6f371e96 Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Tue, 27 Oct 2020 09:06:52 +0000 Subject: [PATCH 5/9] Build and deploy to testPyPI on topic branch --- .github/workflows/build_wheels_and_publish.yml | 5 +++-- .github/workflows/test_on_push.yml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels_and_publish.yml b/.github/workflows/build_wheels_and_publish.yml index c4f04734dc..9d26492ca9 100644 --- a/.github/workflows/build_wheels_and_publish.yml +++ b/.github/workflows/build_wheels_and_publish.yml @@ -2,7 +2,7 @@ name: Build and deployment on: push: - branches: master + branches: fix_wheels_master jobs: build-wheels: @@ -68,5 +68,6 @@ jobs: uses: pypa/gh-action-pypi-publish@master with: user: __token__ - password: ${{ secrets.PYPI_TOKEN }} + password: ${{ secrets.TEST_PYPI_TOKEN }} + repository_url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/test_on_push.yml b/.github/workflows/test_on_push.yml index 21ee6c3bf5..a1110c69a5 100644 --- a/.github/workflows/test_on_push.yml +++ b/.github/workflows/test_on_push.yml @@ -2,6 +2,7 @@ name: PyBaMM on: push: + branches: master pull_request: From b73f4c6530e45918212f000094d163cfcab56863 Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Tue, 27 Oct 2020 09:13:38 +0000 Subject: [PATCH 6/9] workaround macos brew update error --- .github/workflows/build_wheels_and_publish.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build_wheels_and_publish.yml b/.github/workflows/build_wheels_and_publish.yml index 9d26492ca9..5d6d4a1931 100644 --- a/.github/workflows/build_wheels_and_publish.yml +++ b/.github/workflows/build_wheels_and_publish.yml @@ -37,6 +37,10 @@ jobs: - name: Install build-time deps for MacOS if: matrix.os == 'macos-latest' run: | + # Temporary fix for https://github.com/actions/virtual-environments/issues/1811 + brew untap local/homebrew-openssl + brew untap local/homebrew-python2 + # End of fix brew update brew install graphviz brew install sundials From 516f2a571fecec5b32784a3bb63a30d5ec561ece Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Tue, 27 Oct 2020 09:30:06 +0000 Subject: [PATCH 7/9] Fix name of PyPI secret --- .github/workflows/build_wheels_and_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_and_publish.yml b/.github/workflows/build_wheels_and_publish.yml index 5d6d4a1931..b8ea062123 100644 --- a/.github/workflows/build_wheels_and_publish.yml +++ b/.github/workflows/build_wheels_and_publish.yml @@ -72,6 +72,6 @@ jobs: uses: pypa/gh-action-pypi-publish@master with: user: __token__ - password: ${{ secrets.TEST_PYPI_TOKEN }} + password: ${{ secrets.TESTPYPI_TOKEN }} repository_url: https://test.pypi.org/legacy/ From da1880f2baefe743f48f047d4c179ce06d607394 Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Tue, 27 Oct 2020 14:28:44 +0000 Subject: [PATCH 8/9] Revert "Fix name of PyPI secret" This reverts commit 516f2a571fecec5b32784a3bb63a30d5ec561ece. --- .github/workflows/build_wheels_and_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels_and_publish.yml b/.github/workflows/build_wheels_and_publish.yml index b8ea062123..5d6d4a1931 100644 --- a/.github/workflows/build_wheels_and_publish.yml +++ b/.github/workflows/build_wheels_and_publish.yml @@ -72,6 +72,6 @@ jobs: uses: pypa/gh-action-pypi-publish@master with: user: __token__ - password: ${{ secrets.TESTPYPI_TOKEN }} + password: ${{ secrets.TEST_PYPI_TOKEN }} repository_url: https://test.pypi.org/legacy/ From d8470f1eec293537565d8685fafec4f77788b5d0 Mon Sep 17 00:00:00 2001 From: Thibault Lestang Date: Tue, 27 Oct 2020 14:29:30 +0000 Subject: [PATCH 9/9] Revert "Build and deploy to testPyPI on topic branch" This reverts commit 228202be1df33f17ea75c84c4b5ea7bf6f371e96. --- .github/workflows/build_wheels_and_publish.yml | 5 ++--- .github/workflows/test_on_push.yml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels_and_publish.yml b/.github/workflows/build_wheels_and_publish.yml index 5d6d4a1931..d320bcbe16 100644 --- a/.github/workflows/build_wheels_and_publish.yml +++ b/.github/workflows/build_wheels_and_publish.yml @@ -2,7 +2,7 @@ name: Build and deployment on: push: - branches: fix_wheels_master + branches: master jobs: build-wheels: @@ -72,6 +72,5 @@ jobs: uses: pypa/gh-action-pypi-publish@master with: user: __token__ - password: ${{ secrets.TEST_PYPI_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + password: ${{ secrets.PYPI_TOKEN }} diff --git a/.github/workflows/test_on_push.yml b/.github/workflows/test_on_push.yml index a1110c69a5..21ee6c3bf5 100644 --- a/.github/workflows/test_on_push.yml +++ b/.github/workflows/test_on_push.yml @@ -2,7 +2,6 @@ name: PyBaMM on: push: - branches: master pull_request: