Skip to content

Commit

Permalink
add the export path and cache
Browse files Browse the repository at this point in the history
  • Loading branch information
hchchiu committed Oct 3, 2024
1 parent ba9c6f5 commit bc2b7ec
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,32 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Cache CMake dependency source code
uses: actions/cache@v3
env:
cache-name: cache-cmake-engine-sources
with:
# CMake cache is at ${{github.workspace}}/build/_deps but we only will cache folders ending in '-src' to cache source code
path: ${{github.workspace}}/build/engines/src/engine-*
# Cache hash is dependent on CMakeLists files anywhere as these can change what's in the cache, as well as cmake modules files
# key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./CMakeLists.txt') }}
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./CMakeLists.txt') }}
# it's acceptable to reuse caches for different CMakeLists content if exact match is not available and unlike build caches, we
# don't need to restrict these by OS or compiler as it's only source code that's being cached
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Install Dependencies
shell: bash
run: brew tap Homebrew/bundle && brew bundle

- name: Export the brew path
shell: bash
run: export PATH="$(brew --prefix)/bin:$PATH"

- name: Install GV
run: make

- name: Run tests
run: make test

# - name: Cache CMake dependency source code
# uses: actions/cache@v3
# env:
# cache-name: cache-cmake-engine-sources
# with:
# # CMake cache is at ${{github.workspace}}/build/_deps but we only will cache folders ending in '-src' to cache source code
# path: ${{github.workspace}}/build/engines/src/engine-*
# # Cache hash is dependent on CMakeLists files anywhere as these can change what's in the cache, as well as cmake modules files
# # key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./CMakeLists.txt') }}
# key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./CMakeLists.txt') }}
# # it's acceptable to reuse caches for different CMakeLists content if exact match is not available and unlike build caches, we
# # don't need to restrict these by OS or compiler as it's only source code that's being cached
# restore-keys: |
# ${{ runner.os }}-${{ env.cache-name }}-

0 comments on commit bc2b7ec

Please sign in to comment.