question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

caching a folder on ubuntu and restore it on macos doesn't work

See original GitHub issue

when you try to cache a folder between two different jobs which are on a different operating system runner, it seems like the caching mechanism doesn’t work.

i am using this pipeline to reproduce the issue:

name: Build Unity TestProject
on: [pull_request]

jobs:
  buildAndTestForSomePlatforms:
    name: Build for ${{ matrix.targetPlatform }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        unityVersion:
          - 2020.3.25f1
        targetPlatform:
          - Android
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
          lfs: true
      - run: mkdir build && mkdir build/Android && touch build/Android/Android.apk
      
      - name: cache build folder
        uses: actions/cache@v2
        with:
          path: build/${{ matrix.targetPlatform }}
          key: build-${{ matrix.targetPlatform }}-${{ github.run_id }}
      - run: ls build
  testOnAndroidEmulator:
    name: execute tests
    needs: buildAndTestForSomePlatforms
    runs-on: macos-latest
    steps:
      - name: restore 'Android' build folder
        uses: actions/cache@v2
        with:
          path: build/Android
          key: build-Android-${{ github.run_id }}
      - run: ls 

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

3reactions
megetroncommented, Feb 27, 2022

@vsvipul - YES! installing zstd in linux-latest runner solved the issue for me: sudo apt install zstd

maybe it would be best to document that sceario? when a user wants to cache from linux to mac he should install zstd in the linux machine.

1reaction
vsvipulcommented, Mar 2, 2022

@megetron zstd should have been installed by default when you used the action. I’m not sure why that was not done in this case. Added this to our backlog. We will look into how we can fix this. Thank you for opening this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux sharing with Macos - Caching Dependencies
I have a Om Next/React Native project I'm trying to build. The restore_cache is defaulting to the /home/circleci/fiskal instead of /Users/ ...
Read more >
Clearing bundler caches on macOS and Linux
Clearing a cache sometimes can help you work around issues related to stale or corrupt data and is often useful when troubleshooting and...
Read more >
Managing the global packages, cache, and temp folders
In this article. Viewing folder locations; Clearing local folders; Troubleshooting errors. Whenever you install, update, or restore a package, ...
Read more >
Directories used by the IDE to store settings, caches, plugins ...
Just to add, I am using Mac OS Mavericks and I don't find a single one of the directories you claim above that...
Read more >
Caching dependencies to speed up workflows - GitHub Docs
A cache created for a branch in a workflow run can be accessed and restored from another workflow run for the same repository...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found