-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (28 loc) · 1.12 KB
/
buildAndTest-MacOS.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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"