Skip to content

Commit

Permalink
Fix caching in CI tests
Browse files Browse the repository at this point in the history
Cache was being used, but we were only caching the .wheel files. We
still need to `pip install` in order to use the cache.
  • Loading branch information
Grazfather committed Jul 5, 2021
1 parent 80c768a commit e95b072
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Refresh environment
- name: Install python and toolchain
run: |
sudo apt-get update
sudo apt-get install -y gdb-multiarch python3-dev python3-pip python3-wheel python3-setuptools git cmake gcc g++ pkg-config libglib2.0-dev
Expand All @@ -33,29 +33,27 @@ jobs:
- name: Get pip cache dir
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
echo "::set-output name=dir::$(python3 -m pip cache dir)"
- name: Cache trinity libs
- name: Cache dependencies
uses: actions/cache@v2
id: cache-libs
id: cache-deps
env:
cache-name: cache-trinity-libs-and-python-modules
cache-name: cache-deps
with:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
path: |
${{ steps.pip-cache.outputs.dir }}
~/.cache/pip
restore-keys:
${{ runner.os }}-pip-${{ env.cache-name }}-
${{ runner.os }}-pip-
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-

- name: Compile Capstone/Keystone/Unicorn and install Python modules
if: steps.cache-libs.outputs.cache-hit != 'true'
- name: Install Python modules (Capstone, Keystone, Unicorn, Ropper)
run: |
mkdir -p ~/.cache/pip || echo ok
python3 -c 'import capstone, keystone, unicorn' || python3 -m pip install --user --upgrade -r ./requirements.txt
mkdir -p ${{ steps.pip-cache.outputs.dir }}
python3 -m pip install --user --upgrade -r ./requirements.txt
- name: Setup GEF
run: |
Expand Down

0 comments on commit e95b072

Please sign in to comment.