Skip to content

Commit

Permalink
MAINT: Replace or remove CirrusCI (#11859)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored Aug 3, 2023
1 parent 64f3846 commit 193e410
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 75 deletions.
74 changes: 65 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,68 @@

version: 2.1

_check_skip: &check_skip
name: Check-skip
command: |
set -e
export COMMIT_MESSAGE=$(git log --format=oneline -n 1);
if [[ "$CIRCLE_PULL_REQUEST" != "" ]] && ([[ "$COMMIT_MESSAGE" == *"[skip circle]"* ]] || [[ "$COMMIT_MESSAGE" == *"[circle skip]"* ]]); then
echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
circleci-agent step halt;
fi
jobs:
pytest-macos-arm64:
parameters:
scheduled:
type: string
default: "false"
macos:
xcode: "14.2.0"
resource_class: macos.m1.medium.gen1
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- checkout
- run:
<<: *check_skip
- run:
name: Install Python and dependencies
command: |
set -eo pipefail
brew install python@3.11
which python
which pip
pip install --upgrade pip setuptools wheel
pip install --upgrade --only-binary "numpy,scipy,dipy,statsmodels" -ve . -r requirements.txt -r requirements_testing.txt -r requirements_testing_extra.txt PyQt6
pip uninstall -y vtk pyvista pyvistaqt # too slow on Apple's software renderer!
mkdir -p test-results
echo "set -eo pipefail" >> $BASH_ENV
- run:
command: mne sys_info
- run:
command: ./tools/get_testing_version.sh && cat testing_version.txt
- restore_cache:
keys:
- data-cache-testing-{{ checksum "testing_version.txt" }}
- run:
command: python -c "import mne; mne.datasets.testing.data_path(verbose=True)"
- save_cache:
key: data-cache-testing-{{ checksum "testing_version.txt" }}
paths:
- ~/mne_data/MNE-testing-data # (2.5 G)
- run:
command: pytest -m "not slowtest" --tb=short --cov=mne --cov-report xml -vv mne
- run:
name: Prepare test data upload
command: cp -av junit-results.xml test-results/junit.xml
- store_test_results:
path: ./test-results
# Codecov orb has bugs on macOS (gpg issues)
# - codecov/upload
- run:
command: bash <(curl -s https://codecov.io/bash)

build_docs:
parameters:
scheduled:
Expand Down Expand Up @@ -41,14 +102,7 @@ jobs:
paths:
- ".git"
- run:
name: Check-skip
command: |
set -e
export COMMIT_MESSAGE=$(git log --format=oneline -n 1);
if [[ -v CIRCLE_PULL_REQUEST ]] && ([[ "$COMMIT_MESSAGE" == *"[skip circle]"* ]] || [[ "$COMMIT_MESSAGE" == *"[circle skip]"* ]]); then
echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."
circleci-agent step halt;
fi
<<: *check_skip
- run:
name: Merge with upstream and triage run
command: |
Expand Down Expand Up @@ -454,7 +508,7 @@ jobs:
- run:
name: Deploy docs
command: |
git config --global user.email "circle@mne.com";
git config --global user.email "circle@mne.tools";
git config --global user.name "Circle CI";
cd ~/mne-tools.github.io;
git checkout main
Expand Down Expand Up @@ -484,6 +538,8 @@ jobs:
workflows:
default:
jobs:
- pytest-macos-arm64:
name: pytest-macos-arm64
- build_docs:
name: build_docs
- linkcheck:
Expand Down
44 changes: 0 additions & 44 deletions .cirrus.yml

This file was deleted.

21 changes: 11 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ stages:
- bash: |
set -e
python -m pip install --progress-bar off --upgrade pip setuptools wheel
python -m pip install --progress-bar off mne-qt-browser[opengl] pyvista scikit-learn pytest-error-for-skips python-picard "PySide6!=6.5.1" qtpy
python -m pip install --progress-bar off mne-qt-browser[opengl] pyvista scikit-learn pytest-error-for-skips python-picard "PyQt6!=6.5.1" qtpy
python -m pip uninstall -yq mne
python -m pip install --progress-bar off --upgrade -e .[test]
displayName: 'Install dependencies with pip'
- bash: |
set -e
mne sys_info -pd
mne sys_info -pd | grep "qtpy .*(PySide6=.*)$"
mne sys_info -pd | grep "qtpy .*(PyQt6=.*)$"
displayName: Print config
# Uncomment if "xcb not found" Qt errors/segfaults come up again
# - bash: |
# set -e
# LD_DEBUG=libs python -c "from PySide6.QtWidgets import QApplication, QWidget; app = QApplication([]); import matplotlib; matplotlib.use('QtAgg'); import matplotlib.pyplot as plt; plt.figure()"
# LD_DEBUG=libs python -c "from PyQt6.QtWidgets import QApplication, QWidget; app = QApplication([]); import matplotlib; matplotlib.use('QtAgg'); import matplotlib.pyplot as plt; plt.figure()"
- bash: source tools/get_testing_version.sh
displayName: 'Get testing version'
- task: Cache@2
Expand Down Expand Up @@ -187,13 +187,6 @@ stages:
displayName: 'Cache testing data'
- script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)"
displayName: 'Get test data'
- bash: |
set -e
mne sys_info -pd
mne sys_info -pd | grep "qtpy .* (PySide6=.*)$"
PYTEST_QT_API=PySide6 pytest -m "not slowtest" ${TEST_OPTIONS}
python -m pip uninstall -yq PySide6
displayName: 'PySide6'
- bash: |
set -e
python -m pip install PyQt6
Expand All @@ -204,6 +197,14 @@ stages:
PYTEST_QT_API=PyQt6 pytest -m "not slowtest" ${TEST_OPTIONS}
python -m pip uninstall -yq PyQt6 PyQt6-sip PyQt6-Qt6
displayName: 'PyQt6'
- bash: |
set -e
python -m pip install PySide6
mne sys_info -pd
mne sys_info -pd | grep "qtpy .* (PySide6=.*)$"
PYTEST_QT_API=PySide6 pytest -m "not slowtest" ${TEST_OPTIONS}
python -m pip uninstall -yq PySide6
displayName: 'PySide6'
- bash: |
set -e
python -m pip install PySide2
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ h5io
packaging
pymatreader
qtpy
PySide6!=6.5.1
PyQt6
pyobjc-framework-Cocoa>=5.2.0; platform_system=="Darwin"
sip
scikit-learn
Expand Down
5 changes: 0 additions & 5 deletions tools/cirrus_dependencies.sh

This file was deleted.

6 changes: 0 additions & 6 deletions tools/cirrus_install_python.sh

This file was deleted.

2 changes: 2 additions & 0 deletions tools/get_testing_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if [ ! -z $GITHUB_ENV ]; then
echo "TESTING_VERSION="$TESTING_VERSION >> $GITHUB_ENV
elif [ ! -z $AZURE_CI ]; then
echo "##vso[task.setvariable variable=testing_version]$TESTING_VERSION"
elif [ ! -z $CIRCLECI ]; then
echo "$TESTING_VERSION" > testing_version.txt
else
echo $TESTING_VERSION
fi

0 comments on commit 193e410

Please sign in to comment.