added build cache #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
- 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)) }} |