Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
# Cancel in-progress workflows when pushing
# a new commit on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}

@lesteve lesteve Sep 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't cancelling the build before when pushing a new commit, I took it from scikit-learn

cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
run:
# Need to use this shell to get conda working properly.
# See https://github.com/marketplace/actions/setup-miniconda#important
shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
shell: 'bash -el {0}'

@lesteve lesteve Sep 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This made my life easier to always use bash, probably an historical thing to use CMD on Windows, not 100% sure



steps:
Expand All @@ -239,11 +239,11 @@ jobs:

- name: Install dependencies
run: |
bash -el continuous_integration/install.sh
./continuous_integration/install.sh

@lesteve lesteve Sep 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not using bash -l avoids the nested login shell bug in macOS where system clang is picked first rather than conda env symlink


- name: Test library
run: |
bash -el continuous_integration/run_tests.sh
./continuous_integration/run_tests.sh

- name: Upload test results
uses: actions/upload-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions continuous_integration/install.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ make_conda() {
TO_INSTALL="$TO_INSTALL python-gil"
fi

# Need to source conda.sh before first conda command
source "$CONDA/etc/profile.d/conda.sh"

@lesteve lesteve Sep 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sourcing the conda.sh file is the simpler way to make conda command work on all OSes inside a script. Previously we were relying on using login shell bash -l which kind of work because setup-miniconda adds the equivalent to .profile or something sourced at login. This was kind of brittle because of the macOS PATH bug within nested login shell. Also I have seen cases where it behaves weirdly on Windows, I don't remember the details.

# prevent mixing conda channels
conda config --set channel_priority strict
conda config --add channels $CHANNEL
Expand Down
2 changes: 2 additions & 0 deletions continuous_integration/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
set -xe

if [[ "$PACKAGER" == conda* ]] || [[ -z "$PACKAGER" ]]; then
source "$CONDA/etc/profile.d/conda.sh"
conda activate testenv
conda list
elif [[ "$PACKAGER" == pip* ]]; then
# we actually use conda to install the base environment:
source "$CONDA/etc/profile.d/conda.sh"
conda activate testenv
pip list
elif [[ "$PACKAGER" == "ubuntu" ]]; then
Expand Down
Loading