mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 09:03:57 -07:00
Merge branch 'master' into 6186/target-older-x86-macos
This commit is contained in:
commit
0746b00abb
4 changed files with 49 additions and 21 deletions
|
|
@ -67,6 +67,10 @@ while [[ $# != 0 ]]; do
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
'--vcpkg')
|
||||||
|
USE_VCPKG=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
'--dir')
|
'--dir')
|
||||||
shift
|
shift
|
||||||
if [[ $# == 0 ]]; then
|
if [[ $# == 0 ]]; then
|
||||||
|
|
@ -126,7 +130,10 @@ fi
|
||||||
if [[ $PACKAGE_TYPE ]]; then
|
if [[ $PACKAGE_TYPE ]]; then
|
||||||
flags+=("-DCPACK_GENERATOR=$PACKAGE_TYPE")
|
flags+=("-DCPACK_GENERATOR=$PACKAGE_TYPE")
|
||||||
fi
|
fi
|
||||||
if [[ $TARGET_MACOS_VERSION ]]; then
|
if [[ $USE_VCPKG ]]; then
|
||||||
|
flags+=("-DUSE_VCPKG=1")
|
||||||
|
fi
|
||||||
|
if [[ $TARGET_MACOS_VERSION ]]; then
|
||||||
TRIPLETS_DIR="../cmake/triplets"
|
TRIPLETS_DIR="../cmake/triplets"
|
||||||
mkdir -p "$TRIPLETS_DIR"
|
mkdir -p "$TRIPLETS_DIR"
|
||||||
# Replace dots with hyphens in triplet name for vcpkg compatibility
|
# Replace dots with hyphens in triplet name for vcpkg compatibility
|
||||||
|
|
|
||||||
35
.github/workflows/desktop-build.yml
vendored
35
.github/workflows/desktop-build.yml
vendored
|
|
@ -9,20 +9,31 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
paths:
|
||||||
- '**.md'
|
- '*/**' # matches all files not in root
|
||||||
- 'webclient/**'
|
- '!**.md'
|
||||||
- '.github/workflows/web-*.yml'
|
- '!.github/**'
|
||||||
- '.github/workflows/translations-*.yml'
|
- '!.husky/**'
|
||||||
- '.github/workflows/docker-release.yml'
|
- '!.tx/**'
|
||||||
|
- '!doc/**'
|
||||||
|
- '!webclient/**'
|
||||||
|
- '.github/workflows/desktop-build.yml'
|
||||||
|
- 'CMakeLists.txt'
|
||||||
|
- 'vcpkg.json'
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths:
|
||||||
- '**.md'
|
- '*/**' # matches all files not in root
|
||||||
- 'webclient/**'
|
- '!**.md'
|
||||||
- '.github/workflows/web-*.yml'
|
- '!.github/**'
|
||||||
- '.github/workflows/translations-*.yml'
|
- '!.husky/**'
|
||||||
|
- '!.tx/**'
|
||||||
|
- '!doc/**'
|
||||||
|
- '!webclient/**'
|
||||||
|
- '.github/workflows/desktop-build.yml'
|
||||||
|
- 'CMakeLists.txt'
|
||||||
|
- 'vcpkg.json'
|
||||||
|
|
||||||
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on master)
|
# Cancel earlier, unfinished runs of this workflow on the same branch (unless on master)
|
||||||
concurrency:
|
concurrency:
|
||||||
|
|
@ -318,7 +329,7 @@ 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'
|
||||||
run: .ci/compile.sh --server --test --ccache "$CCACHE_SIZE" ${{ matrix.soc == 'Intel' && format('--target-macos-version {0}', matrix.target) || '' }}
|
run: .ci/compile.sh --server --test --ccache "$CCACHE_SIZE" --vcpkg ${{ matrix.soc == 'Intel' && format('--target-macos-version {0}', matrix.target) || '' }}
|
||||||
|
|
||||||
- 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)
|
||||||
|
|
|
||||||
20
.github/workflows/desktop-lint.yml
vendored
20
.github/workflows/desktop-lint.yml
vendored
|
|
@ -2,12 +2,20 @@ name: Code Style (C++)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths:
|
||||||
- '**.md'
|
- '*/**' # matches all files not in root
|
||||||
- 'webclient/**'
|
- '!**.md'
|
||||||
- '.github/workflows/web-*.yml'
|
- '!.ci/**'
|
||||||
- '.github/workflows/translations-*.yml'
|
- '!.github/**'
|
||||||
- '.github/workflows/docker-release.yml'
|
- '!.husky'
|
||||||
|
- '!.tx'
|
||||||
|
- '!doc/**'
|
||||||
|
- '!webclient/**'
|
||||||
|
- '.github/workflows/desktop-lint.yml'
|
||||||
|
- '.ci/lint_cpp.sh'
|
||||||
|
- '.clang-format'
|
||||||
|
- '.cmake-format.json'
|
||||||
|
- 'format.sh'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ option(WITH_ORACLE "build oracle" ON)
|
||||||
option(WITH_DBCONVERTER "build dbconverter" ON)
|
option(WITH_DBCONVERTER "build dbconverter" ON)
|
||||||
# Compile tests
|
# Compile tests
|
||||||
option(TEST "build tests" OFF)
|
option(TEST "build tests" OFF)
|
||||||
|
# Use vcpkg regardless of OS
|
||||||
|
option(USE_VCPKG "Use vcpkg regardless of OS" OFF)
|
||||||
|
|
||||||
# Default to "Release" build type
|
# Default to "Release" build type
|
||||||
# User-provided value for CMAKE_BUILD_TYPE must be checked before the PROJECT() call
|
# User-provided value for CMAKE_BUILD_TYPE must be checked before the PROJECT() call
|
||||||
|
|
@ -48,8 +50,8 @@ if(USE_CCACHE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32 OR APPLE)
|
if(WIN32 OR USE_VCPKG)
|
||||||
# Use vcpkg toolchain on Windows and macOS
|
# Use vcpkg toolchain on Windows (and on macOS in CI)
|
||||||
set(CMAKE_TOOLCHAIN_FILE
|
set(CMAKE_TOOLCHAIN_FILE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
CACHE STRING "Vcpkg toolchain file"
|
CACHE STRING "Vcpkg toolchain file"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue