diff --git a/.github/workflows/caches_cron_job.yml b/.github/workflows/caches_cron_job.yml index 95759b956..dca221987 100644 --- a/.github/workflows/caches_cron_job.yml +++ b/.github/workflows/caches_cron_job.yml @@ -12,9 +12,11 @@ jobs: create-conda-env-cache-if-missing: name: Caching conda env - runs-on: "ubuntu-latest" + runs-on: ${{ matrix.os }} strategy: fail-fast: true + matrix: + os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] defaults: # by default run in bash mode (required for conda usage) run: @@ -38,7 +40,7 @@ jobs: # * when package dependencies change id: cache-conda-env with: - path: /usr/share/miniconda/envs/neo-test-env + path: envs/neo-test-env key: ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }} - name: Cache found? @@ -48,10 +50,21 @@ jobs: - uses: conda-incubator/setup-miniconda@v2.2.0 if: steps.cache-conda-env.outputs.cache-hit != 'true' with: - activate-environment: neo-test-env + activate-environment: ~/envs/neo-test-env environment-file: environment_testing.yml python-version: 3.9 + - name: Installing datalad and git-annex + if: steps.cache-conda-env.outputs.cache-hit != 'true' + run: | + git config --global user.email "neo_ci@fake_mail.com" + git config --global user.name "neo CI" + python -m pip install -U pip # Official recommended way + pip install datalad-installer + datalad-installer --sudo ok --bin-dir ~/envs/neo-test-env/ git-annex --method datalad/packages + pip install datalad + git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency + - name: Create the conda environment to be cached if: steps.cache-conda-env.outputs.cache-hit != 'true' # create conda env, configure git and install pip, neo and test dependencies from master @@ -63,7 +76,7 @@ jobs: pip install --upgrade -e .[test] create-data-cache-if-missing: - name: Caching data env + name: Caching data runs-on: "ubuntu-latest" steps: @@ -89,7 +102,7 @@ jobs: git config --global user.name "neo CI" python -m pip install -U pip # Official recommended way pip install datalad-installer - datalad-installer --sudo ok git-annex --method datalad/packages + datalad-installer --sudo ok git-annex=8 --method datalad/packages pip install datalad git config --global filter.annex.process "git-annex filter-process" # recommended for efficiency diff --git a/.github/workflows/io-test.yml b/.github/workflows/io-test.yml index 51b29a98f..4957ae716 100644 --- a/.github/workflows/io-test.yml +++ b/.github/workflows/io-test.yml @@ -48,7 +48,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: - activate-environment: neo-test-env + activate-environment: ~/envs/neo-test-env python-version: ${{ matrix.python-version }} - name: Get current dependencies hash @@ -62,7 +62,7 @@ jobs: # * when package dependencies change id: cache-conda-env with: - path: /usr/share/miniconda/envs/neo-test-env + path: ~/envs/neo-test-env key: ${{ runner.os }}-conda-env-${{ steps.dependencies.outputs.hash }}-${{ steps.date.outputs.date }} # restore-keys match any key that starts with the restore-key restore-keys: | @@ -74,7 +74,7 @@ jobs: # restore-key hits should result in `cache-hit` == 'false' if: steps.cache-conda-env.outputs.cache-hit != 'true' run: | - conda env update --name neo-test-env --file environment_testing.yml --prune + conda env update --prefix ~/envs --name neo-test-env --file environment_testing.yml --prune - name: Configure git run: |