Am I caching right with actions/cache for GitHub Actions on Windows and MacOS?

Viewed 1685

My config is this:

#
# Name.
#

name: build

#
# Triggers.
#

on:
  pull_request:
    paths-ignore:
      - '**.md'
  push:
    branches:
      - build
    paths-ignore:
      - '**.md'

#
# Jobs.
#

jobs:
  linux:
    runs-on: ubuntu-16.04
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - uses: actions/cache@v2
        with:
          path: |
            /usr
            **/node_modules
          key: ${{ runner.os }}-cache
      - run: sudo apt-get update
      - run: sudo apt-get install build-essential
      - run: sudo apt-get install graphicsmagick
      - run: sudo apt-get install texlive-xetex
      - run: sudo apt-get install imagemagick
      - run: sudo apt-get install fontforge
      - run: sudo apt-get install ffmpeg
      - run: npm install
      - run: npm test

  windows:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - uses: actions/cache@v2
        with:
          path: |
            C:\ProgramData
            **\node_modules
          key: ${{ runner.os }}-cache
      - run: choco install graphicsmagick
      - run: choco install imagemagick
      - run: choco install fontforge
      - run: choco install ffmpeg
      - run: choco install miktex
      - run: npm install
      - run: npm test

  macos:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v1
        with:
          node-version: 14.x
      - uses: actions/cache@v2
        with:
          path: |
            /usr
            **/node_modules
          key: ${{ runner.os }}-cache
      - run: brew cask install java
      - run: brew cask install mactex
      - run: brew install graphicsmagick
      - run: brew install imagemagick
      - run: brew install fontforge
      - run: brew install ffmpeg
      - run: npm install
      - run: npm test

Does the cache look correct for all 3 operating systems? It only seems to be working for Linux, what am I doing wrong?

The logs are saying Cache not found for input keys: macOS-cache? I'm not sure what's wrong. Actually it's saying Cache not found for input keys: Linux-cache for Linux too.

Now getting this on Mac:

Post job cleanup.
/usr/bin/tar --use-compress-program zstd -T0 -cf cache.tzst -P -C /Users/runner/work/stone/stone --files-from manifest.txt
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: Couldn't list extended attributes: Permission denied
tar: ../../../../../usr/local/miniconda/pkgs/zlib-1.2.11-h1de35cc_3jfy28ko5: Couldn't visit directory: Unknown error: -1
tar: Error exit delayed from previous errors.
[warning]Tar failed with error: The process '/usr/bin/tar' failed with exit code 1
0 Answers
Related