Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make CFunction safe when Lua is compiled as C #154

Merged
merged 29 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7f082c3
Make CFunction safe by avoiding exceptions to "leak" outside
kunitoki Oct 21, 2023
15d7fbe
Fix compilation issue
kunitoki Oct 21, 2023
6c7e454
Forgot about it
kunitoki Oct 21, 2023
27ed8e3
Test when lua is compiled as C
kunitoki Oct 21, 2023
f89950c
Add tests for lua compiled as C
kunitoki Oct 21, 2023
9461ba5
Merge branch 'master' into dev/safe_cfunction_when_lua_c
kunitoki Oct 21, 2023
0113363
More constructor throwing tests
kunitoki Oct 22, 2023
67e573a
Add macro to enable the safe cfunction invocation
kunitoki Oct 22, 2023
174388c
Add macro to enable the safe cfunction invocation
kunitoki Oct 22, 2023
487c5a6
Ravi compiles lua as C
kunitoki Oct 22, 2023
80357d3
Parallelize linux jobs
kunitoki Oct 22, 2023
002fd1b
Split osx actions as well
kunitoki Oct 22, 2023
9a0a45d
Split windows actions as well
kunitoki Oct 22, 2023
b8bf18f
Fix coverage
kunitoki Oct 22, 2023
30808bb
Fix action
kunitoki Oct 22, 2023
c5c31ae
Fix action
kunitoki Oct 22, 2023
402feb6
More tests
kunitoki Oct 22, 2023
cd1fd66
Fix ninja missing
kunitoki Oct 22, 2023
f2a2b04
More coverage tests
kunitoki Oct 22, 2023
2253c07
More tweaks
kunitoki Oct 22, 2023
6f33706
Improve coverage
kunitoki Oct 22, 2023
51e32e6
Improve parallelization
kunitoki Oct 22, 2023
9b3b38e
Improve parallelization
kunitoki Oct 22, 2023
d0fa1eb
Fix issue in CI
kunitoki Oct 22, 2023
6ed0322
Forgot parallelization on ravi osx and windows
kunitoki Oct 22, 2023
f1400cc
Blind fix
kunitoki Oct 22, 2023
82fec1d
Try to recover a working coverage
kunitoki Oct 22, 2023
3cccedd
Finish coverage
kunitoki Oct 22, 2023
ccc61d4
Fix coverage
kunitoki Oct 22, 2023
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
175 changes: 169 additions & 6 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
BUILD_TYPE: Release

jobs:
build:
lua51:
runs-on: ubuntu-latest
steps:

Expand All @@ -27,9 +27,7 @@ jobs:
submodules: true

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get -y install ninja-build
run: sudo apt-get -y install ninja-build

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -38,44 +36,209 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja

- name: Build
- name: Build Lua 5.1
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE
run: |
cmake --build . --config $BUILD_TYPE --parallel 4 --target \
LuaBridgeTests51 \
LuaBridgeTests51LuaC \
LuaBridgeTests51Noexcept \
LuaBridgeTests51LuaCNoexcept

- name: Test Lua 5.1
working-directory: ${{runner.workspace}}/build/Tests
run: |
./LuaBridgeTests51
./LuaBridgeTests51LuaC
./LuaBridgeTests51Noexcept
./LuaBridgeTests51LuaCNoexcept

lua52:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Install Dependencies
run: sudo apt-get -y install ninja-build

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja

- name: Build Lua 5.2
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config $BUILD_TYPE --parallel 4 --target \
LuaBridgeTests52 \
LuaBridgeTests52LuaC \
LuaBridgeTests52Noexcept \
LuaBridgeTests52LuaCNoexcept

- name: Test Lua 5.2
working-directory: ${{runner.workspace}}/build/Tests
run: |
./LuaBridgeTests52
./LuaBridgeTests52LuaC
./LuaBridgeTests52Noexcept
./LuaBridgeTests52LuaCNoexcept

lua53:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Install Dependencies
run: sudo apt-get -y install ninja-build

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja

- name: Build Lua 5.3
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config $BUILD_TYPE --parallel 4 --target \
LuaBridgeTests53 \
LuaBridgeTests53LuaC \
LuaBridgeTests53Noexcept \
LuaBridgeTests53LuaCNoexcept

- name: Test Lua 5.3
working-directory: ${{runner.workspace}}/build/Tests
run: |
./LuaBridgeTests53
./LuaBridgeTests53LuaC
./LuaBridgeTests53Noexcept
./LuaBridgeTests53LuaCNoexcept

lua54:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Install Dependencies
run: sudo apt-get -y install ninja-build

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja

- name: Build Lua 5.4
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config $BUILD_TYPE --parallel 4 --target \
LuaBridgeTests54 \
LuaBridgeTests54LuaC \
LuaBridgeTests54Noexcept \
LuaBridgeTests54LuaCNoexcept

- name: Test Lua 5.4
working-directory: ${{runner.workspace}}/build/Tests
run: |
./LuaBridgeTests54
./LuaBridgeTests54LuaC
./LuaBridgeTests54Noexcept
./LuaBridgeTests54LuaCNoexcept

luajit:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get -y install ninja-build

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja

- name: Build LuaJIT
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config $BUILD_TYPE --parallel 4 --target \
LuaBridgeTestsLuaJIT \
LuaBridgeTestsLuaJITNoexcept

- name: Test LuaJIT
working-directory: ${{runner.workspace}}/build/Tests
run: |
./LuaBridgeTestsLuaJIT
./LuaBridgeTestsLuaJITNoexcept

luau:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Install Dependencies
run: sudo apt-get -y install ninja-build

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja

- name: Build Luau
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE --parallel 4 --target LuaBridgeTestsLuau

- name: Test Luau
working-directory: ${{runner.workspace}}/build/Tests
run: ./LuaBridgeTestsLuau

ravi:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3
with:
submodules: true

- name: Install Dependencies
run: sudo apt-get -y install ninja-build

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja

- name: Build Ravi
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config $BUILD_TYPE --parallel 4 --target LuaBridgeTestsRavi

- name: Test Ravi
working-directory: ${{runner.workspace}}/build/Tests
run: ./LuaBridgeTestsRavi
Loading