Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MRG: Use caching in Github Actions and Azure Pipelines #8695

Merged
merged 47 commits into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a963364
First test [skip azp][skip circle]
GuillaumeFavelier Jan 4, 2021
df90cfa
Download anyway [skip azp][skip circle]
GuillaumeFavelier Jan 4, 2021
d5b9e21
Unify cache key [skip azp][skip circle]
GuillaumeFavelier Jan 4, 2021
33c28e6
Test new key
GuillaumeFavelier Jan 4, 2021
3595899
Merge branch 'master' into maint/cis
GuillaumeFavelier Jan 5, 2021
3e460a9
Test linux_pip [skip azp][skip circle]
GuillaumeFavelier Jan 5, 2021
f64e3bd
Try again [skip azp][skip circle]
GuillaumeFavelier Jan 5, 2021
d18de89
Deploy to all jobs
GuillaumeFavelier Jan 5, 2021
c08b558
Try another syntax
GuillaumeFavelier Jan 5, 2021
195d694
Test new key format [skip azp][skip circle]
GuillaumeFavelier Jan 5, 2021
aa7e9a1
Use home env variable
GuillaumeFavelier Jan 5, 2021
030aab6
Fix key [skip azp][skip circle]
GuillaumeFavelier Jan 5, 2021
8df43b7
Try naive version on Azure
GuillaumeFavelier Jan 5, 2021
111c8d9
Try again [skip github][skip circle]
GuillaumeFavelier Jan 5, 2021
3f21c96
Try again [skip github][skip circle]
GuillaumeFavelier Jan 5, 2021
6523a1b
Try another syntax [skip github][skip circle]
GuillaumeFavelier Jan 5, 2021
43eaf53
Try again [skip github]
GuillaumeFavelier Jan 5, 2021
27da031
Try again [skip github]
GuillaumeFavelier Jan 5, 2021
23897fb
Try again [skip github]
GuillaumeFavelier Jan 5, 2021
793804e
Try again [skip github]
GuillaumeFavelier Jan 5, 2021
6ccde8f
Try again [skip github]
GuillaumeFavelier Jan 5, 2021
9c0d9a7
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
7357dab
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
ff153b7
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
85c8a40
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
fa08d35
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
0c24928
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
f3d1cee
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
8b50030
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
4c9a452
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
0bc783a
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
e3e0631
Test again? [skip github]
GuillaumeFavelier Jan 5, 2021
d720cc0
Debug variable [skip github]
GuillaumeFavelier Jan 5, 2021
06f97c4
Debug variable [skip github]
GuillaumeFavelier Jan 6, 2021
dc04dd1
Debug variable [skip github]
GuillaumeFavelier Jan 6, 2021
c74b801
Debug variable [skip github]
GuillaumeFavelier Jan 6, 2021
bbc7210
Test new key format [skip github]
GuillaumeFavelier Jan 6, 2021
9a368be
Test new key format [skip github]
GuillaumeFavelier Jan 6, 2021
8a231fe
Test new key format [skip github]
GuillaumeFavelier Jan 6, 2021
7906b41
Try again [skip github]
GuillaumeFavelier Jan 6, 2021
20d98db
Try again [skip github]
GuillaumeFavelier Jan 6, 2021
d83ccf0
Try again [skip github]
GuillaumeFavelier Jan 6, 2021
b278fac
Deploy to all jobs
GuillaumeFavelier Jan 6, 2021
91d0177
Try another syntax [skip github][skip circle]
GuillaumeFavelier Jan 6, 2021
776030b
Try another syntax [skip github][skip circle]
GuillaumeFavelier Jan 6, 2021
bc5e71e
Try another syntax [skip github][skip circle]
GuillaumeFavelier Jan 6, 2021
26c0882
Test again
GuillaumeFavelier Jan 6, 2021
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: 8 additions & 0 deletions .github/workflows/compat_minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ jobs:
- shell: bash -el {0}
run: ./tools/github_actions_infos.sh
name: 'Show infos'
- shell: bash -el {0}
run: ./tools/get_testing_version.sh
name: 'Get testing version'
- uses: actions/cache@v2
with:
key: ${{ env.TESTING_VERSION }}
path: ~/mne_data
name: 'Cache testing data'
- shell: bash -el {0}
run: ./tools/github_actions_download.sh
name: 'Download testing data'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/compat_old.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ jobs:
- shell: bash -el {0}
run: ./tools/github_actions_infos.sh
name: 'Show infos'
- shell: bash -el {0}
run: ./tools/get_testing_version.sh
name: 'Get testing version'
- uses: actions/cache@v2
with:
key: ${{ env.TESTING_VERSION }}
path: ~/mne_data
name: 'Cache testing data'
- shell: bash -el {0}
run: ./tools/github_actions_download.sh
name: 'Download testing data'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/linux_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ jobs:
- shell: bash -el {0}
run: ./tools/github_actions_infos.sh
name: 'Show infos'
- shell: bash -el {0}
run: ./tools/get_testing_version.sh
name: 'Get testing version'
- uses: actions/cache@v2
with:
key: ${{ env.TESTING_VERSION }}
path: ~/mne_data
name: 'Cache testing data'
- shell: bash -el {0}
run: ./tools/github_actions_download.sh
name: 'Download testing data'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/linux_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ jobs:
- shell: bash -el {0}
run: ./tools/github_actions_infos.sh
name: 'Show infos'
- shell: bash -el {0}
run: ./tools/get_testing_version.sh
name: 'Get testing version'
- uses: actions/cache@v2
with:
key: ${{ env.TESTING_VERSION }}
path: ~/mne_data
name: 'Cache testing data'
- shell: bash -el {0}
run: ./tools/github_actions_download.sh
name: 'Download testing data'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/macos_conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ jobs:
- shell: bash -el {0}
run: ./tools/github_actions_infos.sh
name: 'Show infos'
- shell: bash -el {0}
run: ./tools/get_testing_version.sh
name: 'Get testing version'
- uses: actions/cache@v2
with:
key: ${{ env.TESTING_VERSION }}
path: ~/mne_data
name: 'Cache testing data'
- shell: bash -el {0}
run: ./tools/github_actions_download.sh
name: 'Download testing data'
Expand Down
23 changes: 23 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ stages:
- stage: Main
condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true'))
dependsOn: Check
variables:
AZURE_CI: 'true'
jobs:
- job: Style
pool:
Expand Down Expand Up @@ -112,6 +114,13 @@ stages:
python -m pip install --upgrade pip setuptools
python -m pip install --upgrade numpy scipy vtk -r requirements.txt -r requirements_testing.txt codecov
displayName: 'Install dependencies with pip'
- bash: source tools/get_testing_version.sh
displayName: 'Get testing version'
- task: Cache@2
inputs:
key: $(testing_version)
path: /home/vsts/mne_data
displayName: 'Cache testing data'
- script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)"
displayName: 'Get test data'
- script: pytest -m "ultraslowtest" --tb=short --cov=mne -vv mne
Expand Down Expand Up @@ -148,6 +157,13 @@ stages:
displayName: 'Install dependencies'
- script: mne sys_info
displayName: 'Print config and test access to commands'
- bash: source tools/get_testing_version.sh
displayName: 'Get testing version'
- task: Cache@2
inputs:
key: $(testing_version)
path: /home/vsts/mne_data
displayName: 'Cache testing data'
- script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)"
displayName: 'Get test data'
- script: pytest --tb=short --cov=mne -vv mne/viz
Expand Down Expand Up @@ -245,6 +261,13 @@ stages:
displayName: 'Print config and test access to commands'
- script: python -c "import numpy; numpy.show_config()"
displayName: Print NumPy config
- bash: source tools/get_testing_version.sh
displayName: 'Get testing version'
- task: Cache@2
inputs:
key: $(testing_version)
path: C:\Users\VssAdministrator\mne_data
displayName: 'Cache testing data'
- script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)"
displayName: 'Get test data'
- script: pytest -m "not slowtest" --tb=short --cov=mne -vv mne
Expand Down
10 changes: 10 additions & 0 deletions tools/get_testing_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -ef

TESTING_VERSION=`grep -o "testing='[0-9.]\+'" mne/datasets/utils.py | cut -d \' -f 2 | sed "s/\./-/g"`
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"
else
echo $TESTING_VERSION
fi