simplify script

This commit is contained in:
Bruno Alexandre Rosa 2025-10-10 18:02:22 -03:00
parent 4a9b71e400
commit 4a0b44cda6
2 changed files with 4 additions and 14 deletions

View file

@ -11,8 +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 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 TARGET_MACOS_VERSION
# 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
@ -80,15 +79,6 @@ while [[ $# != 0 ]]; do
BUILD_DIR="$1" BUILD_DIR="$1"
shift shift
;; ;;
'--target-macos-version')
shift
if [[ $# == 0 ]]; then
echo "::error file=$0::--target-macos-version expects an argument"
exit 3
fi
TARGET_MACOS_VERSION="$1"
shift
;;
*) *)
echo "::error file=$0::unrecognized option: $1" echo "::error file=$0::unrecognized option: $1"
exit 3 exit 3

View file

@ -332,9 +332,9 @@ jobs:
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}' CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
VCPKG_DISABLE_METRICS: 1 VCPKG_DISABLE_METRICS: 1
VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite' VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite'
# if Intel, pass the flag and set to matrix.target, otherwise do nothing # if Intel, set the target macOS version to matrix.target, otherwise empty string
TARGET_MACOS_VERSION_FLAG: ${{ matrix.soc == 'Intel' && format('--target-macos-version {0}', matrix.target) || '' }} TARGET_MACOS_VERSION: ${{ matrix.soc == 'Intel' && matrix.target || '' }}
run: .ci/compile.sh --server --test --ccache "$CCACHE_SIZE" --vcpkg ${{ env.TARGET_MACOS_VERSION_FLAG }} run: .ci/compile.sh --server --test --ccache "$CCACHE_SIZE" --vcpkg
- name: Sign app bundle - name: Sign app bundle
if: matrix.make_package && (github.ref == 'refs/heads/master' || needs.configure.outputs.tag != null) if: matrix.make_package && (github.ref == 'refs/heads/master' || needs.configure.outputs.tag != null)