Skip to content

Fix workflow file

Fix workflow file #180

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"