Skip to content
Draft
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
51 changes: 48 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
shell: bash -e {0}
env:
PYTHON_VERSION: '${{ matrix.python }}'
MKL_NUM_THREADS: '1'
Expand All @@ -81,7 +81,7 @@ jobs:
kind: mamba
- os: macos-15-intel # intel: Sequoia
python: '3.13'
kind: mamba
kind: pixi
- os: windows-latest
python: '3.11'
kind: mamba
Expand Down Expand Up @@ -123,6 +123,12 @@ jobs:
with:
python-version: ${{ matrix.python }}
if: startswith(matrix.kind, 'pip')
- uses: prefix-dev/setup-pixi@v0.9.4
with:
activate-environment: false
run-install: false
cache: false # caching depends on existence of a pixi.lock file
if: matrix.kind == 'pixi'
# Python (if conda)
- name: Fixes for conda
run: |
Expand Down Expand Up @@ -151,15 +157,47 @@ jobs:
create-args: >-
python=${{ env.PYTHON_VERSION }}
-v
if: ${{ !startswith(matrix.kind, 'pip') }}
generate-run-shell: true
init-shell: none
if: ${{ !startswith(matrix.kind, 'pip') && matrix.kind != 'pixi' }}
timeout-minutes: 20
- name: Create pixi.toml
if: matrix.kind == 'pixi'
# environment.yml specifies the same python version as macos-intel CI (3.13)
# but let's expliclty set the version, in case these ever diverge in the future?
run: |
pixi init --import environment.yml
pixi add "python==${{ matrix.python }}" --no-install
- name: Setup pixi environment
if: matrix.kind == 'pixi'
run: pixi install
# Now run setup-pixi again in order to activate the enviroment
- uses: prefix-dev/setup-pixi@v0.9.4
if: matrix.kind == 'pixi'
with:
run-install: true
activate-environment: true
cache: false
- name: Verify Environment
run: echo $PATH
- name: Debug Qt availability
if: matrix.kind == 'conda' || matrix.kind == 'mamba' || matrix.kind == 'old' || matrix.kind == 'minimal'
run: |
python -c "import sys; print(sys.executable)"
python -c "from importlib.metadata import version; print('pip version', version('pip'))"
python -c "from importlib import util; print('PySide6', util.find_spec('PySide6'))"
- run: bash ./tools/github_actions_dependencies.sh
if: ${{ matrix.kind != 'pixi' && !startswith(matrix.kind, 'pip') && runner.os != 'Windows' }}
shell: micromamba-shell {0}
- run: python ./tools/github_actions_check_old.py
if: matrix.kind == 'old'
shell: micromamba-shell {0}
# Minimal commands on Linux (macOS stalls)
- run: bash ./tools/get_minimal_commands.sh
if: startswith(matrix.os, 'ubuntu') && matrix.kind != 'minimal' && matrix.kind != 'old'
- run: bash ./tools/github_actions_infos.sh
if: ${{ matrix.kind != 'pixi' && !startswith(matrix.kind, 'pip') && runner.os != 'Windows' }}
shell: micromamba-shell {0}
# Check Qt
- run: bash ./tools/check_qt_import.sh $MNE_QT_BACKEND
if: env.MNE_QT_BACKEND != ''
Expand All @@ -172,7 +210,14 @@ jobs:
key: ${{ env.TESTING_VERSION }}
path: ~/mne_data
- run: bash ./tools/github_actions_download.sh
- name: Debug interpreter + Qt
if: matrix.kind == 'pixi'
run: |
pixi run python -c "import sys; print(sys.executable)"
pixi run python -c "import PySide6; print(PySide6.__version__)"
- run: bash ./tools/github_actions_test.sh # for some reason on macOS we need to run "bash X" in order for a failed test run to show up
if: ${{ matrix.kind != 'pixi' && !startswith(matrix.kind, 'pip') && runner.os != 'Windows' }}
shell: micromamba-shell {0}
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions tools/github_actions_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ if [ ! -z "$CONDA_ENV" ]; then
GROUP="test_extra"
EXTRAS="[hdf5]"
fi
elif [[ "${MNE_CI_KIND}" == "pixi" ]]; then
GROUP="test_extra"
EXTRAS="[hdf5]"
elif [[ "${MNE_CI_KIND}" == "pip" ]]; then
GROUP="test_extra"
EXTRAS="[full-pyside6]"
Expand Down
9 changes: 8 additions & 1 deletion tools/github_actions_env_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ else # conda-like
echo "CONDA_ENV=tools/environment_minimal.yml" | tee -a $GITHUB_ENV
echo "MNE_QT_BACKEND=PySide6" | tee -a $GITHUB_ENV
else # conda, mamba (use warning level for completeness)
echo "CONDA_ENV=environment.yml" | tee -a $GITHUB_ENV
# Pixi is treated as Conda-like (it uses environment.yaml) but it should not export
# CONDA_ENV because github_actions_dependencies.sh uses the existence of the
# CONDA_ENV environment variable to assume that the conda/mamba command is on
# PATH, which it is not for pixi jobs.
if [[ "$MNE_CI_KIND" != "pixi" ]]; then
echo "CONDA_ENV=environment.yml" | tee -a $GITHUB_ENV
fi

echo "MNE_LOGGING_LEVEL=warning" | tee -a $GITHUB_ENV
echo "MNE_QT_BACKEND=PySide6" | tee -a $GITHUB_ENV
# TODO: Also need "|unreliable on GitHub Actions conda" on macOS, but omit for now to make sure the failure actually shows up
Expand Down