From ed3706cf80ca74035e630ac3d385c7ab400fa11b Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Mon, 23 Dec 2024 11:39:35 -0700 Subject: [PATCH 01/13] Add windows build/tests to test-sundials CI --- .github/workflows/test-sundials.yml | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index aa0b8ad..b6acae0 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -127,3 +127,61 @@ jobs: tox env: TOXENV: ${{ matrix.tox-env }} + + test-windows: + name: (Test ${{ matrix.python-version }}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macos-latest, windows-latest] # set more OS here, if desired + python-version: ["3.9", "3.13"] # set more python versions here, if desired + + defaults: + run: + shell: bash -l {0} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup conda/python + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + miniconda-version: latest + activate-environment: odes + python-version: ${{ matrix.python-version }} + + - name: Setup SUNDIALS + run: conda install sundials=7.1.1 -c conda-forge # SUNDIALS version is set here + + - name: Verify environment + run: | + conda info + conda list + + - name: Set SUNDIALS installation path + run: | + if [[ "$RUNNER_OS" == "Windows" ]]; then + echo "SUNDIALS_INST=%CONDA_PREFIX%/Library" >> $GITHUB_ENV + else + echo "SUNDIALS_INST=$CONDA_PREFIX" >> $GITHUB_ENV + fi + + - name: Install scikits-odes-sundials + working-directory: packages/scikits-odes-sundials + run: | + python -m pip install --upgrade pip + pip install . + + - name: List info + run: | + conda info + conda list + + - name: Run tests + working-directory: packages/scikits-odes-sundials/src/scikits_odes_sundials + run: | + pip install pytest + pytest . From 2891ddd078d47126e54e3f6e88e9c069699f3bf7 Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Mon, 23 Dec 2024 12:25:06 -0700 Subject: [PATCH 02/13] Fix issue with SUNDIALS_INST path variables --- .github/workflows/test-sundials.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index b6acae0..ffd439a 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -129,13 +129,14 @@ jobs: TOXENV: ${{ matrix.tox-env }} test-windows: - name: (Test ${{ matrix.python-version }}, ${{ matrix.os }}) + name: tests (${{ matrix.python-version }}, ${{matrix.sundials-version}}, ${{ matrix.os }}, double, 32) runs-on: ${{ matrix.os }} strategy: matrix: os: [macos-latest, windows-latest] # set more OS here, if desired python-version: ["3.9", "3.13"] # set more python versions here, if desired + sundials-version: ["7.1.1"] # set more SUNDIALS version here, if desired defaults: run: @@ -154,7 +155,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Setup SUNDIALS - run: conda install sundials=7.1.1 -c conda-forge # SUNDIALS version is set here + run: conda install sundials=${{ matrix.sundials-version }} -c conda-forge - name: Verify environment run: | @@ -164,11 +165,14 @@ jobs: - name: Set SUNDIALS installation path run: | if [[ "$RUNNER_OS" == "Windows" ]]; then - echo "SUNDIALS_INST=%CONDA_PREFIX%/Library" >> $GITHUB_ENV + SUNDIALS_INST="$CONDA_PREFIX\Library" else - echo "SUNDIALS_INST=$CONDA_PREFIX" >> $GITHUB_ENV + SUNDIALS_INST="$CONDA_PREFIX" fi + echo "SUNDIALS_INST is set to: $SUNDIALS_INST" + echo "SUNDIALS_INST=$SUNDIALS_INST" >> $GITHUB_ENV + - name: Install scikits-odes-sundials working-directory: packages/scikits-odes-sundials run: | From ecb57b79e87ade7817e034ca7459f794f63e20e3 Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Mon, 23 Dec 2024 12:50:03 -0700 Subject: [PATCH 03/13] Rename new windows/mac tests job to include "mac" --- .github/workflows/test-sundials.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index ffd439a..75e61c9 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -128,7 +128,7 @@ jobs: env: TOXENV: ${{ matrix.tox-env }} - test-windows: + tests-win-mac: name: tests (${{ matrix.python-version }}, ${{matrix.sundials-version}}, ${{ matrix.os }}, double, 32) runs-on: ${{ matrix.os }} From 8bda1c5d9284af9208dffe627c752606aca60388 Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Tue, 31 Dec 2024 00:33:53 -0700 Subject: [PATCH 04/13] Move to using tox --- .github/workflows/test-sundials.yml | 23 +++++++++++++---------- packages/scikits-odes-sundials/tox.ini | 1 + 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index 75e61c9..fcfb16f 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -134,9 +134,13 @@ jobs: strategy: matrix: - os: [macos-latest, windows-latest] # set more OS here, if desired - python-version: ["3.9", "3.13"] # set more python versions here, if desired - sundials-version: ["7.1.1"] # set more SUNDIALS version here, if desired + os: [windows-latest, macos-latest, macos-13] + sundials-version: ["7.1.1"] + include: + - python-version: "3.9" + tox-env: py39 + - python-version: "3.13" + tox-env: py313 defaults: run: @@ -173,11 +177,10 @@ jobs: echo "SUNDIALS_INST is set to: $SUNDIALS_INST" echo "SUNDIALS_INST=$SUNDIALS_INST" >> $GITHUB_ENV - - name: Install scikits-odes-sundials - working-directory: packages/scikits-odes-sundials + - name: Install python dependencies run: | python -m pip install --upgrade pip - pip install . + python -m pip install --upgrade tox - name: List info run: | @@ -185,7 +188,7 @@ jobs: conda list - name: Run tests - working-directory: packages/scikits-odes-sundials/src/scikits_odes_sundials - run: | - pip install pytest - pytest . + working-directory: packages/scikits-odes-sundials + run: tox + env: + TOXENV: ${{ matrix.tox-env }} diff --git a/packages/scikits-odes-sundials/tox.ini b/packages/scikits-odes-sundials/tox.ini index 22853a3..d924136 100644 --- a/packages/scikits-odes-sundials/tox.ini +++ b/packages/scikits-odes-sundials/tox.ini @@ -4,6 +4,7 @@ setenv = LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 [testenv] passenv= + SUNDIALS_INST SUNDIALS_DIR SUNDIALS_LIBDIR SUNDIALS_INCLUDEDIR From 1d8478f5ffdc04fd69c73105e39a1f6fa6202ccd Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Tue, 31 Dec 2024 01:04:48 -0700 Subject: [PATCH 05/13] Fix matrix to include 3.9 again --- .github/workflows/test-sundials.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index fcfb16f..7b55bd6 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -135,6 +135,7 @@ jobs: strategy: matrix: os: [windows-latest, macos-latest, macos-13] + python-version: ["3.9", "3.13"] sundials-version: ["7.1.1"] include: - python-version: "3.9" From b643c9206cbcd38855e8b4d450afa6cd011a533c Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Tue, 31 Dec 2024 01:13:15 -0700 Subject: [PATCH 06/13] Explicitly install setuptools before tox --- .github/workflows/test-sundials.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index 7b55bd6..ca3fe08 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -133,6 +133,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: [windows-latest, macos-latest, macos-13] python-version: ["3.9", "3.13"] @@ -181,6 +182,7 @@ jobs: - name: Install python dependencies run: | python -m pip install --upgrade pip + python -m pip install --upgrade setuptools python -m pip install --upgrade tox - name: List info From 61c6f5de84b96085e69602db63c832d333b6b3ba Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Tue, 31 Dec 2024 02:10:15 -0700 Subject: [PATCH 07/13] Try recreate on tox fails --- .github/workflows/test-sundials.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index ca3fe08..e6f4cd6 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -192,6 +192,6 @@ jobs: - name: Run tests working-directory: packages/scikits-odes-sundials - run: tox + run: tox || tox --recreate env: TOXENV: ${{ matrix.tox-env }} From 1fb7c9a4373f003e4fc0eabebc80f58034ba162c Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Tue, 31 Dec 2024 02:18:38 -0700 Subject: [PATCH 08/13] Try tox from conda --- .github/workflows/test-sundials.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index e6f4cd6..a42fd43 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -183,7 +183,9 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install --upgrade setuptools - python -m pip install --upgrade tox + + - name: Get tox + run: conda install tox - name: List info run: | @@ -192,6 +194,6 @@ jobs: - name: Run tests working-directory: packages/scikits-odes-sundials - run: tox || tox --recreate + run: tox env: TOXENV: ${{ matrix.tox-env }} From 823de6b0cce5de4f1bcecd81e9955748371b6191 Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Tue, 31 Dec 2024 02:27:31 -0700 Subject: [PATCH 09/13] Skip windows/py39 due to tox SSL error --- .github/workflows/test-sundials.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index a42fd43..49d1432 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -143,6 +143,9 @@ jobs: tox-env: py39 - python-version: "3.13" tox-env: py313 + exclude: + - os: windows-latest # Issue with tox venv, cannot access openssl + python-version: "3.9" defaults: run: @@ -183,9 +186,7 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install --upgrade setuptools - - - name: Get tox - run: conda install tox + python -m pip install --upgrade tox - name: List info run: | From 7476b725061c219e58b577d082a022df3142b2d4 Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Thu, 2 Jan 2025 14:27:46 -0700 Subject: [PATCH 10/13] Try adding SSL_CERT_FILE to passenv --- .github/workflows/test-sundials.yml | 6 +++--- packages/scikits-odes-sundials/tox.ini | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index 49d1432..e17f3b1 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -143,9 +143,9 @@ jobs: tox-env: py39 - python-version: "3.13" tox-env: py313 - exclude: - - os: windows-latest # Issue with tox venv, cannot access openssl - python-version: "3.9" + # exclude: + # - os: windows-latest # Issue with tox venv, pip has no ssl access + # python-version: "3.9" defaults: run: diff --git a/packages/scikits-odes-sundials/tox.ini b/packages/scikits-odes-sundials/tox.ini index d924136..06968e9 100644 --- a/packages/scikits-odes-sundials/tox.ini +++ b/packages/scikits-odes-sundials/tox.ini @@ -13,6 +13,7 @@ passenv= CPATH PIP_VERBOSE PYTHONFAULTHANDLER + SSL_CERT_FILE deps = pytest -r local-requirements.txt From 6b83d5ef0f43cf9acc3fab3d5d9c8f0eba2152df Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Thu, 2 Jan 2025 14:36:25 -0700 Subject: [PATCH 11/13] Add SSL_CERT_FILE to GITHUB_ENV --- .github/workflows/test-sundials.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index e17f3b1..2b5cef8 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -171,7 +171,7 @@ jobs: conda info conda list - - name: Set SUNDIALS installation path + - name: Set SUNDIALS and SSL paths run: | if [[ "$RUNNER_OS" == "Windows" ]]; then SUNDIALS_INST="$CONDA_PREFIX\Library" @@ -182,6 +182,9 @@ jobs: echo "SUNDIALS_INST is set to: $SUNDIALS_INST" echo "SUNDIALS_INST=$SUNDIALS_INST" >> $GITHUB_ENV + echo "SSL_CERT_FILE is at: $SSL_CERT_FILE" + echo "SSL_CERT_FILE=$SSL_CERT_FILE" >> $GITHUB_ENV + - name: Install python dependencies run: | python -m pip install --upgrade pip From f7db0dc02adc77ea6c6b64fa5c71224f0c06f6cc Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Thu, 2 Jan 2025 14:43:45 -0700 Subject: [PATCH 12/13] SSL_CERT_FILE didn't work, exclude win-py39 again --- .github/workflows/test-sundials.yml | 11 ++++------- packages/scikits-odes-sundials/tox.ini | 1 - 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index 2b5cef8..f2285c4 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -143,9 +143,9 @@ jobs: tox-env: py39 - python-version: "3.13" tox-env: py313 - # exclude: - # - os: windows-latest # Issue with tox venv, pip has no ssl access - # python-version: "3.9" + exclude: + - os: windows-latest # Issue with tox venv, pip has no ssl access + python-version: "3.9" defaults: run: @@ -171,7 +171,7 @@ jobs: conda info conda list - - name: Set SUNDIALS and SSL paths + - name: Set SUNDIALS path run: | if [[ "$RUNNER_OS" == "Windows" ]]; then SUNDIALS_INST="$CONDA_PREFIX\Library" @@ -182,9 +182,6 @@ jobs: echo "SUNDIALS_INST is set to: $SUNDIALS_INST" echo "SUNDIALS_INST=$SUNDIALS_INST" >> $GITHUB_ENV - echo "SSL_CERT_FILE is at: $SSL_CERT_FILE" - echo "SSL_CERT_FILE=$SSL_CERT_FILE" >> $GITHUB_ENV - - name: Install python dependencies run: | python -m pip install --upgrade pip diff --git a/packages/scikits-odes-sundials/tox.ini b/packages/scikits-odes-sundials/tox.ini index 06968e9..d924136 100644 --- a/packages/scikits-odes-sundials/tox.ini +++ b/packages/scikits-odes-sundials/tox.ini @@ -13,7 +13,6 @@ passenv= CPATH PIP_VERBOSE PYTHONFAULTHANDLER - SSL_CERT_FILE deps = pytest -r local-requirements.txt From 755b666d0453daad57de140080d654af03717857 Mon Sep 17 00:00:00 2001 From: "Corey R. Randall" Date: Sat, 11 Jan 2025 19:59:05 -0700 Subject: [PATCH 13/13] move conda setup action from miniconda to micromamba --- .github/workflows/test-sundials.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test-sundials.yml b/.github/workflows/test-sundials.yml index f2285c4..0a1982d 100644 --- a/.github/workflows/test-sundials.yml +++ b/.github/workflows/test-sundials.yml @@ -143,9 +143,6 @@ jobs: tox-env: py39 - python-version: "3.13" tox-env: py313 - exclude: - - os: windows-latest # Issue with tox venv, pip has no ssl access - python-version: "3.9" defaults: run: @@ -155,21 +152,21 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Setup conda/python - uses: conda-incubator/setup-miniconda@v3 + - name: Setup Python and SUNDIALS + uses: mamba-org/setup-micromamba@v2 with: - auto-update-conda: true - miniconda-version: latest - activate-environment: odes - python-version: ${{ matrix.python-version }} - - - name: Setup SUNDIALS - run: conda install sundials=${{ matrix.sundials-version }} -c conda-forge + environment-name: odes + create-args: >- + python=${{ matrix.python-version }} + sundials=${{ matrix.sundials-version }} + condarc: | + channels: + - conda-forge - name: Verify environment run: | - conda info - conda list + micromamba info + micromamba list - name: Set SUNDIALS path run: | @@ -190,8 +187,8 @@ jobs: - name: List info run: | - conda info - conda list + micromamba info + micromamba list - name: Run tests working-directory: packages/scikits-odes-sundials