From a2e4ad0c029a97892c7c050d537095adb09d151b Mon Sep 17 00:00:00 2001 From: BSFishy Date: Thu, 20 Feb 2020 17:55:31 +0000 Subject: [PATCH] Fix actions cache --- .github/workflows/build.yml | 23 ++++++++++++++++------- requirements.txt | 5 +++++ 2 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 requirements.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95d2e1f..e3d7f04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,23 +14,32 @@ jobs: uses: actions/setup-python@v1 with: python-version: '3.8' - - uses: actions/cache@v1 + - name: Setup Linux cache + uses: actions/cache@v1 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip - key: ${{ runner.os }}-pip - - uses: actions/cache@v1 + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Setup macOS cache + uses: actions/cache@v1 if: startsWith(runner.os, 'macOS') with: path: ~/Library/Caches/pip - key: ${{ runner.os }}-pip - - uses: actions/cache@v1 + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + - name: Setup Windows cache + uses: actions/cache@v1 if: startsWith(runner.os, 'Windows') with: path: ~\AppData\Local\pip\Cache - key: ${{ runner.os }}-pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Setup environment - run: python -m pip install --disable-pip-version-check meson==0.53.0 gcovr==4.2 ninja==1.9.0.post1 + run: python -m pip install --disable-pip-version-check -r requirements.txt - name: Setup run: meson build - name: Build diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..48ac8f5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +# This is the pip requirements file used for when we build for CI + +meson==0.53.0 +gcovr==4.2 +ninja==1.9.0.post1