diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index ece9891..dafb931 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -14,6 +14,7 @@ jobs: uses: actions/setup-python@v3 with: python-version: '3.11' + cache: 'pip' - name: Add conda to system path run: | # $CONDA is an environment variable pointing to the root of the miniconda directory @@ -28,6 +29,27 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + conda-pkg-caching: + name: Caching + runs-on: "ubuntu-latest" + steps: + - uses: actions/checkout@v4 + - name: Cache conda + uses: actions/cache@v3 + env: + # Increase this value to reset cache if etc/example-environment.yml has not changed + CACHE_NUMBER: 0 + with: + path: ~/conda_pkgs_dir + key: + ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ + hashFiles('environment.yml') }} + - uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: anaconda-client-env + channel-priority: strict + environment-file: environment.yml + use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! nuitka-build: strategy: matrix: @@ -42,6 +64,7 @@ jobs: with: auto-activate-base: true activate-environment: "" + mamba-version: "*" - name: Install dependencies run: | conda env update --file environment.yml --name base diff --git a/environment.yml b/environment.yml index efb32fd..76008b8 100644 --- a/environment.yml +++ b/environment.yml @@ -12,4 +12,5 @@ dependencies: - pip: - truth-table-generator - CTkTable - - nuitka \ No newline at end of file + - nuitka + - \ No newline at end of file