Skip to content

Commit

Permalink
fix: compiler caching fix [APE-1158] (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Feb 2, 2024
1 parent 3004dd9 commit edfe946
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test_ape_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
version:
[
'default',
'0.6.11',
'==0.6.11',
'0.7.0',
'==0.7.0',
'git+https://github.com/ApeWorX/ape.git@main',
]
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
'default_with_version_config',
'default_without_version_in_config',
'tokens',
'tokens==0.6.1'
'tokens==0.7.0'
]
steps:
- uses: actions/checkout@v4
Expand All @@ -37,7 +37,7 @@ jobs:
if [[ "${{ matrix.plugins }}" == "default_without_version_in_config" ]]; then
# Remove the version so it defaults to `. -U`.
sed -i 's/version: 0.6.1//g' "ape-config.yaml"
sed -i 's/version: 0.7.0//g' "ape-config.yaml"
fi
- name: Run ape action
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ steps:
- uses: ApeWorX/github-action@v2
with:
python-version: '3.10' # (optional)
ape-version-pin: '>=0.6.0' # (optional)
ape-plugins-list: 'solidity vyper==0.6.2' # (optional)
ape-version-pin: '>=0.7.0' # (optional)
ape-plugins-list: 'solidity vyper==0.7.0' # (optional)
- run: ape test -s
```
Expand Down
22 changes: 22 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ runs:

steps:
- uses: actions/cache@v4
name: Compilers cache
with:
path: |
/home/runner/.solcx
/home/runner/.vvm/vyper-*
key: ${{ runner.os }}-compiler-cache

- uses: actions/cache@v4
name: Build cache
with:
path: |
${{ github.workspace }}/.build
Expand Down Expand Up @@ -132,3 +134,23 @@ runs:
run: pip install -r requirements.txt
shell: bash
if: steps.check-requirements-txt.outputs.files_exists == 'true'

- name: Ensure cache directories exist
shell: bash
run: |
# NOTE: Workaround for an unrepressible warning
# in the cache action:
# https://github.com/actions/cache/issues/1241
if [ ! -d "/home/runner/.solcx" ]; then
mkdir "/home/runner/.solcx"
echo "Solcx directory created."
fi
if [ ! -d "/home/runner/.vvm" ]; then
mkdir "/home/runner/.vvm"
echo "VVM directory created."
fi
if [ ! -d "${{ github.workspace }}/.build" ]; then
mkdir "${{ github.workspace }}/.build"
echo ".build directory created."
fi
2 changes: 1 addition & 1 deletion ape-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file exists only as a test for the action.
plugins:
- name: tokens
version: 0.6.1
version: 0.7.0

0 comments on commit edfe946

Please sign in to comment.