CI: compile against Ubuntu's Lua library
We need to enable the `hardcoded-reg-keys` flag, as the Lua version on
Ubuntu does not export the necessary CPP definitions.
@@ -44,6 +44,10 @@ matrix:
- env: LUAVER=5.3.5
ghc: 8.8.4
cabal: 3.2
+ addons:
+ apt:
+ packages:
+ - liblua5.3-dev
# mark build as successful as soon as all required successes are in.
fast_finish: true
@@ -64,24 +68,12 @@ script:
- |
case "$LUAVER" in
(lua-5*):
- # Install Lua
- wget http://www.lua.org/ftp/${LUAVER}.tar.gz
- tar -xf ${LUAVER}.tar.gz
- cd ${LUAVER}
- sed -i 's/^CFLAGS= -O2 -Wall/CFLAGS= -O2 -Wall -fPIC/' src/Makefile
- make linux
- make install INSTALL_TOP=${HOME}/usr
- cd ..
-
# Compile and link using system-wide Lua
- printf "constraint: hslua +system-lua\n" > cabal.project.local
- printf "extra-include-dirs: ${HOME}/usr/include\n" >> cabal.project.local
- printf "extra-lib-dirs: ${HOME}/usr/lib\n" >> cabal.project.local
+ printf "constraint: hslua +hardcoded-reg-keys +system-lua\n" > cabal.project.local
;;
(*):
cabal new-configure --enable-tests --disable-optimization
esac
- - export LD_LIBRARY_PATH=${HOME}/usr/lib:$LD_LIBRARY_PATH
- echo $CABAL_CONFIG_ARGS
- cabal new-build
- cabal new-test
