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
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ jobs:
python-version: ${{ matrix.python }}
if: startswith(matrix.kind, 'pip') || matrix.kind == 'minimal'
id: setup-python
# Workaround macOS path behavior with login shells (which puts system Python first)
- run: echo "export PATH=\"$(dirname ${{ steps.setup-python.outputs.python-path }}):$PATH\"" | tee -a ~/.bash_profile # zizmor: ignore[template-injection]
# Workaround macOS path behavior with login shells (which puts system Python first).
# \$PATH must stay escaped so that it is expanded when each login shell sources
# ~/.bash_profile: writing the expanded value would freeze PATH as of this step and
# silently discard anything a later step adds to $GITHUB_PATH.
- run: echo "export PATH=\"$(dirname ${{ steps.setup-python.outputs.python-path }}):\$PATH\"" | tee -a ~/.bash_profile # zizmor: ignore[template-injection]
if: startswith(matrix.kind, 'pip') && startswith(matrix.os, 'macos')
# Python (if conda)
- uses: mamba-org/setup-micromamba@v3
Expand Down
28 changes: 25 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ stages:
displayName: Setup up Xvfb
- task: Cache@2
inputs:
key: minimal-cmds-1
key: '"minimal-cmds" | "$(Agent.OS)" | $(MNE_TOOLS_DIR)/tools/get_minimal_commands.sh'
path: /home/vsts/minimal_cmds
displayName: Cache minimal commands
- bash: $(MNE_TOOLS_DIR)/tools/get_minimal_commands.sh
Expand Down Expand Up @@ -166,6 +166,7 @@ stages:
pool:
vmImage: 'windows-latest'
variables:
MNE_TOOLS_DIR: '$(Pipeline.Workspace)/mne-tools'
MNE_LOGGING_LEVEL: 'warning'
MNE_FORCE_SERIAL: 'true'
PYTEST_XDIST_N: '2' # Microsoft-hosted agents have 2 cores
Expand All @@ -181,17 +182,33 @@ stages:
3.14 pip:
TEST_MODE: 'pip'
PYTHON_VERSION: '3.14'
MNE_TEST_ALLOW_SKIP: "^.*(Requires (spm|brainstorm) dataset|Requires MNE-C|Requires FreeSurfer|CUDA not|on Windows|MNE_FORCE_SERIAL|PySide6 causes segfaults|SCIPY_ARRAY_API).*$"
MNE_TEST_ALLOW_SKIP: "^.*(Requires (spm|brainstorm) dataset|Requires FreeSurfer|CUDA not|on Windows|MNE_FORCE_SERIAL|PySide6 causes segfaults|SCIPY_ARRAY_API).*$"
3.14 pip pre:
TEST_MODE: 'pip-pre'
PYTHON_VERSION: '3.14'
MNE_TEST_ALLOW_SKIP: "^.*(Requires (spm|brainstorm) dataset|Requires MNE-C|Requires FreeSurfer|CUDA not|Numba not|on Windows|MNE_FORCE_SERIAL|PySide6 causes segfaults|SCIPY_ARRAY_API).*$"
MNE_TEST_ALLOW_SKIP: "^.*(Requires (spm|brainstorm) dataset|Requires FreeSurfer|CUDA not|Numba not|on Windows|MNE_FORCE_SERIAL|PySide6 causes segfaults|SCIPY_ARRAY_API).*$"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
architecture: 'x64'
addToPath: true
- bash: |
set -xeo pipefail
git clone --depth 1 https://github.com/mne-tools/mne-tools.git "$MNE_TOOLS_DIR"
displayName: Clone mne-tools
- task: Cache@2
inputs:
key: '"minimal-cmds" | "$(Agent.OS)" | $(MNE_TOOLS_DIR)/tools/get_minimal_commands.sh'
path: C:\Users\VssAdministrator\minimal_cmds
displayName: Cache minimal commands
# MNE_TOOLS_DIR is a Windows path and these steps run under Git Bash, hence
# cygpath; backticks rather than $(...) so Azure does not read it as a macro
- bash: |
set -eo pipefail
MNE_TOOLS_UNIX=`cygpath -u "$MNE_TOOLS_DIR"`
bash "$MNE_TOOLS_UNIX/tools/get_minimal_commands.sh"
displayName: Get minimal commands
- bash: |
set -xeo pipefail
git clone --depth 1 https://github.com/pyvista/setup-headless-display-action.git
Expand All @@ -216,6 +233,11 @@ stages:
displayName: Cache testing data
- bash: ./tools/github_actions_download.sh
displayName: Download testing data
# Windows does not define HOME, and MNE-C dereferences it unconditionally:
# mne_forward_solution crashes with 0xC0000005 without it. Set after the
# steps above so that Git Bash keeps deriving its own MSYS-style HOME.
- script: 'echo ##vso[task.setvariable variable=HOME]%USERPROFILE%'
displayName: Set HOME for MNE-C
- script: pytest -m "not (slowtest or pgtest)" -n $(PYTEST_XDIST_N) --dist loadscope --timeout=120 --timeout-method=thread -o faulthandler_timeout=110 --tb=short --cov=mne --cov-report=xml -vv mne
displayName: Run tests
- bash: bash <(curl -s https://codecov.io/bash)
Expand Down
2 changes: 1 addition & 1 deletion tools/github_actions_env_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [[ "$MNE_CI_KIND" == "pip"* ]]; then
echo "MNE_QT_BACKEND=PySide6" | tee -a $GITHUB_ENV
elif [[ "$MNE_CI_KIND" == "pip" ]]; then
if [[ "${RUNNER_OS}" == "macOS" ]]; then
echo "MNE_TEST_ALLOW_SKIP=.*(Requires (spm|brainstorm|misc) dataset|SCIPY_ARRAY_API|FreeSurfer|MNE-C|CUDA not|macOS|PySide6 causes segfaults).*" | tee -a $GITHUB_ENV
echo "MNE_TEST_ALLOW_SKIP=.*(Requires (spm|brainstorm|misc) dataset|SCIPY_ARRAY_API|FreeSurfer|CUDA not|macOS|PySide6 causes segfaults).*" | tee -a $GITHUB_ENV
else
echo "MNE_TEST_ALLOW_SKIP=.*(Requires (spm|brainstorm|misc) dataset|SCIPY_ARRAY_API|CUDA not|PySide6 causes segfaults).*" | tee -a $GITHUB_ENV
fi
Expand Down
3 changes: 1 addition & 2 deletions tools/github_actions_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ elif [[ "${CI_OS_NAME}" == "macos"* ]]; then
if [[ "$(uname -m)" == "arm64" ]]; then
CONDITION="not (ultraslowtest or pgtest)"
else
# TODO: the MNE-C tools are on PATH during setup but not once the tests run (gh-14230)
CONDITION="not (slowtest or pgtest or mne_c)"
CONDITION="not (slowtest or pgtest)"
fi
elif [[ "${CI_OS_NAME}" == "windows"* ]]; then
CONDITION="not (slowtest or pgtest)"
Expand Down
Loading