Add FreeBSD CI #217
Workflow file for this run
This file contains hidden or 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: | |
| branches: | |
| - "main" | |
| pull_request: | |
| jobs: | |
| RunTestsOnMac: | |
| name: "MacOS (Latest)" | |
| runs-on: "macos-latest" | |
| strategy: | |
| matrix: | |
| lua: ["lua", "luajit"] | |
| compiler: ["gcc", "clang"] | |
| steps: | |
| - uses: "actions/checkout@v6" | |
| - 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: | | |
| if [[ "${{ matrix.compiler }}" = "gcc" ]]; then | |
| export CXX_COMPILER="$(brew --prefix)/bin/g++-13" | |
| export C_COMPILER="$(brew --prefix)/bin/gcc-13" | |
| else | |
| export CXX_COMPILER="$(which clang++)" | |
| export C_COMPILER="$(which clang)" | |
| fi | |
| CXX="$CXX_COMPILER" CC="$C_COMPILER" luarocks make | |
| - name: "Test Project" | |
| run: "lua tests/tests.lua" |