Add FreeBSD CI #15
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 FreeBSD" | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| jobs: | |
| RunTestsOnFreeBSD: | |
| name: "FreeBSD 15" | |
| runs-on: "ubuntu-latest" | |
| strategy: | |
| matrix: | |
| compiler: ["gcc", "clang"] | |
| lua: ["luajit", "lua54", "lua53", "lua52", "lua51"] | |
| steps: | |
| - uses: "actions/checkout@v6" | |
| - name: "Setup FreeBSD VM" | |
| uses: vmactions/[email protected] | |
| id: vm | |
| with: | |
| #usesh: true | |
| prepare: | | |
| pkg update | |
| pkg install -y sudo bash | |
| - name: "Add Dependencies" | |
| shell: freebsd {0} | |
| run: | | |
| bash -xc ' | |
| cd $GITHUB_WORKSPACE | |
| export COMPILER=${{ matrix.compiler }} | |
| source ./scripts/compilerName.sh | |
| sudo pkg install -y cmake ${{ matrix.lua }} "$C_COMPILER_PACKAGE" "$CXX_COMPILER_PACKAGE" | |
| bash -x scripts/buildLuaRocks.sh | |
| sudo luarocks | |
| sudo luarocks install luaunit | |
| ' | |
| - name: "Build Project" | |
| shell: freebsd {0} | |
| run: | | |
| bash -xc ' | |
| cd $GITHUB_WORKSPACE | |
| export COMPILER=${{ matrix.compiler }} | |
| source scripts/compilerName.sh | |
| sudo luarocks config "variables.CMAKE_CXX_COMPILER" "$CXX_COMPILER" | |
| sudo luarocks config "variables.CMAKE_C_COMPILER" "$C_COMPILER" | |
| sudo CXX="$CXX_COMPILER" CC="$C_COMPILER" luarocks make | |
| ' | |
| - name: "Test Project" | |
| shell: freebsd {0} | |
| run: | | |
| bash -xc ' | |
| cd $GITHUB_WORKSPACE | |
| ${{ matrix.lua }} tests/tests.lua | |
| ' |