Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/buildAndTest-Linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "Build and Test on Ubuntu"
on: ["push", "pull_request"]
on:
push:
branches:
- "main"
pull_request:

jobs:
RunTestsOnLinux:
Expand All @@ -17,7 +21,7 @@ jobs:
"liblua5.1-0-dev lua5.1",
]
steps:
- uses: "actions/checkout@v4"
- uses: "actions/checkout@v6"
- name: "Add Dependencies"
run: |
export COMPILER=${{ matrix.compiler }}
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/buildAndTest-MacOS.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "Build and Test on MacOS"
on: ["push", "pull_request"]
on:
push:
branches:
- "main"
pull_request:

jobs:
RunTestsOnMac:
Expand All @@ -10,7 +14,7 @@ jobs:
lua: ["lua", "luajit"]
compiler: ["gcc", "clang"]
steps:
- uses: "actions/checkout@v4"
- uses: "actions/checkout@v6"
- name: "Install Dependencies"
run: |
brew install ${{ matrix.lua }} luarocks
Expand All @@ -24,8 +28,13 @@ jobs:
luarocks install luaunit
- name: "Build Project"
run: |
export CXX_COMPILER="$(brew --prefix)/bin/g++-13"
export C_COMPILER="$(brew --prefix)/bin/gcc-13"
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"
14 changes: 9 additions & 5 deletions .github/workflows/buildAndTest-Windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "Build and Test on Windows"
on: ["push", "pull_request"]
on:
push:
branches:
- "main"
pull_request:

jobs:
RunTestsOnWindows:
Expand All @@ -9,23 +13,23 @@ jobs:
matrix:
compiler: ["LLVM", "MinGW", "MSVC"]
steps:
- uses: "actions/checkout@v4"
- uses: "actions/checkout@v6"
- name: "Install Dependencies"
run: "choco install -y cmake ninja"
- name: "Build LuaJIT"
run: "powershell scripts/buildLuaJIT.ps1"
- name: "Install LuaRocks"
run: "powershell scripts/installLuaRocks.ps1; mkdir LuaRocks/tree"
- name: "Set up LLVM"
if: "${{ matrix.compiler == 'LLVM' }}"
if: ${{ matrix.compiler == 'LLVM' }}
uses: "egor-tensin/setup-clang@v1"
- name: "Set up MinGW"
if: "${{ matrix.compiler == 'MinGW' }}"
if: ${{ matrix.compiler == 'MinGW' }}
uses: "e-t-l/setup-mingw@patch-1"
with:
platform: "x64"
- name: "Set up MSVC"
if: "${{ matrix.compiler == 'MSVC' }}"
if: ${{ matrix.compiler == 'MSVC' }}
uses: "compnerd/gha-setup-vsdevenv@main"
- name: "Configure Project"
run: |
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ FetchContent_Declare(
GIT_REPOSITORY "https://github.com/ThePhD/sol2.git"
GIT_SHALLOW ON
GIT_SUBMODULES ""
GIT_TAG "v3.3.0"
GIT_TAG "v3.5.0"
)

FetchContent_Declare(
Expand All @@ -69,6 +69,8 @@ endif()
FetchContent_GetProperties(${SOL2})
if(NOT ${SOL2}_POPULATED)
message(STATUS "Cloning ${SOL2}")
option(SOL2_ENABLE_INSTALL "Enable installation of Sol2" ON)
set(SOL2_ENABLE_INSTALL OFF)
FetchContent_MakeAvailable(${SOL2})
endif()

Expand Down
12 changes: 6 additions & 6 deletions scripts/buildLuaRocks.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/bin/bash

sudo apt install build-essential libreadline-dev unzip wget
wget https://luarocks.org/releases/luarocks-3.11.0.tar.gz
tar -zxpf luarocks-3.11.0.tar.gz
rm luarocks-3.11.0.tar.gz
cd luarocks-3.11.0
sudo apt install build-essential libreadline-dev unzip wget make -yq
wget "https://luarocks.org/releases/luarocks-3.12.2.tar.gz"
tar -zxpf luarocks-3.12.2.tar.gz
rm luarocks-3.12.2.tar.gz
cd luarocks-3.12.2
./configure
make
sudo make install
mkdir ~/.luarocks
mkdir ~/.luarocks
8 changes: 4 additions & 4 deletions scripts/installLuaRocks.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ if (-not (Test-Path -Path $installDir)) {

$installDir = Resolve-Path $installDir

Invoke-WebRequest -Uri "http://luarocks.github.io/luarocks/releases/luarocks-3.11.0-windows-32.zip" -OutFile "luarocks.zip"
Invoke-WebRequest -Uri "http://luarocks.github.io/luarocks/releases/luarocks-3.12.2-windows-32.zip" -OutFile "luarocks.zip"
Expand-Archive -Path "luarocks.zip" -DestinationPath "."
Move-Item -Path "luarocks-3.11.0-windows-32\luarocks.exe" -Destination "$($installDir)"
Move-Item -Path "luarocks-3.11.0-windows-32\luarocks-admin.exe" -Destination "$($installDir)"
Move-Item -Path "luarocks-3.12.2-windows-32\luarocks.exe" -Destination "$($installDir)"
Move-Item -Path "luarocks-3.12.2-windows-32\luarocks-admin.exe" -Destination "$($installDir)"

Remove-Item "luarocks.zip"
Remove-Item -Recurse -Force "luarocks-3.11.0-windows-32"
Remove-Item -Recurse -Force "luarocks-3.12.2-windows-32"
Loading