mirror of https://github.com/Nheko-Reborn/nheko
parent
48ecc2b45a
commit
35b18700ac
@ -0,0 +1,32 @@ |
|||||||
|
#!/usr/bin/env sh |
||||||
|
|
||||||
|
set -u |
||||||
|
|
||||||
|
# unused |
||||||
|
#TAG=$(git tag -l --points-at HEAD) |
||||||
|
|
||||||
|
# Add Qt binaries to path |
||||||
|
PATH="$(brew --prefix qt5):${PATH}" |
||||||
|
export PATH |
||||||
|
|
||||||
|
CMAKE_PREFIX_PATH="$(brew --prefix qt5)" |
||||||
|
export CMAKE_PREFIX_PATH |
||||||
|
|
||||||
|
cmake -GNinja -S. -Bbuild \ |
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
||||||
|
-DCMAKE_INSTALL_PREFIX=.deps/usr \ |
||||||
|
-DHUNTER_ROOT="../.hunter" \ |
||||||
|
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \ |
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \ |
||||||
|
-DUSE_BUNDLED_OPENSSL=ON \ |
||||||
|
-DCI_BUILD=ON |
||||||
|
cmake --build build |
||||||
|
( cd build || exit |
||||||
|
git clone https://github.com/Nheko-Reborn/qt-jdenticon.git |
||||||
|
( cd qt-jdenticon || exit |
||||||
|
qmake |
||||||
|
make -j 4 |
||||||
|
cp libqtjdenticon.dylib ../nheko.app/Contents/MacOS |
||||||
|
) |
||||||
|
macdeployqt nheko.app -always-overwrite -qmldir=../resources/qml/ |
||||||
|
) |
@ -1,34 +0,0 @@ |
|||||||
#!/usr/bin/env sh |
|
||||||
|
|
||||||
set -eux |
|
||||||
|
|
||||||
# unused |
|
||||||
#TAG=$(git tag -l --points-at HEAD) |
|
||||||
|
|
||||||
# Add Qt binaries to path |
|
||||||
PATH=/usr/local/opt/qt@5/bin/:${PATH} |
|
||||||
|
|
||||||
( cd build |
|
||||||
# macdeployqt does not copy symlinks over. |
|
||||||
# this specifically addresses icu4c issues but nothing else. |
|
||||||
ICU_LIB="$(brew --prefix icu4c)/lib" |
|
||||||
export ICU_LIB |
|
||||||
mkdir -p nheko.app/Contents/Frameworks |
|
||||||
find "${ICU_LIB}" -type l -name "*.dylib" -exec cp -a -n {} nheko.app/Contents/Frameworks/ \; || true |
|
||||||
|
|
||||||
macdeployqt nheko.app -dmg -always-overwrite -qmldir=../resources/qml/ |
|
||||||
|
|
||||||
user=$(id -nu) |
|
||||||
chown "${user}" nheko.dmg |
|
||||||
mv nheko.dmg .. |
|
||||||
) |
|
||||||
|
|
||||||
dmgbuild -s ./.ci/macos/settings.json "Nheko" nheko.dmg |
|
||||||
|
|
||||||
VERSION=${CI_COMMIT_SHORT_SHA} |
|
||||||
|
|
||||||
if [ -n "$VERSION" ]; then |
|
||||||
mv nheko.dmg "nheko-${VERSION}.dmg" |
|
||||||
mkdir artifacts |
|
||||||
cp "nheko-${VERSION}.dmg" artifacts/ |
|
||||||
fi |
|
@ -0,0 +1,24 @@ |
|||||||
|
task: |
||||||
|
macos_instance: |
||||||
|
image: ghcr.io/cirruslabs/macos-monterey-xcode:13 |
||||||
|
name: Build - macOS Apple Silicon |
||||||
|
only_if: $CIRRUS_REPO_OWNER == 'Nheko-Reborn' |
||||||
|
environment: |
||||||
|
GITLAB_TRIGGER_TOKEN: ENCRYPTED[!5fb4bbdecbde3b2c766ac7383dca573cd5ec8b815c5ac9bede0cadfe9ad70ecd3e64b1728f7840da087099f3fc1fd4f7!] |
||||||
|
homebrew_script: |
||||||
|
- brew bundle --file .ci/macos/Brewfile |
||||||
|
build_script: |
||||||
|
- export PATH="$(brew --prefix qt5)/bin/:${PATH}" |
||||||
|
- ./.ci/macos/build.sh |
||||||
|
zip_script: |
||||||
|
- ditto -c -k --sequesterRsrc --keepParent build/nheko.app build/nheko.zip |
||||||
|
gitlab_script: |
||||||
|
- curl -X POST |
||||||
|
--fail |
||||||
|
-F token="${GITLAB_TRIGGER_TOKEN}" |
||||||
|
-F ref="${CIRRUS_BRANCH}" |
||||||
|
-F "variables[TRIGGER_BUILD_ID]=${CIRRUS_BUILD_ID}" |
||||||
|
-F "variables[TRIGGERED_BY]=cirrus" |
||||||
|
"https://nheko.im/api/v4/projects/2/trigger/pipeline" |
||||||
|
binaries_artifacts: |
||||||
|
path: build/nheko.zip |
@ -1,3 +1,4 @@ |
|||||||
set(CMAKE_CXX_STANDARD 20) |
set(CMAKE_CXX_STANDARD 20) |
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON) |
set(CMAKE_CXX_STANDARD_REQUIRED ON) |
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON) |
set(CMAKE_POSITION_INDEPENDENT_CODE ON) |
||||||
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.15) |
Loading…
Reference in new issue