From a59747ce4e0379fb696d882aac2869e2c5b026a1 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 11 Mar 2024 13:18:44 -0300 Subject: ci: add binary build smoke test --- .github/workflows/test.yml | 16 ++++++++++++++++ smoke_test.sh | 39 +++++++++++++++++++++------------------ 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 07803faf..7b722abe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,3 +82,19 @@ jobs: ./makedist dev ./smoke_test.sh luarocks-dev.tar.gz + ############################################################################## + BinaryBuild: + runs-on: "ubuntu-latest" + steps: + - uses: actions/checkout@master + + - uses: leafo/gh-actions-lua@v8.0.0 + with: + luaVersion: "5.4" + + - name: Binary Build Smoke Test + run: | + ./configure + ./makedist dev + ./smoke_test.sh luarocks-dev.tar.gz binary + diff --git a/smoke_test.sh b/smoke_test.sh index bb1a5984..86b85c51 100755 --- a/smoke_test.sh +++ b/smoke_test.sh @@ -7,12 +7,31 @@ mkdir smoketestdir cp "$tarball" smoketestdir cd smoketestdir +tar zxvpf "$(basename "$tarball")" +cd "$(basename "$tarball" .tar.gz)" + +if [ "$2" = "binary" ] +then + ./configure --prefix=foobar + make binary + make install-binary + cd foobar + bin/luarocks + bin/luarocks install inspect + bin/luarocks show inspect + ( + eval $(bin/luarocks path) + lua -e 'print(assert(require("inspect")(_G)))' + ) + cd .. + rm -rf foobar + exit 0 +fi + ################################################################################ # test installation with make install ################################################################################ -tar zxvpf "$(basename "$tarball")" -cd "$(basename "$tarball" .tar.gz)" ./configure --prefix=foobar make make install @@ -80,22 +99,6 @@ rm -rf foorock2 ################################################################################ -if [ "$2" = "binary" ] -then - make binary - make install-binary - cd foobar - bin/luarocks - bin/luarocks install inspect - bin/luarocks show inspect - ( - eval $(bin/luarocks path) - lua -e 'print(assert(require("inspect")(_G)))' - ) - cd .. - rm -rf foobar -fi - if [ "$3" = "windows" ] then make windows-binary -- cgit v1.2.3-55-g6feb