Skip to content
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
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ matrix:
rust: "1.31.1"
env: TARGET=rust VARIETY=1.31.1
# ========================================================================
- os: linux
language: python
env: TARGET=lua VARIETY=5.1
- os: linux
language: python
env: TARGET=lua VARIETY=5.2
- os: linux
language: python
env: TARGET=lua VARIETY=5.3
Expand Down
14 changes: 12 additions & 2 deletions prepare-lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,29 @@

. ./config

if [ -z "${VARIETY}" ]; then
VARIETY="5.1"
fi

git clone https://github.com/kaitai-io/kaitai_struct_lua_runtime "$LUA_RUNTIME_DIR"

# Preinstall hererocks, lua installer
pip install hererocks

# Install lua
hererocks lua_install -r^ -l5.3
hererocks lua_install -r^ -l${VARIETY}
export PATH=$PATH:$PWD/lua_install/bin

# Check available versions
lua -v
luarocks -v
luarocks --version
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously -v produced the same as --help would


# Install Lua prerequisites
luarocks install luaunit
luarocks install luafilesystem

# Install luabitop only for Lua 5.1 target
# 5.2 and 5.3 targets have bitwise operation modules built-in (bit/bit32)
if [ "${VARIETY}" = "5.1" ]; then
luarocks install luabitop
fi