Test with GCC on MacOS #176
Workflow file for this run
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 Ubuntu" | |
on: ["push", "pull_request"] | |
jobs: | |
RunTestsOnLinux: | |
name: "Ubuntu (Latest)" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
compiler: ["gcc", "clang"] | |
lua: | |
[ | |
"luajit libluajit-5.1-dev libluajit-5.1-2", | |
"liblua5.3-dev lua5.3", | |
"liblua5.2-dev lua5.2", | |
"liblua5.1-0-dev lua5.1", | |
] | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: "Add Dependencies" | |
run: | | |
export COMPILER=${{ matrix.compiler }} | |
source scripts/compilerName.sh | |
sudo apt update | |
sudo apt install -yq ${{ matrix.lua }} "$C_COMPILER_PACKAGE" "$CXX_COMPILER_PACKAGE" | |
./scripts/buildLuaRocks.sh | |
sudo luarocks install luaunit | |
- name: "Build Project" | |
run: | | |
export COMPILER=${{ matrix.compiler }} | |
source scripts/compilerName.sh | |
luarocks config "variables.CMAKE_C_COMPILER" "$C_COMPILER" | |
luarocks config "variables.CMAKE_CXX_COMPILER" "$CXX_COMPILER" | |
sudo CXX="$CXX_COMPILER" CC="$C_COMPILER" luarocks make | |
- name: "Test Project" | |
run: | | |
if ! command -v lua &> /dev/null | |
then | |
luajit tests/tests.lua | |
exit | |
else | |
lua tests/tests.lua | |
fi |