From cdcdee437221df88c674569b94fd1f6668a110ff Mon Sep 17 00:00:00 2001 From: jessegrabowski Date: Sat, 10 May 2025 15:09:54 +0800 Subject: [PATCH 1/5] update ci and simplify test env --- .github/workflows/test.yml | 30 ++++++++++++------------- conda-envs/environment-test.yml | 21 +++++++++-------- conda-envs/windows-environment-test.yml | 17 -------------- 3 files changed, 25 insertions(+), 43 deletions(-) delete mode 100644 conda-envs/windows-environment-test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1909738..40be2b7f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,6 @@ on: - "tests/**" - "setup.py" - "pyproject.toml" - - "buildosx" - "conda-envs/**" - "codecov.yml" @@ -37,14 +36,15 @@ jobs: shell: bash -leo pipefail {0} steps: - uses: actions/checkout@v4 - - uses: mamba-org/setup-micromamba@v1 + - uses: conda-incubator/setup-miniconda@v3 with: environment-file: conda-envs/environment-test.yml - create-args: >- - python=${{matrix.python-version}} - environment-name: pymc-extras-test - init-shell: bash - cache-environment: true + miniconda-version: "latest" + mamba-version: "*" + activate-environment: pymc-extras-test + channel-priority: strict + python-version: ${{matrix.python-version}} + use-mamba: true - name: Install pymc-extras run: | pip install -e . @@ -80,15 +80,15 @@ jobs: shell: cmd /C call {0} steps: - uses: actions/checkout@v4 - - uses: mamba-org/setup-micromamba@v1 + - uses: conda-incubator/setup-miniconda@v3 with: - environment-file: conda-envs/windows-environment-test.yml - micromamba-version: "1.5.10-0" # Until https://github.com/mamba-org/mamba/issues/3467 is not fixed - create-args: >- - python=${{matrix.python-version}} - environment-name: pymc-extras-test - init-shell: cmd.exe - cache-environment: true + environment-file: conda-envs/environment-test.yml + miniconda-version: "latest" + mamba-version: "*" + activate-environment: pymc-extras-test + channel-priority: strict + python-version: ${{matrix.python-version}} + use-mamba: true - name: Install pymc-extras run: | pip install -e . diff --git a/conda-envs/environment-test.yml b/conda-envs/environment-test.yml index 260c7b0e..fd8c9b46 100644 --- a/conda-envs/environment-test.yml +++ b/conda-envs/environment-test.yml @@ -3,15 +3,14 @@ channels: - conda-forge - nodefaults dependencies: -- pymc>=5.21 -- pytest-cov>=2.5 -- pytest>=3.0 -- dask<2025.1.1 -- xhistogram -- statsmodels -- numba<=0.60.0 -- pip -- pip: - - blackjax + - pymc>=5.21.1 - scikit-learn - - better_optimize + - better-optimize + - dask<2025.1.1 + - xhistogram + - statsmodels + - jax + - blackjax + - numba + - pytest + - pytest-cov diff --git a/conda-envs/windows-environment-test.yml b/conda-envs/windows-environment-test.yml deleted file mode 100644 index 6a92aea5..00000000 --- a/conda-envs/windows-environment-test.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: pymc-extras-test -channels: -- conda-forge -- defaults -dependencies: -- pip -- pytest-cov>=2.5 -- pytest>=3.0 -- dask<2025.1.1 -- xhistogram -- statsmodels -- numba<=0.60.0 -- pymc>=5.21 -- pip: - - blackjax - - scikit-learn - - better_optimize From 0dbdd0de9804ca0201d4b0b67f61b7d49c993289 Mon Sep 17 00:00:00 2001 From: jessegrabowski Date: Sat, 10 May 2025 15:16:45 +0800 Subject: [PATCH 2/5] Remove default channel when setting up ci env --- .github/workflows/test.yml | 4 ++++ conda-envs/environment-test.yml | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40be2b7f..32797737 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,6 +43,8 @@ jobs: mamba-version: "*" activate-environment: pymc-extras-test channel-priority: strict + channels: conda-forge, nodefaults + conda-remove-defaults: true python-version: ${{matrix.python-version}} use-mamba: true - name: Install pymc-extras @@ -87,6 +89,8 @@ jobs: mamba-version: "*" activate-environment: pymc-extras-test channel-priority: strict + channels: conda-forge, nodefaults + conda-remove-defaults: true python-version: ${{matrix.python-version}} use-mamba: true - name: Install pymc-extras diff --git a/conda-envs/environment-test.yml b/conda-envs/environment-test.yml index fd8c9b46..3304c6da 100644 --- a/conda-envs/environment-test.yml +++ b/conda-envs/environment-test.yml @@ -9,8 +9,10 @@ dependencies: - dask<2025.1.1 - xhistogram - statsmodels - - jax - - blackjax - numba - pytest - pytest-cov + - pip + - pip: + - jax + - blackjax From 69f2feb8d1a5415d758e62b9e47911d1729f0056 Mon Sep 17 00:00:00 2001 From: jessegrabowski Date: Sat, 10 May 2025 15:19:43 +0800 Subject: [PATCH 3/5] Cancel test runs on PRs if another commit comes in --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 32797737..577a655c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,13 @@ on: - "conda-envs/**" - "codecov.yml" +# Cancels all previous workflow runs for pull requests that have not completed. +concurrency: + # The concurrency group contains the workflow name and the branch name for pull requests + # or the commit hash for any other events. + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + jobs: ubuntu: strategy: From bd99ee32aeabaaa9b06976c51a2aa14fb07818c1 Mon Sep 17 00:00:00 2001 From: jessegrabowski Date: Sun, 11 May 2025 08:52:40 +0800 Subject: [PATCH 4/5] revert some changes, pin libgcc<15 --- .github/workflows/test.yml | 31 +++++++++++++------------------ conda-envs/environment-test.yml | 1 + 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 577a655c..e51c11c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,17 +43,14 @@ jobs: shell: bash -leo pipefail {0} steps: - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 + - uses: mamba-org/setup-micromamba@v2 with: environment-file: conda-envs/environment-test.yml - miniconda-version: "latest" - mamba-version: "*" - activate-environment: pymc-extras-test - channel-priority: strict - channels: conda-forge, nodefaults - conda-remove-defaults: true - python-version: ${{matrix.python-version}} - use-mamba: true + create-args: >- + python=${{matrix.python-version}} + environment-name: pymc-extras-test + init-shell: bash + cache-environment: true - name: Install pymc-extras run: | pip install -e . @@ -89,17 +86,15 @@ jobs: shell: cmd /C call {0} steps: - uses: actions/checkout@v4 - - uses: conda-incubator/setup-miniconda@v3 + - uses: mamba-org/setup-micromamba@v2 with: environment-file: conda-envs/environment-test.yml - miniconda-version: "latest" - mamba-version: "*" - activate-environment: pymc-extras-test - channel-priority: strict - channels: conda-forge, nodefaults - conda-remove-defaults: true - python-version: ${{matrix.python-version}} - use-mamba: true + micromamba-version: "latest" + create-args: >- + python=${{matrix.python-version}} + environment-name: pymc-extras-test + init-shell: cmd + cache-environment: true - name: Install pymc-extras run: | pip install -e . diff --git a/conda-envs/environment-test.yml b/conda-envs/environment-test.yml index 3304c6da..f13bcfcf 100644 --- a/conda-envs/environment-test.yml +++ b/conda-envs/environment-test.yml @@ -12,6 +12,7 @@ dependencies: - numba - pytest - pytest-cov + - libgcc<15 - pip - pip: - jax From 78d465a6b1a2b5fe51ffcd36237493f3eee6263b Mon Sep 17 00:00:00 2001 From: jessegrabowski Date: Mon, 12 May 2025 13:24:55 +0800 Subject: [PATCH 5/5] use correct shell name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e51c11c7..65d63e40 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,7 +93,7 @@ jobs: create-args: >- python=${{matrix.python-version}} environment-name: pymc-extras-test - init-shell: cmd + init-shell: cmd.exe cache-environment: true - name: Install pymc-extras run: |