Skip to content

Fix/hfc opti reg prob (#2588) #1

Fix/hfc opti reg prob (#2588)

Fix/hfc opti reg prob (#2588) #1

Workflow file for this run

name: update-cache
on:
push:
branches:
- master
jobs:
# This workflow updates the python environment cache so that other workflows in different branches have access to it
build-cache:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest]
python-version: ['3.10']
flavour: ['all']
steps:
- name: "Clone repository"
uses: actions/checkout@v4
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# use `uv` to retrieve the latest dependency versions
- name: "Compile Dependency Versions"
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
if [ "${{ matrix.os }}" == "macos-13" ]; then
source $HOME/.local/bin/env
fi
uv pip compile requirements/dev-all.txt > requirements-latest.txt
- name: "Cache python environment"
uses: actions/cache@v4
id: pythonenv-cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('requirements/*.txt', 'requirements-latest.txt') }}
- name: "Setup Pip"
run: |
python -m pip install --upgrade pip
- name: "Install Latest Dependencies"
run: |
# install latest dependencies (potentially updating cached dependencies)
pip install -U -r requirements/dev-all.txt