Skip to content

Commit

Permalink
CI: Switch to Meson build
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbird committed Dec 8, 2023
1 parent 961688b commit c704689
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
23 changes: 20 additions & 3 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,24 @@ if [ "x${CI}" = "xtrue" ] ; then
fi

if [ -z "${DIR_INSTALLED_FDPP}" ] ; then
echo env var "DIR_INSTALLED_FDPP" is empty or missing
exit 1
echo env var "DIR_INSTALLED_FDPP" is empty or missing
exit 1
fi

INST=$(pwd)/${DIR_INSTALLED_FDPP}

if false ; then
# Old Makefile based build
make clean all PREFIX=${INST}
else
# Ubuntu 22.04 has too old a Meson, so pip install it
sudo apt install ninja-build pipx
pipx install meson
export PATH=${HOME}/.local/bin:${PATH}

mkdir build
cd build || (echo "Could not switch into build dir" && exit 1)
PREFIX=${INST} ../configure.meson
meson compile --verbose
# meson install
fi
make clean all PREFIX=`pwd`/${DIR_INSTALLED_FDPP}
6 changes: 5 additions & 1 deletion ci_setup_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ DIR_ROOT="$(pwd)"
git clone --depth 1 --no-single-branch https://github.com/dosemu2/dosemu2.git ${DIR_TEST_DOSEMU}

# Install fdpp into local directory
make install PREFIX="${DIR_ROOT}/${DIR_INSTALLED_FDPP}"
if false ; then
make install PREFIX="${DIR_ROOT}/${DIR_INSTALLED_FDPP}"
else
meson install -C ${DIR_ROOT}/build
fi

(
cd ${DIR_TEST_DOSEMU} || exit 2
Expand Down
12 changes: 11 additions & 1 deletion configure.meson
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/sh

set -xv

if [ -f meson.build ]; then
echo -e "Create a build dir first:"
echo -e "\tmkdir build"
Expand All @@ -8,7 +12,13 @@ if [ -f meson.build ]; then
fi

TOP=$(dirname "$0")
meson setup --native-file $TOP/fdpp/toolchain.ini \

if [ -z "${PREFIX}" ] ; then
PREFIX="/usr/local"
fi

meson setup --prefix ${PREFIX} \
--native-file $TOP/fdpp/toolchain.ini \
--cross-file $TOP/fdpp/toolchain.ini \
--cross-file $TOP/fdpp/kernel/toolchain.ini \
--native-file $TOP/fdpp/kernel/toolchain.ini . $TOP
Expand Down

0 comments on commit c704689

Please sign in to comment.