osci-render/ci/test.sh

49 wiersze
1.2 KiB
Bash
Czysty Zwykły widok Historia

2024-02-10 12:05:19 +00:00
#!/bin/bash -e
PLUGIN="osci-render-test"
# Resave jucer file
RESAVE_COMMAND="$PROJUCER_PATH --resave '$ROOT/$PLUGIN.jucer'"
eval "$RESAVE_COMMAND"
# Build mac version
if [ "$OS" = "mac" ]; then
cd "$ROOT/Builds/Test/MacOSX"
xcodebuild -configuration Release || exit 1
cd "build/Release"
2024-02-10 12:39:57 +00:00
find .
2024-02-10 12:44:52 +00:00
echo "Running the test"
2024-02-10 12:39:57 +00:00
# Run the test
./"$PLUGIN"
2024-02-10 12:05:19 +00:00
fi
# Build linux version
if [ "$OS" = "linux" ]; then
2024-02-10 12:32:48 +00:00
cd "$ROOT/Builds/Test/LinuxMakefile"
2024-02-10 12:05:19 +00:00
make CONFIG=Release
cd build
2024-02-10 12:44:52 +00:00
echo "Running the test"
2024-02-10 12:05:19 +00:00
# Run the test using the binary
xvfb-run -a -s "-screen 0 1280x720x24" ./$PLUGIN
fi
# Build Win version
if [ "$OS" = "win" ]; then
VS_WHERE="C:/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe"
MSBUILD_EXE=$("$VS_WHERE" -latest -requires Microsoft.Component.MSBuild -find "MSBuild\**\Bin\MSBuild.exe")
echo $MSBUILD_EXE
2024-02-10 12:32:48 +00:00
cd "$ROOT/Builds/Test/VisualStudio2022"
2024-02-10 12:05:19 +00:00
"$MSBUILD_EXE" "$PLUGIN.sln" "//p:VisualStudioVersion=16.0" "//m" "//t:Build" "//p:Configuration=Release" "//p:Platform=x64" "//p:PreferredToolArchitecture=x64"
2024-02-10 12:39:57 +00:00
cd "x64/Release/ConsoleApp"
2024-02-10 12:44:52 +00:00
echo "Running the test"
ls
2024-02-10 12:05:19 +00:00
# Run the test using the .exe file
2024-02-10 12:48:29 +00:00
./osci-render-test.exe
2024-02-10 12:05:19 +00:00
fi
2024-02-10 12:24:09 +00:00
cd "$ROOT"