From 9819aa5f550fe933b9628d4e4fe755a02d34f41a Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:21:57 -0500 Subject: [PATCH 1/3] Update sol2 to 3.5.0 (Fixes #15 - compilation error on FreeBSD) --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed4573d..dd51fd6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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( @@ -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() From 8d73881e13a5caecabe3ea909ad9150385c15bbd Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Wed, 10 Dec 2025 17:50:13 -0500 Subject: [PATCH 2/3] Update luarocks in CI script --- scripts/buildLuaRocks.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/buildLuaRocks.sh b/scripts/buildLuaRocks.sh index 57014c8..70d4573 100755 --- a/scripts/buildLuaRocks.sh +++ b/scripts/buildLuaRocks.sh @@ -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 \ No newline at end of file + mkdir ~/.luarocks From 23635490f6cab8105cfce052c1d39707143d4d7b Mon Sep 17 00:00:00 2001 From: LebJe <51171427+LebJe@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:19:46 -0500 Subject: [PATCH 3/3] * Update luarocks in Windows CI * Update actions/checkout * Only run workflows once in PRs --- .github/workflows/buildAndTest-Linux.yml | 8 ++++++-- .github/workflows/buildAndTest-MacOS.yml | 17 +++++++++++++---- .github/workflows/buildAndTest-Windows.yml | 14 +++++++++----- scripts/installLuaRocks.ps1 | 8 ++++---- 4 files changed, 32 insertions(+), 15 deletions(-) diff --git a/.github/workflows/buildAndTest-Linux.yml b/.github/workflows/buildAndTest-Linux.yml index 4ea031e..9b04899 100644 --- a/.github/workflows/buildAndTest-Linux.yml +++ b/.github/workflows/buildAndTest-Linux.yml @@ -1,5 +1,9 @@ name: "Build and Test on Ubuntu" -on: ["push", "pull_request"] +on: + push: + branches: + - "main" + pull_request: jobs: RunTestsOnLinux: @@ -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 }} diff --git a/.github/workflows/buildAndTest-MacOS.yml b/.github/workflows/buildAndTest-MacOS.yml index 79bbfab..67d4a24 100644 --- a/.github/workflows/buildAndTest-MacOS.yml +++ b/.github/workflows/buildAndTest-MacOS.yml @@ -1,5 +1,9 @@ name: "Build and Test on MacOS" -on: ["push", "pull_request"] +on: + push: + branches: + - "main" + pull_request: jobs: RunTestsOnMac: @@ -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 @@ -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" diff --git a/.github/workflows/buildAndTest-Windows.yml b/.github/workflows/buildAndTest-Windows.yml index b9af0bd..6f62275 100644 --- a/.github/workflows/buildAndTest-Windows.yml +++ b/.github/workflows/buildAndTest-Windows.yml @@ -1,5 +1,9 @@ name: "Build and Test on Windows" -on: ["push", "pull_request"] +on: + push: + branches: + - "main" + pull_request: jobs: RunTestsOnWindows: @@ -9,7 +13,7 @@ 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" @@ -17,15 +21,15 @@ jobs: - 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: | diff --git a/scripts/installLuaRocks.ps1 b/scripts/installLuaRocks.ps1 index b5e74f8..fe212ea 100644 --- a/scripts/installLuaRocks.ps1 +++ b/scripts/installLuaRocks.ps1 @@ -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" \ No newline at end of file +Remove-Item -Recurse -Force "luarocks-3.12.2-windows-32" \ No newline at end of file