Skip to content

added build cache

added build cache #1

on:
workflow_call:
inputs:
package:
required: true
type: string
env:
# Setting an environment variable with the value of a configuration variable
package_folder: packages/${{ inputs.package }}
FOUNDRY_PROFILE: ci
jobs:
check:
strategy:
fail-fast: true
name: Cache build
runs-on: ubuntu-latest
steps:

Check failure on line 20 in .github/workflows/cache_foundry_build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cache_foundry_build.yml

Invalid workflow file

You have an error in your yaml syntax on line 20
- uses: actions/cache@v3
env:
cache-name: cache-build-${{ inputs.package }}
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
~/${{ env.package_folder }}/cache
~/${{ env.package_folder }}/out
key: ${{ inputs.package }}-${{ hashFiles(format('{0}/src/**/*.sol', env.package_folder)) }}-${{ hashFiles(format('{0}/test/**/*.sol', env.package_folder)) }}-${{ hashFiles(format('{0}/script/**/*.sol', env.package_folder)) }}