Skip to content

Commit

Permalink
Cache Ginkgo build
Browse files Browse the repository at this point in the history
  • Loading branch information
greole committed Jun 12, 2023
1 parent 50142e0 commit 0d14838
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/build-foam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ jobs:
key: ${{ matrix.OF.path }}
path: /home/runner/work/_temp/_github_home

- name: Get Ginkgo checkout version
shell: bash
run: |
grep -A1 "set(GINKGO_CHECKOUT_VERSION" CMakeLists.txt|tail -n1|grep -o "[0-9a-z]*" > GINKGO_CHECKOUT_VERSION
export GINKGO_CHECKOUT_VERSION=$(cat GINKGO_CHECKOUT_VERSION)
echo "GINKGO_CHECKOUT_VERSON=$GINKGO_CHECKOUT_VERSION" >> $GITHUB_ENV
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
Expand All @@ -79,6 +88,7 @@ jobs:
mkdir -p $FOAM_USER_LIBBIN
mkdir build
cd build
[ -f "/github/home/$GINKGO_CHECKOUT_VERSION" ] && cp -r /github/home/$GINKGO_CHECKOUT_VERSION third_party
cmake -G Ninja -DOGL_DATA_VALIDATION=On -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
- name: Build OGL
Expand All @@ -99,7 +109,9 @@ jobs:
- name: Copy OGL to cached folder
working-directory: ${{github.workspace}}
run: |
cp -r $FOAM_USER_LIBBIN /github/home
cp -r build/third_party /github/home/$GINKGO_CHECKOUT_VERSION
cp -r $FOAM_USER_LIBBIN /github/home/libbin
ls /github/home
- name: Archive production artifacts
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
working-directory: ${{github.workspace}}
run: |
mkdir -p $FOAM_USER_LIBBIN
cp -r /github/home/lib/* $FOAM_USER_LIBBIN
cp -r /github/home/libbin/lib/* $FOAM_USER_LIBBIN
- name: Install OBR
working-directory: /tmp
Expand Down

0 comments on commit 0d14838

Please sign in to comment.