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:
parent
a877d7d841
commit
f3420a0b8f
|
@ -20,12 +20,31 @@ set -eu -o pipefail
|
||||||
|
|
||||||
readonly BIN_NAME="qTox.dmg"
|
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() {
|
build_qtox() {
|
||||||
cmake -DUPDATE_CHECK=ON \
|
cmake -DUPDATE_CHECK=ON \
|
||||||
-DSPELL_CHECK=OFF \
|
-DSPELL_CHECK=OFF \
|
||||||
-DSTRICT_OPTIONS=ON \
|
-DSTRICT_OPTIONS=ON \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@5)" .
|
"${DEPLOYMENT_TARGET}" \
|
||||||
|
"-DCMAKE_PREFIX_PATH=${PREFIX_PATH}" .
|
||||||
make -j$(sysctl -n hw.ncpu)
|
make -j$(sysctl -n hw.ncpu)
|
||||||
export CTEST_OUTPUT_ON_FAILURE=1
|
export CTEST_OUTPUT_ON_FAILURE=1
|
||||||
ctest -j$(sysctl -n hw.ncpu)
|
ctest -j$(sysctl -n hw.ncpu)
|
2
.github/workflows/build-test-deploy.yaml
vendored
2
.github/workflows/build-test-deploy.yaml
vendored
|
@ -517,7 +517,7 @@ jobs:
|
||||||
- name: Install toxcore and toxext
|
- name: Install toxcore and toxext
|
||||||
run: buildscripts/build_toxcore_linux.sh
|
run: buildscripts/build_toxcore_linux.sh
|
||||||
- name: Build qTox
|
- name: Build qTox
|
||||||
run: ./.ci-scripts/build-osx.sh
|
run: ./.ci-scripts/build-qtox-macos.sh user
|
||||||
- name: Upload dmg
|
- name: Upload dmg
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user