Skip to content

Commit

Permalink
add windows runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz-Alexander-Kern committed Apr 26, 2024
1 parent fa98ff8 commit 8a89514
Showing 1 changed file with 28 additions and 32 deletions.
60 changes: 28 additions & 32 deletions .github/workflows/cache_elephant_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,48 +43,44 @@ jobs:
- name: Cache found?
run: echo "Cache-hit == ${{steps.cache-datasets.outputs.cache-hit == 'true'}}"

- name: Installing datalad
- name: Configuring git
if: steps.cache-datasets.outputs.cache-hit != 'true'
run: |
git config --global user.email "elephant_ci@fake_mail.com"
git config --global user.name "elephant CI"
git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency
- name: Install Datalad macOS
if: steps.cache-datasets.outputs.cache-hit != 'true' && ${{ runner.os }}" == "macOS"
run: |
brew install datalad
if [[ "${{ runner.os }}" == "macOS"* ]]; then
brew install datalad
elif [[ "${{ runner.os }}" == "Linux"* ]]; then
python -m pip install -U pip # Official recommended way
pip install datalad-installer
datalad-installer --sudo ok git-annex --method datalad/packages
pip install datalad
elif [[ "${{ runner.os }}" == "Windows"* ]]; then
python -m pip install -U pip # Official recommended way
pip install datalad-installer
datalad-installer --sudo ok git-annex --method datalad/packages
pip install datalad
else
echo "Unsupported operating system."
exit 1
fi
- name: Install Datalad Linux/ Windows
if: steps.cache-datasets.outputs.cache-hit != 'true' && ${{ runner.os }}" == "Linux" || ${{ runner.os }}" == "Windows"
run: |
python -m pip install -U pip # Official recommended way
pip install datalad-installer
datalad-installer --sudo ok git-annex --method datalad/packages
pip install datalad
- name: Download dataset
id: download-dataset
if: steps.cache-datasets.outputs.cache-hit != 'true'
# Download repository and also fetch data
run: |
cd ~
datalad --version
datalad install --recursive --get-data https://gin.g-node.org/NeuralEnsemble/elephant-data
cd ~
datalad --version
datalad install --recursive --get-data https://gin.g-node.org/NeuralEnsemble/elephant-data
- name: Show size of the cache to assert data is downloaded macOS, Linux
if: ${{ runner.os }}" == "Linux" || ${{ runner.os }}" == "macOS"
run: |
cd ~
du -hs ~/elephant-data
ls -lh ~/elephant-data
- name: Show size of the cache to assert data is downloaded
- name: Show size of the cache to assert data is downloaded Windows
if: ${{ runner.os }}" == "Windows"
run: |
cd ~
if [[ "${{ runner.os }}" == "macOS"* ]]; then
du -hs ~/elephant-data
ls -lh ~/elephant-data
elif [[ "${{ runner.os }}" == "Linux"* ]]; then
du -hs ~/elephant-data
ls -lh ~/elephant-data
elif [[ "${{ runner.os }}" == "Windows"* ]]; then
dir ~\elephant-data
fi
cd ~
dir ~\elephant-data

0 comments on commit 8a89514

Please sign in to comment.