Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add cache #6

Open
Endle opened this issue Mar 5, 2021 · 2 comments
Open

Feature request: Add cache #6

Endle opened this issue Mar 5, 2021 · 2 comments

Comments

@Endle
Copy link

Endle commented Mar 5, 2021

If we cache cygwin packages, we can speed up CI process and save bandwidth for kernel.org
I tried https://github.com/Endle/wine-mono/blob/940e19c2abbc576f597e924270812721638b8eb1/.github/workflows/c-cpp.yml#L13 but t didn't work

      - name: Get Date
        id: get-date
        run: |
          echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
          echo "::set-output name=time::$(/bin/date -u "+%H%M%S")"
        shell: bash
      - name: Cache Cygwin
        uses: actions/cache@v2
        env:
          cache-name: cache-cygwin-packages
        with:
          path: /cygdrive/c/tools/cygwin/packages
          key: ${{ runner.os }}-${{ env.cache-name }}-${{ steps.get-date.outputs.date }}-${{ steps.get-date.outputs.time }}
          restore-keys: |
            ${{ runner.os }}-${{ env.cache-name }}-${{ steps.get-date.outputs.date }}-
            ${{ runner.os }}-${{ env.cache-name }}-
@egor-tensin
Copy link
Owner

@Endle I'm not sure the path: /cygdrive/c/tools/cygwin/packages part can possibly work. I image that the YAML is interpreted by a Windows program, disregarding the shell: setting. Maybe something like path: C:\tools\cygwin\packages could work, but I'm not certain the Chocolatey installer I'm using to install Cygwin would work with that. Give me some time, I'll try to test this.

@koppor
Copy link

koppor commented Sep 20, 2023

I think, the Windows path should work. Also there is a save and restore action, which allows for a more fine-grained tuning. Example here: https://github.com/zauguin/install-texlive/blob/721918b8f32b7ea8d9643027fe90987d7cfe07db/action.yml#L38

Moreover, I assume, the Chocolatey installer just needs to be skipped if these directories are present. The environment variables still need to be adjusted.

Note that caching for Chocolatey is not possible (yet): chocolatey/choco#2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants