Skip to content

Commit

Permalink
build: allow to test RPM / Deb packages locally
Browse files Browse the repository at this point in the history
Provided the script to build a RPM / Deb package, install it inside a
docker container based on an appropriate image and verify that the main
class of the extension (Tarantool) is available from the PHP
interpreter.

The script builds a package just like it is performed in CI: using
packpack. It should be available in PATH directories.

Only RPM packages are here now, but the following commits will enable
Deb packages too.

Part of #117
  • Loading branch information
Totktonada committed Mar 28, 2020
1 parent 91cf4a7 commit c3b2867
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions test.pkg.all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/sh

set -exu # Strict shell (w/o -o pipefail)

distros="
el:8
fedora:25
fedora:26
fedora:27
fedora:28
fedora:29
fedora:30
fedora:31
"

if ! type packpack; then
echo "Unable to find packpack"
exit 1
fi

for distro in $distros; do
export OS="${distro%%:*}"
export DIST="${distro#*:}"
if [ "${OS}" = "el" ]; then
export OS=centos
fi

rm -rf build
packpack

docker run \
--volume "$(realpath .):/tarantool-php" \
--workdir /tarantool-php \
--rm \
"${OS}:${DIST}" \
./test.pkg.sh
done

0 comments on commit c3b2867

Please sign in to comment.