From 3c58c2558913e7219007deede6925b45385a2a1e Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:01:41 -0500 Subject: [PATCH 01/14] [ci all]: Add windows to test suite --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81324f2884..70b9dcc691 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: || (github.event_name == 'push' && github.ref != 'refs/heads/main' && contains(github.event.head_commit.message, '[ci all]')) strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, windows-latest] python-version: ['3.8', '3.9', '3.10', '3.11'] include: - os: macos-latest From 5f1c788c9fb55ac603b2e726b56c792c22da4dcb Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:08:00 -0500 Subject: [PATCH 02/14] [ci all]: Exclude Python 3.8 on Windows as no JAX is available --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70b9dcc691..74a1c1bacd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,9 @@ jobs: include: - os: macos-latest python-version: '3.11' + exclude: + - os: windows-latest + python-version: '3.8' steps: - uses: actions/checkout@v4 From 18056f45d1654d0de6b62a67e02fb14ea9a3b83e Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:14:25 -0500 Subject: [PATCH 03/14] docs: Add OS trove classifiers --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 1e50c697ce..50aaf53b31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,9 @@ classifiers = [ "Environment :: WebAssembly :: Emscripten", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", + "Operating System :: Microsoft :: Windows", + "Operating System :: MacOS", + "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8", From 38e211fc59ce8282cd283663d2f82a8176d7ef8d Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:17:13 -0500 Subject: [PATCH 04/14] [ci all]: Include oldest and newest Windows Python --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74a1c1bacd..60746841b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,14 +26,15 @@ jobs: || (github.event_name == 'push' && github.ref != 'refs/heads/main' && contains(github.event.head_commit.message, '[ci all]')) strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] python-version: ['3.8', '3.9', '3.10', '3.11'] include: - os: macos-latest python-version: '3.11' - exclude: - os: windows-latest - python-version: '3.8' + python-version: '3.9' + - os: windows-latest + python-version: '3.11' steps: - uses: actions/checkout@v4 From c67c832153b184965b7ae629b70be0c1c60448ce Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:44:40 -0500 Subject: [PATCH 05/14] Move windows testing to own workflow --- .github/workflows/ci-windows.yml | 59 ++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/ci-windows.yml diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml new file mode 100644 index 0000000000..d190b5eec9 --- /dev/null +++ b/.github/workflows/ci-windows.yml @@ -0,0 +1,59 @@ +name: CI on Windows + +on: + push: + pull_request: + branches: + - main + - release/v* + # Run daily at 0:01 UTC + schedule: + - cron: '1 0 * * *' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + + runs-on: ${{ matrix.os }} + # On push events run the CI only on main by default, but run on any branch if the commit message contains '[ci all]' + # if: >- + # github.event_name != 'push' + # || (github.event_name == 'push' && github.ref == 'refs/heads/main') + # || (github.event_name == 'push' && github.ref != 'refs/heads/main' && contains(github.event.head_commit.message, '[ci all]')) + strategy: + matrix: + os: [windows-latest] + python-version: ['3.9', '3.10', '3.11'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install --upgrade .[test] + + - name: List installed Python packages + run: python -m pip list + + - name: Test with pytest and coverage + run: | + coverage run --module pytest \ + --ignore tests/contrib \ + --ignore tests/benchmarks \ + --ignore tests/test_notebooks.py \ + --ignore tests/test_scripts.py + + - name: Coverage report for core project + run: | + coverage report + coverage xml From 68334bc9b2723b88cd3eaabe91e64a69b2692957 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:45:16 -0500 Subject: [PATCH 06/14] Revert testing on Windows in normal CI --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60746841b8..81324f2884 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,10 +31,6 @@ jobs: include: - os: macos-latest python-version: '3.11' - - os: windows-latest - python-version: '3.9' - - os: windows-latest - python-version: '3.11' steps: - uses: actions/checkout@v4 From 0965dbc67fafa73c9f2b897220512d04a3d83308 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:48:38 -0500 Subject: [PATCH 07/14] Change to cron job and workflow dispatch --- .github/workflows/ci-windows.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index d190b5eec9..5bc494f321 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -1,14 +1,10 @@ name: CI on Windows on: - push: - pull_request: - branches: - - main - - release/v* - # Run daily at 0:01 UTC + # push: + # Run daily at 1:23 UTC schedule: - - cron: '1 0 * * *' + - cron: '23 1 * * *' workflow_dispatch: concurrency: @@ -19,11 +15,6 @@ jobs: test: runs-on: ${{ matrix.os }} - # On push events run the CI only on main by default, but run on any branch if the commit message contains '[ci all]' - # if: >- - # github.event_name != 'push' - # || (github.event_name == 'push' && github.ref == 'refs/heads/main') - # || (github.event_name == 'push' && github.ref != 'refs/heads/main' && contains(github.event.head_commit.message, '[ci all]')) strategy: matrix: os: [windows-latest] From 82dffffb79cf7b2919acf1cb3511deb53d47c25a Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:50:16 -0500 Subject: [PATCH 08/14] quote extra --- .github/workflows/ci-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 5bc494f321..25dc983498 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -31,7 +31,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade .[test] + python -m pip install --upgrade '.[test]' - name: List installed Python packages run: python -m pip list From e14d68bf23f431110f3059d07cd1dc893cc21d43 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:53:39 -0500 Subject: [PATCH 09/14] keep it to one line --- .github/workflows/ci-windows.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 25dc983498..2e31a245ad 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -38,11 +38,7 @@ jobs: - name: Test with pytest and coverage run: | - coverage run --module pytest \ - --ignore tests/contrib \ - --ignore tests/benchmarks \ - --ignore tests/test_notebooks.py \ - --ignore tests/test_scripts.py + coverage run --module pytest --ignore tests/contrib --ignore tests/benchmarks --ignore tests/test_notebooks.py --ignore tests/test_scripts.py - name: Coverage report for core project run: | From 5f260699973e03839f14a457b030df82f920faea Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Tue, 24 Oct 2023 23:54:27 -0500 Subject: [PATCH 10/14] push for test --- .github/workflows/ci-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 2e31a245ad..81732183c9 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -1,7 +1,7 @@ name: CI on Windows on: - # push: + push: # Run daily at 1:23 UTC schedule: - cron: '23 1 * * *' From 6ca1582080a597795bbcca5b9b66d81cc1ea4e18 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 25 Oct 2023 00:08:47 -0500 Subject: [PATCH 11/14] Reorder ignores for clarity --- .github/workflows/ci-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 81732183c9..d35be92771 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -38,7 +38,7 @@ jobs: - name: Test with pytest and coverage run: | - coverage run --module pytest --ignore tests/contrib --ignore tests/benchmarks --ignore tests/test_notebooks.py --ignore tests/test_scripts.py + coverage run --module pytest --ignore tests/test_scripts.py --ignore tests/contrib --ignore tests/benchmarks --ignore tests/test_notebooks.py - name: Coverage report for core project run: | From 0396d6a56bef19bbdae55a5fe42c9bd38d091617 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 25 Oct 2023 00:09:01 -0500 Subject: [PATCH 12/14] Remove push --- .github/workflows/ci-windows.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index d35be92771..69e14aabb3 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -1,7 +1,6 @@ name: CI on Windows on: - push: # Run daily at 1:23 UTC schedule: - cron: '23 1 * * *' From 0ca6023ea3ddb9b7ea75952750eabe890cc9b102 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 25 Oct 2023 15:20:48 -0500 Subject: [PATCH 13/14] Add fixme for tests/test_scripts.py --- .github/workflows/ci-windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml index 69e14aabb3..2aab9607f3 100644 --- a/.github/workflows/ci-windows.yml +++ b/.github/workflows/ci-windows.yml @@ -36,6 +36,7 @@ jobs: run: python -m pip list - name: Test with pytest and coverage + # FIXME: ignore tests/test_scripts.py as runner breaks on Windows currently run: | coverage run --module pytest --ignore tests/test_scripts.py --ignore tests/contrib --ignore tests/benchmarks --ignore tests/test_notebooks.py From c5d06ccebc6562e10d0a2002ba3edefc219bcfc7 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Wed, 25 Oct 2023 15:30:07 -0500 Subject: [PATCH 14/14] Use single OS related trove classifier --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 50aaf53b31..fcbdeff0bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,9 +32,7 @@ classifiers = [ "Environment :: WebAssembly :: Emscripten", "Intended Audience :: Science/Research", "License :: OSI Approved :: Apache Software License", - "Operating System :: Microsoft :: Windows", - "Operating System :: MacOS", - "Operating System :: POSIX :: Linux", + "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8",