mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
feat(CI): add macOS to our CI (#3321)
Co-Authored-By: Meerd <meerd@users.noreply.github.com>
This commit is contained in:
22
.github/workflows/core_build.yml
vendored
22
.github/workflows/core_build.yml
vendored
@@ -52,6 +52,28 @@ jobs:
|
||||
- name: Run unit tests
|
||||
run: source ./apps/ci/ci-run-unit-tests.sh
|
||||
|
||||
mac-build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: macos-10.15
|
||||
name: macos-10.15
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache
|
||||
uses: actions/cache@v1.1.2
|
||||
with:
|
||||
path: /Users/runner/.ccache
|
||||
key: ccache:macos-10.15:${{ github.ref }}:${{ github.sha }}
|
||||
restore-keys: |
|
||||
ccache:macos-10.15:${{ github.ref }}
|
||||
ccache:macos-10.15
|
||||
- name: Configure OS
|
||||
run: source ./apps/ci/mac/ci-install.sh
|
||||
- name: Build
|
||||
run: source ./apps/ci/mac/ci-compile.sh
|
||||
- name: Run unit tests
|
||||
run: source ./apps/ci/ci-run-unit-tests.sh
|
||||
|
||||
docker-build:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
|
||||
@@ -98,6 +98,9 @@ set(ACE_EXPECTED_VERSION 6.0.3)
|
||||
|
||||
find_package(PCHSupport)
|
||||
find_package(ACE REQUIRED)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
add_definitions(-DACE_LACKS_AUTO_PTR=1)
|
||||
endif()
|
||||
find_package(MySQL REQUIRED)
|
||||
|
||||
if(UNIX AND WITH_PERFTOOLS)
|
||||
|
||||
29
apps/ci/mac/ci-compile.sh
Executable file
29
apps/ci/mac/ci-compile.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export CCACHE_CPP2=true
|
||||
export CCACHE_MAXSIZE='500MB'
|
||||
ccache -s
|
||||
|
||||
mkdir var/build/obj && cd var/build/obj;
|
||||
|
||||
time cmake ../../../ \
|
||||
-DTOOLS=1 \
|
||||
-DUNIT_TESTS=1 \
|
||||
-DSCRIPTS=1 \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DMYSQL_ADD_INCLUDE_PATH=/usr/local/include \
|
||||
-DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib \
|
||||
-DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include \
|
||||
-DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib \
|
||||
-DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include \
|
||||
-DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl/lib/libssl.dylib \
|
||||
-DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl/lib/libcrypto.dylib \
|
||||
-DCMAKE_C_FLAGS="-Werror" \
|
||||
-DCMAKE_CXX_FLAGS="-Werror" \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
;
|
||||
|
||||
time make -j $(($(sysctl -n hw.ncpu ) + 2))
|
||||
|
||||
ccache -s
|
||||
4
apps/ci/mac/ci-install.sh
Executable file
4
apps/ci/mac/ci-install.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
time brew update
|
||||
time brew install openssl readline ace coreutils bash bash-completion mysql ccache
|
||||
Reference in New Issue
Block a user