Skip to content

Commit

Permalink
More refactor in .yml files
Browse files Browse the repository at this point in the history
  • Loading branch information
thilinarmtb committed Apr 6, 2024
1 parent 8d5dada commit 733a74f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ on:
required: false
default: false
env:
# Increase to reset cache manually
CACHE_NUMBER: 0
LIBNOMP_ENV: /usr/share/miniconda/envs/libnomp
NOMP_CONDA_ENV: /usr/share/miniconda/envs/libnomp
NOMP_INSTALL_DIR: ${{ github.workspace }}/install
POCL_CACHE_NUMBER: 0
NOMP_CACHE_NUMBER: 0 # Increase to reset cache manually.
POCL_CACHE_NUMBER: 0 # Increase to reset cache manually.
jobs:
ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,8 +45,8 @@ jobs:
uses: actions/cache@v3
id: cache
with:
path: ${{ env.LIBNOMP_ENV }}
key: conda-${{ runner.os }}-${{ hashFiles('environment.yml') }}-${{ hashFiles('requirements.txt') }}-${{ env.CACHE_NUMBER }}
path: ${{ env.NOMP_CONDA_ENV }}
key: conda-${{ runner.os }}-${{ hashFiles('environment.yml') }}-${{ hashFiles('requirements.txt') }}-${{ env.NOMP_CACHE_NUMBER }}
- name: Update conda environment
id: update_env
run: |
Expand All @@ -56,7 +55,7 @@ jobs:
- uses: actions/cache@v3
id: pocl_cache
with:
path: ${{ env.LIBNOMP_ENV }}/lib/pocl
path: ${{ env.NOMP_CONDA_ENV }}/lib/pocl
key: ${{ runner.os }}-build-pocl-${{ env.POCL_CACHE_NUMBER }}
- name: Install pocl
id: install_pocl
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:
required: false
default: false
env:
# Increase to reset cache manually
CACHE_NUMBER: 0
LIBNOMP_ENV: /usr/share/miniconda/envs/libnomp-dev
NOMP_CONDA_ENV: /usr/share/miniconda/envs/libnomp-dev
NOMP_INSTALL_DIR: ${{ github.workspace }}/install
NOMP_CACHE_NUMBER: 0 # Increase to reset cache manually.
POCL_CACHE_NUMBER: 0 # Increase to reset cache manually.
jobs:
docs:
runs-on: ubuntu-latest
Expand All @@ -39,8 +39,8 @@ jobs:
- name: Cache conda environment
uses: actions/cache@v3
with:
path: ${{ env.LIBNOMP_ENV }}
key: conda-${{ runner.os }}-${{ hashFiles('environment-dev.yml') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ env.CACHE_NUMBER }}
path: ${{ env.NOMP_CONDA_ENV }}
key: conda-${{ runner.os }}-${{ hashFiles('environment-dev.yml') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ env.NOMP_CACHE_NUMBER }}
id: cache
- name: Update conda environment
id: update_env
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ on:
required: false
default: false
env:
# Increase to reset cache manually
CACHE_NUMBER: 0
LIBNOMP_ENV: /usr/share/miniconda/envs/libnomp-dev
NOMP_CONDA_ENV: /usr/share/miniconda/envs/libnomp-dev
NOMP_INSTALL_DIR: ${{ github.workspace }}/install
NOMP_CACHE_NUMBER: 0 # Increase to reset cache manually.
jobs:
lint-check:
runs-on: ubuntu-latest
Expand All @@ -37,8 +36,8 @@ jobs:
- name: Cache conda environment
uses: actions/cache@v3
with:
path: ${{ env.LIBNOMP_ENV }}
key: conda-${{ runner.os }}-${{ hashFiles('environment-dev.yml') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ env.CACHE_NUMBER }}
path: ${{ env.NOMP_CONDA_ENV }}
key: conda-${{ runner.os }}-${{ hashFiles('environment-dev.yml') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ env.NOMP_CACHE_NUMBER }}
id: cache
- name: Update conda environment
id: update_env
Expand Down

0 comments on commit 733a74f

Please sign in to comment.