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

Add workflow and info about CPM #2

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
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
41 changes: 41 additions & 0 deletions .github/workflows/update-lua.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update Lua Submodule

on:
workflow_dispatch:
schedule:
- cron: "*/5 * * * *"

permissions:
contents: write

concurrency:
group: update-modules-${{ github.ref }}
cancel-in-progress: true

jobs:
update-modules:
name: Update Modules
runs-on: ubuntu-latest

# https://stackoverflow.com/questions/64407333/using-github-actions-to-automatically-update-the-repos-submodules
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Pull and Update Submodules
run: |
git pull --recurse-submodules
git submodule update --remote --recursive

- name: Commit Update
run: |
git config --global user.name 'Lua Submodule Updater'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "Update Lua" && git push || echo "No changes to commit"
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ on `cmake`'s
[`BUILD_SHARED_LIBS`](https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html) flag. No
`install` target is configured and no standalone executable is built, given the intended use case.

Here's how to use it:
# How to use it:
## CPM
In the `CMakeLists.txt` of your application, add
```
CPMAddPackage("gh:lubgr/lua-cmake#master")

target_link_libraries(yourTarget PRIVATE lua::lib)
```
## Git Submodules
```bash
cd path/to/your/project

Expand All @@ -36,5 +44,6 @@ add_subdirectory(external/lua)

target_link_libraries(yourTarget PRIVATE lua::lib)
```
------------------------------------------------------------------------
That's it. Further integration with a library to facilitate the bindings (e.g.
[sol2](https://github.com/ThePhD/sol2)) is straightfoward.
2 changes: 1 addition & 1 deletion upstream
Submodule upstream updated 97 files
+3 −0 .gitignore
+1 −1 README.md
+1 −1 all
+311 −268 lapi.c
+36 −18 lapi.h
+259 −120 lauxlib.c
+15 −27 lauxlib.h
+70 −39 lbaselib.c
+275 −185 lcode.c
+5 −6 lcode.h
+13 −9 lcorolib.c
+26 −26 ldblib.c
+303 −192 ldebug.c
+13 −1 ldebug.h
+600 −309 ldo.c
+29 −12 ldo.h
+98 −33 ldump.c
+119 −108 lfunc.c
+11 −15 lfunc.h
+477 −404 lgc.c
+115 −36 lgc.h
+24 −26 linit.c
+55 −40 liolib.c
+55 −36 llex.c
+1 −1 llex.h
+95 −147 llimits.h
+52 −51 lmathlib.c
+57 −44 lmem.c
+6 −4 lmem.h
+35 −51 loadlib.c
+225 −101 lobject.c
+108 −51 lobject.h
+38 −4 lopcodes.c
+83 −46 lopcodes.h
+25 −24 loslib.c
+245 −262 lparser.c
+12 −8 lparser.h
+129 −161 lstate.c
+143 −98 lstate.h
+107 −33 lstring.c
+23 −8 lstring.h
+282 −206 lstrlib.c
+789 −388 ltable.c
+136 −14 ltable.h
+49 −51 ltablib.c
+380 −173 ltests.c
+32 −9 ltests.h
+42 −36 ltm.c
+9 −8 ltm.h
+197 −76 lua.c
+71 −34 lua.h
+120 −75 luaconf.h
+26 −19 lualib.h
+153 −73 lundump.c
+6 −3 lundump.h
+59 −57 lutf8lib.c
+427 −321 lvm.c
+29 −27 lvm.h
+29 −8 lzio.c
+2 −1 lzio.h
+58 −48 makefile
+2 −2 manual/2html
+795 −556 manual/manual.of
+17 −3 onelua.c
+9 −19 testes/all.lua
+237 −84 testes/api.lua
+24 −12 testes/attrib.lua
+1 −1 testes/big.lua
+17 −0 testes/bitwise.lua
+103 −23 testes/calls.lua
+21 −14 testes/closure.lua
+68 −27 testes/code.lua
+45 −16 testes/constructs.lua
+216 −60 testes/coroutine.lua
+124 −103 testes/cstack.lua
+94 −17 testes/db.lua
+186 −53 testes/errors.lua
+12 −0 testes/events.lua
+22 −8 testes/files.lua
+74 −75 testes/gc.lua
+27 −17 testes/gengc.lua
+25 −10 testes/goto.lua
+6 −6 testes/libs/makefile
+41 −16 testes/literals.lua
+533 −94 testes/locals.lua
+129 −22 testes/main.lua
+107 −6 testes/math.lua
+252 −46 testes/nextvar.lua
+1 −0 testes/packtests
+53 −34 testes/pm.lua
+46 −15 testes/sort.lua
+68 −18 testes/strings.lua
+11 −10 testes/tpack.lua
+40 −0 testes/tracegc.lua
+41 −13 testes/utf8.lua
+9 −9 testes/vararg.lua
+6 −6 testes/verybig.lua