Skip to content

Commit

Permalink
reuse matrix update cache
Browse files Browse the repository at this point in the history
  • Loading branch information
greole committed Sep 30, 2023
1 parent 1534c82 commit 547d958
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,22 @@ env:
MPI_BUFFER_SIZE: 20000000

jobs:
setup_integration_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
echo "::set-output name=matrix::[\"cavity\", \"channel\"]"
setup:
runs-on: ubuntu-latest
container: greole/ofbase
strategy:
fail-fast: false
matrix:
Case: ["cavity", "channel"]
matrix:
- Case: ${{fromJson(needs.setup_integration_matrix.outputs.matrix)}}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -75,7 +84,7 @@ jobs:
- name: Cache Workspace
uses: actions/cache@v3
with:
key: ws-${{ github.run_id }}-${{ github.run_attempt }}
key: ws-${{ hashFiles(/__w/OGL/OGL/test/${{matrix.Case}}.yaml) }}
path: /home/runner/work/_temp/_github_home/${{matrix.Case}}

- name: Generate test cases
Expand All @@ -96,8 +105,8 @@ jobs:
needs: setup
strategy:
fail-fast: false
matrix:
Case: ["cavity", "channel"]
matrix:
- Case: ${{fromJson(needs.setup_integration_matrix.outputs.matrix)}}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -132,7 +141,7 @@ jobs:
- name: Cache Workspace
uses: actions/cache@v3
with:
key: ws-${{ github.run_id }}-${{ github.run_attempt }}
key: ws-${{ hashFiles(/__w/OGL/OGL/test/${{matrix.Case}}.yaml) }}
path: /home/runner/work/_temp/_github_home/${{matrix.Case}}

- name: Copy OGL from cached folder
Expand All @@ -150,22 +159,28 @@ jobs:
export OBR_RUN_CMD="mpirun --bind-to core --map-by core -np {np} {solver} -parallel -case {path}/case > {path}/case/{solver}_{timestamp}.log 2>&1"
obr run -o runParallelSolver
- name: Update workspace cache
uses: actions/cache@v3
run: |
STATE_CACHE_KEY="ws"
echo "STATE_CACHE_KEY=${STATE_CACHE_KEY}" >> $GITHUB_ENV
validate:
runs-on: ubuntu-latest
container: greole/ofbase
needs: run
strategy:
fail-fast: false
matrix:
Case: ["cavity", "channel"]
matrix:
- Case: ${{fromJson(needs.setup_integration_matrix.outputs.matrix)}}

steps:
- uses: actions/checkout@v4

- name: Cache Workspace
uses: actions/cache@v3
with:
key: ws-${{ github.run_id }}-${{ github.run_attempt }}
key: ws-${{ hashFiles(/__w/OGL/OGL/test/${{matrix.Case}}.yaml) }}
path: /home/runner/work/_temp/_github_home/${{matrix.Case}}

- name: Get Ginkgo checkout version
Expand Down

0 comments on commit 547d958

Please sign in to comment.