mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 12:08:50 +03:00
Cirrus build for Apple Silicon - maybe
This commit is contained in:
parent
ccd2465066
commit
2d791f8a85
3 changed files with 60 additions and 22 deletions
|
@ -10,6 +10,10 @@ PATH="/usr/local/opt/qt@5/bin/:${PATH}"
|
|||
|
||||
security unlock-keychain -p "${RUNNER_USER_PW}" login.keychain
|
||||
|
||||
if [ "${CI_PIPELINE_TRIGGERED}" ]; then
|
||||
cat "${TRIGGER_PAYLOAD}"
|
||||
fi
|
||||
|
||||
( cd build || exit
|
||||
# macdeployqt does not copy symlinks over.
|
||||
# this specifically addresses icu4c issues but nothing else.
|
||||
|
@ -91,7 +95,7 @@ done
|
|||
VERSION=${CI_COMMIT_SHORT_SHA}
|
||||
|
||||
if [ -n "$VERSION" ]; then
|
||||
mv nheko.dmg "nheko-${VERSION}.dmg"
|
||||
mv nheko.dmg "nheko-${VERSION}_${PLAT}.dmg"
|
||||
mkdir artifacts
|
||||
cp "nheko-${VERSION}.dmg" artifacts/
|
||||
cp "nheko-${VERSION}_${PLAT}.dmg" artifacts/
|
||||
fi
|
23
.cirrus.yml
Normal file
23
.cirrus.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
task:
|
||||
macos_instance:
|
||||
image: ghcr.io/cirruslabs/macos-monterey-xcode:13
|
||||
name: Build - macOS Apple Silicon
|
||||
homebrew_script:
|
||||
- brew bundle --file .ci/macos/Brewfile
|
||||
build_script:
|
||||
- export PATH=/usr/local/opt/qt@5/bin/:${PATH}
|
||||
- export CMAKE_PREFIX_PATH=/usr/local/opt/qt@5
|
||||
- cmake -GNinja -H. -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
|
||||
-DUSE_BUNDLED_BOOST=ON
|
||||
-DCI_BUILD=ON
|
||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
|
||||
- cmake --build build
|
||||
- (cd build && git clone https://github.com/Nheko-Reborn/qt-jdenticon.git && cd qt-jdenticon && qmake && make -j 4 && cp libqtjdenticon.dylib ../nheko.app/Contents/MacOS)
|
||||
binaries_artifacts:
|
||||
path: build/nheko.app
|
|
@ -4,6 +4,11 @@ variables:
|
|||
# prevent configure tzdata hanging apt install commands
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
# default to not running jobs when pipeline is triggered from a webhook.
|
||||
default:
|
||||
rules:
|
||||
- if : '!$CI_PIPELINE_TRIGGERED'
|
||||
|
||||
build-clazy:
|
||||
stage: build
|
||||
image: ubuntu:22.04
|
||||
|
@ -143,6 +148,8 @@ build-macos:
|
|||
codesign-macos:
|
||||
stage: deploy
|
||||
tags: [macos]
|
||||
variables:
|
||||
PLAT: "intel"
|
||||
before_script:
|
||||
- 'brew upgrade qt@5'
|
||||
- pip3 install dmgbuild
|
||||
|
@ -150,15 +157,19 @@ codesign-macos:
|
|||
- export PATH=/usr/local/opt/qt@5/bin/:${PATH}
|
||||
- ./.ci/macos/notarize.sh
|
||||
after_script:
|
||||
- ./.ci/upload-nightly-gitlab.sh artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
|
||||
- ./.ci/upload-nightly-gitlab.sh artifacts/nheko-${CI_COMMIT_SHORT_SHA}_${PLAT}.dmg
|
||||
needs:
|
||||
- build-macos
|
||||
- job: build-macos
|
||||
optional: true # optional since we want to be able to also trigger this job from cirrus ci for apple silicon builds.
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH == "master"'
|
||||
- if : '$CI_COMMIT_BRANCH == "master"'
|
||||
- if : $CI_COMMIT_TAG
|
||||
- if : $CI_PIPELINE_TRIGGERED
|
||||
variables:
|
||||
PLAT: "m1"
|
||||
artifacts:
|
||||
paths:
|
||||
- artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg
|
||||
- artifacts/nheko-${CI_COMMIT_SHORT_SHA}_${PLAT}.dmg
|
||||
- /tmp/notarize*
|
||||
name: nheko-${CI_COMMIT_SHORT_SHA}-macos
|
||||
|
||||
|
|
Loading…
Reference in a new issue