This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
name: PR Prerequisites
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
bundles_without_error:
|
||||
runs-on: ubuntu-latest
|
||||
name: Bundles Without Errors
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Lua
|
||||
uses: leafo/setup-lua@v1
|
||||
with:
|
||||
lua-version: '5.1'
|
||||
|
||||
- name: Compile Spearhead
|
||||
uses: https://git.dutchie031.com/dutchie031/DcsMissionScriptingTools/github-action@action/v0
|
||||
with:
|
||||
source-root: ./src
|
||||
output-file: ./output/spearhead.lua
|
||||
|
||||
- name: Verify Compiled Lua Syntax
|
||||
run: lua -e "assert(loadfile('./output/spearhead.lua'))"
|
||||
|
||||
- name: Set up Luarocks
|
||||
uses: leafo/gh-actions-luarocks@v4
|
||||
|
||||
- name: Install luacheck
|
||||
run: luarocks install luacheck
|
||||
|
||||
- name: Lint Compiled Output
|
||||
run: luacheck ./output/spearhead.lua
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
std = "lua51"
|
||||
|
||||
max_line_length = false
|
||||
|
||||
-- Compiled bundle is a single file; each source file's locals live inside
|
||||
-- their own `do ... end` block, so cross-file shadowing isn't a real risk.
|
||||
unused_args = false
|
||||
|
||||
-- Cross-file globals set by Spearhead itself (no `require`/module system in the bundle)
|
||||
globals = {
|
||||
"SpearheadConfig",
|
||||
"GlobalCapCallBacks",
|
||||
"SpearheadAPI",
|
||||
}
|
||||
|
||||
-- DCS Mission Scripting Environment API
|
||||
read_globals = {
|
||||
"env", "timer", "trigger", "world", "coalition", "country",
|
||||
"AI", "Group", "Unit", "StaticObject", "SceneryObject",
|
||||
"Airbase", "Weapon", "land", "atmosphere", "missionCommands",
|
||||
"net",
|
||||
}
|
||||
Reference in New Issue
Block a user