Feat/test design #57
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build(MacOS) | |
on: | |
push: | |
branches: ["main", "develop"] | |
pull_request: | |
branches: ["main", "develop"] | |
jobs: | |
build: | |
runs-on: macos-latest | |
env: | |
ACTIONS_CACHE_DEBUG: true # Enable cache debug mode | |
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 | |
run: brew tap Homebrew/bundle && brew bundle | |
- name: Export the brew path | |
run: | | |
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
- name: Verify the brew path | |
run: which bison && echo $PATH && bison --version && brew --prefix bison | |
- name: Install GV | |
run: make | |
- name: Run tests | |
run: make test | |