0.4.1 #188
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 and Test on MacOS" | |
on: ["push", "pull_request"] | |
jobs: | |
RunTestsOnMac: | |
name: "MacOS (Latest)" | |
runs-on: "macos-latest" | |
strategy: | |
matrix: | |
lua: ["lua", "luajit"] | |
compiler: ["gcc", "clang"] | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: "Install Dependencies" | |
run: | | |
brew install ${{ matrix.lua }} luarocks | |
if [[ "${{ matrix.compiler }}" = "gcc" ]]; then | |
brew install gcc | |
luarocks config "variables.CMAKE_C_COMPILER" "$(brew --prefix)/bin/gcc-13" | |
luarocks config "variables.CMAKE_CXX_COMPILER" "$(brew --prefix)/bin/g++-13" | |
fi | |
luarocks install luaunit | |
- name: "Build Project" | |
run: | | |
export CXX_COMPILER="$(brew --prefix)/bin/g++-13" | |
export C_COMPILER="$(brew --prefix)/bin/gcc-13" | |
CXX="$CXX_COMPILER" CC="$C_COMPILER" luarocks make | |
- name: "Test Project" | |
run: "lua tests/tests.lua" |