1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore(CI): macOS CI script support for both full dep build or just qTox build

This commit is contained in:
Anthony Bilinski 2022-03-03 03:04:24 -08:00
parent a877d7d841
commit f3420a0b8f
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
2 changed files with 21 additions and 2 deletions

View File

@ -20,12 +20,31 @@ set -eu -o pipefail
readonly BIN_NAME="qTox.dmg"
SCRIPT_DIR=$(dirname $(realpath "$0"))
source "${SCRIPT_DIR}/../buildscripts/build_utils.sh"
# kind of a hack.. but we want to extract DEP_PREFIX from it
parse_arch --arch macos --supported macos --dep macos
if [ "$1" == "user" ]; then
DEPLOYMENT_TARGET=""
PREFIX_PATH="$(brew --prefix qt@5)"
elif [ "$1" == "dist" ]; then
DEPLOYMENT_TARGET="-DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOS_MINIMUM_SUPPORTED_VERSION"
PREFIX_PATH="$DEP_PREFIX;$(brew --prefix qt@5)"
else
echo "Unknown arg $1"
exit 1
fi
build_qtox() {
cmake -DUPDATE_CHECK=ON \
-DSPELL_CHECK=OFF \
-DSTRICT_OPTIONS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@5)" .
"${DEPLOYMENT_TARGET}" \
"-DCMAKE_PREFIX_PATH=${PREFIX_PATH}" .
make -j$(sysctl -n hw.ncpu)
export CTEST_OUTPUT_ON_FAILURE=1
ctest -j$(sysctl -n hw.ncpu)

View File

@ -517,7 +517,7 @@ jobs:
- name: Install toxcore and toxext
run: buildscripts/build_toxcore_linux.sh
- name: Build qTox
run: ./.ci-scripts/build-osx.sh
run: ./.ci-scripts/build-qtox-macos.sh user
- name: Upload dmg
uses: actions/upload-artifact@v2
with: