Skip to content

Commit

Permalink
Cache Conda packages in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Jul 24, 2023
1 parent 81bd1b5 commit bf16255
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,25 @@ jobs:
- name: Install LDAP dependencies
run: sudo apt-get -y install libsasl2-dev libldap2-dev libssl-dev

- name: Cache Conda packages
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-environment.yml') }}
env:
CACHE_NUMBER: 0 # increase to reset cache if `conda-environment.yml` has not changed

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: mxcubeweb
auto-activate-base: false
auto-update-conda: true
channel-priority: strict
environment-file: conda-environment.yml
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true

- name: Install dependencies
run: |
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,25 @@ jobs:
- name: Install LDAP dependencies
run: sudo apt-get -y install libsasl2-dev libldap2-dev libssl-dev

- name: Cache Conda packages
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-environment.yml') }}
env:
CACHE_NUMBER: 0 # increase to reset cache if `conda-environment.yml` has not changed

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: mxcubeweb
auto-activate-base: false
auto-update-conda: true
channel-priority: strict
environment-file: conda-environment.yml
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true

- name: Install dependencies
run: |
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/format_and_lint_ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,25 @@ jobs:
- name: Install LDAP dependencies
run: sudo apt-get -y install libsasl2-dev libldap2-dev libssl-dev

- name: Cache Conda packages
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('conda-environment.yml') }}
env:
CACHE_NUMBER: 0 # increase to reset cache if `conda-environment.yml` has not changed

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: mxcubeweb
auto-activate-base: false
auto-update-conda: true
channel-priority: strict
environment-file: conda-environment.yml
python-version: ${{ matrix.python-version }}
use-only-tar-bz2: true

- name: Install dependencies
run: |
Expand Down

0 comments on commit bf16255

Please sign in to comment.