mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 08:52:19 -07:00
comments
This commit is contained in:
parent
afbf303a4e
commit
9624f257c3
1 changed files with 16 additions and 2 deletions
|
|
@ -133,6 +133,14 @@ fi
|
||||||
if [[ ! $BUILD_DIR ]]; then
|
if [[ ! $BUILD_DIR ]]; then
|
||||||
BUILD_DIR="build"
|
BUILD_DIR="build"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Can be omitted when using modern CMake config commands below for config and build (chceck BUILD_DIR logic above as well)
|
||||||
|
# cmake -S . -B "$BUILD_DIR" "${flags[@]}"
|
||||||
|
# cmake --build "$BUILD_DIR" "${buildflags[@]}"
|
||||||
|
# Required to update other commands with build folder as well:
|
||||||
|
# ctest --build-config "$BUILDTYPE" --test-dir "$BUILD_DIR" --output-on-failure
|
||||||
|
# cmake --build "$BUILD_DIR" --target install --config "$BUILDTYPE"
|
||||||
|
# cmake --build "$BUILD_DIR" --target package --config "$BUILDTYPE" (remove cd from renaming)
|
||||||
mkdir -p "$BUILD_DIR"
|
mkdir -p "$BUILD_DIR"
|
||||||
cd "$BUILD_DIR"
|
cd "$BUILD_DIR"
|
||||||
|
|
||||||
|
|
@ -180,7 +188,7 @@ function ccachestatsverbose() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Prepare
|
# Prepare compilation
|
||||||
if [[ $RUNNER_OS == macOS ]]; then
|
if [[ $RUNNER_OS == macOS ]]; then
|
||||||
# QTDIR is needed for macOS since we actually only use the cached thin Qt binaries instead of the install-qt-action,
|
# QTDIR is needed for macOS since we actually only use the cached thin Qt binaries instead of the install-qt-action,
|
||||||
# which sets a few environment variables
|
# which sets a few environment variables
|
||||||
|
|
@ -278,6 +286,7 @@ cmake --version
|
||||||
echo "ninja $(ninja --version)"
|
echo "ninja $(ninja --version)"
|
||||||
fi
|
fi
|
||||||
echo "Running CMake with these flags: ${flags[*]}"
|
echo "Running CMake with these flags: ${flags[*]}"
|
||||||
|
# Equivalent to modern and more explicit "cmake -S .. -B build"
|
||||||
cmake .. "${flags[@]}"
|
cmake .. "${flags[@]}"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
|
@ -313,21 +322,26 @@ if [[ $RUNNER_OS == macOS ]]; then
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Test
|
||||||
if [[ $MAKE_TEST ]]; then
|
if [[ $MAKE_TEST ]]; then
|
||||||
echo "::group::Run tests"
|
echo "::group::Run tests"
|
||||||
ctest --version
|
ctest --version
|
||||||
ctest -C "$BUILDTYPE" --output-on-failure
|
ctest --build-config "$BUILDTYPE" --output-on-failure
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Install
|
||||||
if [[ $MAKE_INSTALL ]]; then
|
if [[ $MAKE_INSTALL ]]; then
|
||||||
echo "::group::Install"
|
echo "::group::Install"
|
||||||
|
# Equivalent to modern "cmake --install ."
|
||||||
cmake --build . --target install --config "$BUILDTYPE"
|
cmake --build . --target install --config "$BUILDTYPE"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Package
|
||||||
if [[ $MAKE_PACKAGE ]]; then
|
if [[ $MAKE_PACKAGE ]]; then
|
||||||
echo "::group::Create package"
|
echo "::group::Create package"
|
||||||
|
cpack --version
|
||||||
cmake --build . --target package --config "$BUILDTYPE"
|
cmake --build . --target package --config "$BUILDTYPE"
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue