Jenkins: Switch build to Ninja on all platforms
This commit is contained in:
69
.ci/build.sh
69
.ci/build.sh
@@ -295,7 +295,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install the latest versions for any missing packages (if the specified version couldn't be installed).
|
# Install the latest versions for any missing packages (if the specified version couldn't be installed).
|
||||||
pkgs="make git"
|
pkgs="make"
|
||||||
while IFS=" " read pkg version
|
while IFS=" " read pkg version
|
||||||
do
|
do
|
||||||
prefixed_pkg="$MINGW_PACKAGE_PREFIX-$pkg"
|
prefixed_pkg="$MINGW_PACKAGE_PREFIX-$pkg"
|
||||||
@@ -328,7 +328,7 @@ else
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# Establish general dependencies.
|
# Establish general dependencies.
|
||||||
pkgs="cmake pkg-config git imagemagick wget p7zip-full wayland-protocols tar gzip file"
|
pkgs="cmake ninja-build pkg-config git imagemagick wget p7zip-full wayland-protocols tar gzip file"
|
||||||
if [ "$(dpkg --print-architecture)" = "$arch_deb" ]
|
if [ "$(dpkg --print-architecture)" = "$arch_deb" ]
|
||||||
then
|
then
|
||||||
pkgs="$pkgs build-essential"
|
pkgs="$pkgs build-essential"
|
||||||
@@ -405,7 +405,7 @@ fi
|
|||||||
echo [-] Cleaning workspace
|
echo [-] Cleaning workspace
|
||||||
if [ -d "build" ]
|
if [ -d "build" ]
|
||||||
then
|
then
|
||||||
MAKEFLAGS=-j$(nproc) cmake --build build --target clean 2> /dev/null
|
cmake --build build -j$(nproc) --target clean 2> /dev/null
|
||||||
rm -rf build
|
rm -rf build
|
||||||
fi
|
fi
|
||||||
find . \( -name Makefile -o -name CMakeCache.txt -o -name CMakeFiles \) -exec rm -rf "{}" \; 2> /dev/null
|
find . \( -name Makefile -o -name CMakeCache.txt -o -name CMakeFiles \) -exec rm -rf "{}" \; 2> /dev/null
|
||||||
@@ -438,7 +438,7 @@ year=$(date +%Y)
|
|||||||
|
|
||||||
# Run CMake.
|
# Run CMake.
|
||||||
echo [-] Running CMake with flags [$cmake_flags $cmake_flags_extra]
|
echo [-] Running CMake with flags [$cmake_flags $cmake_flags_extra]
|
||||||
eval cmake -G \"Unix Makefiles\" -B build $cmake_flags $cmake_flags_extra .
|
eval cmake -G Ninja $cmake_flags $cmake_flags_extra -S . -B build
|
||||||
status=$?
|
status=$?
|
||||||
if [ $status -ne 0 ]
|
if [ $status -ne 0 ]
|
||||||
then
|
then
|
||||||
@@ -447,13 +447,12 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Run actual build.
|
# Run actual build.
|
||||||
make_flags=-j$(nproc)
|
echo [-] Running build
|
||||||
echo [-] Running build with make flags [$make_flags]
|
cmake --build build -j$(nproc)
|
||||||
MAKEFLAGS=$make_flags cmake --build build
|
|
||||||
status=$?
|
status=$?
|
||||||
if [ $status -ne 0 ]
|
if [ $status -ne 0 ]
|
||||||
then
|
then
|
||||||
echo [!] Make failed with status [$status]
|
echo [!] Build failed with status [$status]
|
||||||
exit 4
|
exit 4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -536,15 +535,13 @@ else
|
|||||||
# workaround until a newer version of openal-soft trickles down to Debian repos.
|
# workaround until a newer version of openal-soft trickles down to Debian repos.
|
||||||
if [ -d "openal-soft-1.21.1" ]
|
if [ -d "openal-soft-1.21.1" ]
|
||||||
then
|
then
|
||||||
rm -rf openal-soft-1.21.1/build/*
|
rm -rf openal-soft-1.21.1/build
|
||||||
else
|
else
|
||||||
wget -qO - https://github.com/kcat/openal-soft/archive/refs/tags/1.21.1.tar.gz | tar zxf -
|
wget -qO - https://github.com/kcat/openal-soft/archive/refs/tags/1.21.1.tar.gz | tar zxf -
|
||||||
fi
|
fi
|
||||||
cd openal-soft-1.21.1/build
|
cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S openal-soft-1.21.1 -B openal-soft-1.21.1/build || exit 99
|
||||||
[ -e Makefile ] && make clean
|
cmake --build openal-soft-1.21.1/build -j$(nproc) || exit 99
|
||||||
cmake -G "Unix Makefiles" -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" ..
|
cmake --install openal-soft-1.21.1/build || exit 99
|
||||||
make -j$(nproc) install || exit 99
|
|
||||||
cd "$cwd_root"
|
|
||||||
|
|
||||||
# Build SDL2 without sound systems.
|
# Build SDL2 without sound systems.
|
||||||
sdl_ss=OFF
|
sdl_ss=OFF
|
||||||
@@ -557,11 +554,9 @@ else
|
|||||||
else
|
else
|
||||||
wget -qO - https://github.com/FNA-XNA/FAudio/archive/refs/tags/22.03.tar.gz | tar zxf -
|
wget -qO - https://github.com/FNA-XNA/FAudio/archive/refs/tags/22.03.tar.gz | tar zxf -
|
||||||
fi
|
fi
|
||||||
mkdir FAudio-22.03/build
|
cmake -G Ninja -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S FAudio-22.03 -B FAudio-22.03/build || exit 99
|
||||||
cd FAudio-22.03/build
|
cmake --build FAudio-22.03/build -j$(nproc) || exit 99
|
||||||
cmake -G "Unix Makefiles" -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" ..
|
cmake --install FAudio-22.03/build || exit 99
|
||||||
make -j$(nproc) install || exit 99
|
|
||||||
cd "$cwd_root"
|
|
||||||
|
|
||||||
# Build SDL2 with sound systems.
|
# Build SDL2 with sound systems.
|
||||||
sdl_ss=ON
|
sdl_ss=ON
|
||||||
@@ -570,35 +565,33 @@ else
|
|||||||
# Build rtmidi without JACK support to remove the dependency on libjack.
|
# Build rtmidi without JACK support to remove the dependency on libjack.
|
||||||
if [ -d "rtmidi-4.0.0" ]
|
if [ -d "rtmidi-4.0.0" ]
|
||||||
then
|
then
|
||||||
rm -rf rtmidi-4.0.0/CMakeCache.txt rtmidi-4.0.0/CMakeFiles
|
rm -rf rtmidi-4.0.0/build
|
||||||
else
|
else
|
||||||
wget -qO - http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz | tar zxf -
|
wget -qO - http://www.music.mcgill.ca/~gary/rtmidi/release/rtmidi-4.0.0.tar.gz | tar zxf -
|
||||||
fi
|
fi
|
||||||
cwd_root=$(pwd)
|
cmake -G Ninja -D RTMIDI_API_JACK=OFF -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" -S rtmidi-4.0.0 -B rtmidi-4.0.0/build || exit 99
|
||||||
cd rtmidi-4.0.0
|
cmake --build rtmidi-4.0.0/build -j$(nproc) || exit 99
|
||||||
[ -e Makefile ] && make clean
|
cmake --install rtmidi-4.0.0/build || exit 99
|
||||||
cmake -G "Unix Makefiles" -D RTMIDI_API_JACK=OFF -D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" .
|
|
||||||
make -j$(nproc) install || exit 99
|
|
||||||
cd "$cwd_root"
|
|
||||||
|
|
||||||
# Build SDL2 for joystick support with most components disabled to remove the dependencies on PulseAudio and libdrm.
|
# Build SDL2 for joystick and FAudio support, with most components
|
||||||
|
# disabled to remove the dependencies on PulseAudio and libdrm.
|
||||||
if [ ! -d "SDL2-2.0.20" ]
|
if [ ! -d "SDL2-2.0.20" ]
|
||||||
then
|
then
|
||||||
wget -qO - https://www.libsdl.org/release/SDL2-2.0.20.tar.gz | tar zxf -
|
wget -qO - https://www.libsdl.org/release/SDL2-2.0.20.tar.gz | tar zxf -
|
||||||
fi
|
fi
|
||||||
rm -rf sdlbuild
|
rm -rf sdlbuild
|
||||||
mkdir sdlbuild
|
mkdir sdlbuild
|
||||||
cd sdlbuild
|
cmake -G Ninja -D SDL_DISKAUDIO=OFF -D SDL_DIRECTFB_SHARED=OFF -D SDL_OPENGL=OFF -D SDL_OPENGLES=OFF -D SDL_OSS=OFF -D SDL_ALSA=$sdl_ss \
|
||||||
cmake -G "Unix Makefiles" -D SDL_DISKAUDIO=OFF -D SDL_DIRECTFB_SHARED=OFF -D SDL_OPENGL=OFF -D SDL_OPENGLES=OFF -D SDL_OSS=OFF -D SDL_ALSA=$sdl_ss \
|
-D SDL_ALSA_SHARED=$sdl_ss -D SDL_JACK=$sdl_ss -D SDL_JACK_SHARED=$sdl_ss -D SDL_ESD=OFF -D SDL_ESD_SHARED=OFF -D SDL_PIPEWIRE=$sdl_ss \
|
||||||
-D SDL_ALSA_SHARED=$sdl_ss -D SDL_JACK=$sdl_ss -D SDL_JACK_SHARED=$sdl_ss -D SDL_ESD=OFF -D SDL_ESD_SHARED=OFF -D SDL_PIPEWIRE=$sdl_ss -D SDL_PIPEWIRE_SHARED=$sdl_ss \
|
-D SDL_PIPEWIRE_SHARED=$sdl_ss -D SDL_PULSEAUDIO=$sdl_ss -D SDL_PULSEAUDIO_SHARED=$sdl_ss -D SDL_ARTS=OFF -D SDL_ARTS_SHARED=OFF \
|
||||||
-D SDL_PULSEAUDIO=$sdl_ss -D SDL_PULSEAUDIO_SHARED=$sdl_ss -D SDL_ARTS=OFF -D SDL_ARTS_SHARED=OFF -D SDL_NAS=$sdl_ss -D SDL_NAS_SHARED=$sdl_ss -D SDL_SNDIO=$sdl_ss \
|
-D SDL_NAS=$sdl_ss -D SDL_NAS_SHARED=$sdl_ss -D SDL_SNDIO=$sdl_ss -D SDL_SNDIO_SHARED=$sdl_ss -D SDL_FUSIONSOUND=OFF \
|
||||||
-D SDL_SNDIO_SHARED=$sdl_ss -D SDL_FUSIONSOUND=OFF -D SDL_FUSIONSOUND_SHARED=OFF -D SDL_LIBSAMPLERATE=$sdl_ss -D SDL_LIBSAMPLERATE_SHARED=$sdl_ss -D SDL_X11=OFF \
|
-D SDL_FUSIONSOUND_SHARED=OFF -D SDL_LIBSAMPLERATE=$sdl_ss -D SDL_LIBSAMPLERATE_SHARED=$sdl_ss -D SDL_X11=OFF -D SDL_X11_SHARED=OFF \
|
||||||
-D SDL_X11_SHARED=OFF -D SDL_WAYLAND=OFF -D SDL_WAYLAND_SHARED=OFF -D SDL_WAYLAND_LIBDECOR=OFF -D SDL_WAYLAND_LIBDECOR_SHARED=OFF \
|
-D SDL_WAYLAND=OFF -D SDL_WAYLAND_SHARED=OFF -D SDL_WAYLAND_LIBDECOR=OFF -D SDL_WAYLAND_LIBDECOR_SHARED=OFF -D SDL_WAYLAND_QT_TOUCH=OFF \
|
||||||
-D SDL_WAYLAND_QT_TOUCH=OFF -D SDL_RPI=OFF -D SDL_VIVANTE=OFF -D SDL_VULKAN=OFF -D SDL_KMSDRM=OFF -D SDL_KMSDRM_SHARED=OFF -D SDL_OFFSCREEN=OFF \
|
-D SDL_RPI=OFF -D SDL_VIVANTE=OFF -D SDL_VULKAN=OFF -D SDL_KMSDRM=OFF -D SDL_KMSDRM_SHARED=OFF -D SDL_OFFSCREEN=OFF \
|
||||||
-D SDL_HIDAPI_JOYSTICK=ON -D SDL_VIRTUAL_JOYSTICK=ON -D SDL_SHARED=ON -D SDL_STATIC=OFF -S "$cwd_root/SDL2-2.0.20" \
|
-D SDL_HIDAPI_JOYSTICK=ON -D SDL_VIRTUAL_JOYSTICK=ON -D SDL_SHARED=ON -D SDL_STATIC=OFF -S SDL2-2.0.20 -B sdlbuild \
|
||||||
-D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr"
|
-D "CMAKE_TOOLCHAIN_FILE=$cwd_root/toolchain.cmake" -D "CMAKE_INSTALL_PREFIX=$cwd_root/archive_tmp/usr" || exit 99
|
||||||
make -j$(nproc) install || exit 99
|
cmake --build sdlbuild -j$(nproc) || exit 99
|
||||||
cd "$cwd_root"
|
cmake --install sdlbuild || exit 99
|
||||||
|
|
||||||
# Archive Discord Game SDK library.
|
# Archive Discord Game SDK library.
|
||||||
7z e -y -o"archive_tmp/usr/lib" discord_game_sdk.zip "lib/$arch_discord/discord_game_sdk.so"
|
7z e -y -o"archive_tmp/usr/lib" discord_game_sdk.zip "lib/$arch_discord/discord_game_sdk.so"
|
||||||
|
@@ -13,7 +13,7 @@ gcc-objc 11.2.0-4
|
|||||||
gcc 11.2.0-4
|
gcc 11.2.0-4
|
||||||
libgccjit 11.2.0-4
|
libgccjit 11.2.0-4
|
||||||
tools-git 9.0.0.6357.eac8c38c1-1
|
tools-git 9.0.0.6357.eac8c38c1-1
|
||||||
make 4.3-1
|
ninja 1.10.2-3
|
||||||
pkgconf 1.8.0-2
|
pkgconf 1.8.0-2
|
||||||
openal 1.21.1-3
|
openal 1.21.1-3
|
||||||
libpng 1.6.37-6
|
libpng 1.6.37-6
|
||||||
|
Reference in New Issue
Block a user