Skip to content

Commit

Permalink
different cache for examples and remove population step
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz committed Nov 30, 2021
1 parent 9955c9c commit d86a12d
Showing 1 changed file with 2 additions and 49 deletions.
51 changes: 2 additions & 49 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,55 +37,8 @@ jobs:
- name: "Check C/C++ formatting changes"
run: git diff --exit-code

conan-cache:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
env:
HOST_TYPE: ci
REDIS_QUEUE_HOST: redis
REDIS_STATE_HOST: redis
container:
image: faasm/faabric:0.2.2
defaults:
run:
working-directory: /code/faabric
services:
redis:
image: redis
steps:
# --- Code update ---
- name: "Fetch ref"
run: git fetch origin ${GITHUB_REF}:ci-branch
- name: "Check out branch"
run: git checkout --force ci-branch
# --- Set-up ---
- name: "Ping redis"
run: redis-cli -h redis ping
# --- Cache based on Conan version and ExternalProjects cmake source
- name: Get Conan version
id: get-conan-version
run: |
echo "::set-output name=conan-version::$(conan --version | tr -d '[:alpha:] ')"
shell: bash
- name: Hash ExternalProjects
id: hash-external
run: |
echo "::set-output name=hash-external::$(sha256sum cmake/ExternalProjects.cmake | cut '-d ' -f 1)"
shell: bash
- uses: actions/cache@v2
with:
path: '~/.conan'
key: ${{ runner.os }}-${{ steps.get-conan-version.outputs.conan-version }}-${{ steps.hash-external.outputs.hash-external }}
restore-keys: |
${{ runner.os }}-${{ steps.get-conan-version.outputs.conan-version }}-
${{ runner.os }}-
# --- Build dependencies
- name: "Build dependencies to be shared by all sanitiser runs"
run: inv dev.cmake -b Debug

tests:
if: github.event.pull_request.draft == false
needs: [conan-cache]
runs-on: ubuntu-latest
env:
HOST_TYPE: ci
Expand Down Expand Up @@ -151,7 +104,6 @@ jobs:

examples:
if: github.event.pull_request.draft == false
needs: [conan-cache]
runs-on: ubuntu-latest
env:
HOST_TYPE: ci
Expand Down Expand Up @@ -185,8 +137,9 @@ jobs:
- uses: actions/cache@v2
with:
path: '~/.conan'
key: ${{ runner.os }}-${{ steps.get-conan-version.outputs.conan-version }}-${{ steps.hash-external.outputs.hash-external }}
key: ${{ runner.os }}-${{ steps.get-conan-version.outputs.conan-version }}-${{ steps.hash-external.outputs.hash-external }}-release
restore-keys: |
${{ runner.os }}-${{ steps.get-conan-version.outputs.conan-version }}-${{ steps.hash-external.outputs.hash-external }}
${{ runner.os }}-${{ steps.get-conan-version.outputs.conan-version }}-
${{ runner.os }}-
# --- Examples ---
Expand Down

0 comments on commit d86a12d

Please sign in to comment.