mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-17 07:52:16 -07:00
move logic inside runner == macos if
This commit is contained in:
parent
0647e0b6e3
commit
42fe2d7f73
1 changed files with 22 additions and 21 deletions
|
|
@ -11,7 +11,7 @@
|
||||||
# --debug or --release sets the build type ie CMAKE_BUILD_TYPE
|
# --debug or --release sets the build type ie CMAKE_BUILD_TYPE
|
||||||
# --ccache [<size>] uses ccache and shows stats, optionally provide size
|
# --ccache [<size>] uses ccache and shows stats, optionally provide size
|
||||||
# --dir <dir> sets the name of the build dir, default is "build"
|
# --dir <dir> sets the name of the build dir, default is "build"
|
||||||
# --target-macos-version <version> sets the min os version - only used for x86 (Intel) macOS builds
|
# --target-macos-version <version> sets the min os version - only used for macOS builds
|
||||||
# uses env: BUILDTYPE MAKE_INSTALL MAKE_PACKAGE PACKAGE_TYPE PACKAGE_SUFFIX MAKE_SERVER MAKE_TEST USE_CCACHE CCACHE_SIZE BUILD_DIR CMAKE_GENERATOR
|
# uses env: BUILDTYPE MAKE_INSTALL MAKE_PACKAGE PACKAGE_TYPE PACKAGE_SUFFIX MAKE_SERVER MAKE_TEST USE_CCACHE CCACHE_SIZE BUILD_DIR CMAKE_GENERATOR
|
||||||
# (correspond to args: --debug/--release --install --package <package type> --suffix <suffix> --server --test --ccache <ccache_size> --dir <dir>)
|
# (correspond to args: --debug/--release --install --package <package type> --suffix <suffix> --server --test --ccache <ccache_size> --dir <dir>)
|
||||||
# exitcode: 1 for failure, 3 for invalid arguments
|
# exitcode: 1 for failure, 3 for invalid arguments
|
||||||
|
|
@ -133,6 +133,22 @@ fi
|
||||||
if [[ $USE_VCPKG ]]; then
|
if [[ $USE_VCPKG ]]; then
|
||||||
flags+=("-DUSE_VCPKG=1")
|
flags+=("-DUSE_VCPKG=1")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Add cmake --build flags
|
||||||
|
buildflags=(--config "$BUILDTYPE")
|
||||||
|
|
||||||
|
function ccachestatsverbose() {
|
||||||
|
# note, verbose only works on newer ccache, discard the error
|
||||||
|
local got
|
||||||
|
if got="$(ccache --show-stats --verbose 2>/dev/null)"; then
|
||||||
|
echo "$got"
|
||||||
|
else
|
||||||
|
ccache --show-stats
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compile
|
||||||
|
if [[ $RUNNER_OS == macOS ]]; then
|
||||||
if [[ $TARGET_MACOS_VERSION ]]; then
|
if [[ $TARGET_MACOS_VERSION ]]; then
|
||||||
# CMAKE_OSX_DEPLOYMENT_TARGET is a vanilla cmake flag needed to compile to target macOS version
|
# CMAKE_OSX_DEPLOYMENT_TARGET is a vanilla cmake flag needed to compile to target macOS version
|
||||||
flags+=("-DCMAKE_OSX_DEPLOYMENT_TARGET=${TARGET_MACOS_VERSION}")
|
flags+=("-DCMAKE_OSX_DEPLOYMENT_TARGET=${TARGET_MACOS_VERSION}")
|
||||||
|
|
@ -154,21 +170,6 @@ if [[ $TARGET_MACOS_VERSION ]]; then
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add cmake --build flags
|
|
||||||
buildflags=(--config "$BUILDTYPE")
|
|
||||||
|
|
||||||
function ccachestatsverbose() {
|
|
||||||
# note, verbose only works on newer ccache, discard the error
|
|
||||||
local got
|
|
||||||
if got="$(ccache --show-stats --verbose 2>/dev/null)"; then
|
|
||||||
echo "$got"
|
|
||||||
else
|
|
||||||
ccache --show-stats
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Compile
|
|
||||||
if [[ $RUNNER_OS == macOS ]]; then
|
|
||||||
echo "::group::Signing Certificate"
|
echo "::group::Signing Certificate"
|
||||||
if [[ -n "$MACOS_CERTIFICATE_NAME" ]]; then
|
if [[ -n "$MACOS_CERTIFICATE_NAME" ]]; then
|
||||||
echo "$MACOS_CERTIFICATE" | base64 --decode > certificate.p12
|
echo "$MACOS_CERTIFICATE" | base64 --decode > certificate.p12
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue