From edfe9462b6e3678fee131e75d3b479157956cc99 Mon Sep 17 00:00:00 2001 From: antazoey Date: Fri, 2 Feb 2024 12:47:28 -0600 Subject: [PATCH] fix: compiler caching fix [APE-1158] (#27) --- .github/workflows/test_ape_version.yaml | 4 ++-- .github/workflows/test_plugins.yaml | 4 ++-- README.md | 4 ++-- action.yml | 22 ++++++++++++++++++++++ ape-config.yaml | 2 +- 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_ape_version.yaml b/.github/workflows/test_ape_version.yaml index 3c47878..89e17e8 100644 --- a/.github/workflows/test_ape_version.yaml +++ b/.github/workflows/test_ape_version.yaml @@ -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: diff --git a/.github/workflows/test_plugins.yaml b/.github/workflows/test_plugins.yaml index 763e264..2dba24a 100644 --- a/.github/workflows/test_plugins.yaml +++ b/.github/workflows/test_plugins.yaml @@ -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 @@ -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 diff --git a/README.md b/README.md index 3087fdf..173257b 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/action.yml b/action.yml index 4b6cf7a..a9abb61 100644 --- a/action.yml +++ b/action.yml @@ -27,6 +27,7 @@ runs: steps: - uses: actions/cache@v4 + name: Compilers cache with: path: | /home/runner/.solcx @@ -34,6 +35,7 @@ runs: key: ${{ runner.os }}-compiler-cache - uses: actions/cache@v4 + name: Build cache with: path: | ${{ github.workspace }}/.build @@ -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 diff --git a/ape-config.yaml b/ape-config.yaml index c3d6ac3..41a6f2a 100644 --- a/ape-config.yaml +++ b/ape-config.yaml @@ -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