-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from kambala-decapitator/ci-macos
[CI] add macOS
- Loading branch information
Showing
8 changed files
with
144 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"version": 6, | ||
"configurePresets": [ | ||
{ | ||
"name": "release", | ||
"generator": "Unix Makefiles", | ||
"binaryDir": "${sourceDir}/build", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "release-macos", | ||
"inherits": "release", | ||
"generator": "Ninja", | ||
"cacheVariables": { | ||
"CMAKE_OSX_ARCHITECTURES": "x86_64;arm64", | ||
"CMAKE_OSX_DEPLOYMENT_TARGET": "11.0" | ||
} | ||
} | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "release", | ||
"configurePreset": "release" | ||
} | ||
], | ||
"packagePresets": [ | ||
{ | ||
"name": "release", | ||
"configurePreset": "release", | ||
"output": { | ||
"verbose": true | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
sudo add-apt-repository universe -y | ||
sudo apt update -y | ||
sudo apt install -y cmake \ | ||
gcc \ | ||
g++ \ | ||
libgl1-mesa-dev \ | ||
qt6-base-dev \ | ||
qt6-l10n-tools \ | ||
qt6-tools-dev \ | ||
qt6-tools-dev-tools \ | ||
qt6-wayland-dev \ | ||
|
||
echo "CC=gcc" >> $GITHUB_ENV | ||
echo "CXX=g++" >> $GITHUB_ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
brew install ninja | ||
|
||
cd .. | ||
for module in base tools ; do | ||
archive="$module.7z" | ||
curl -L -o "$archive" "https://download.qt.io/online/qtsdkrepository/mac_x64/desktop/qt6_662/qt.qt6.662.clang_64/6.6.2-0-202402121131qt$module-MacOS-MacOS_13-Clang-MacOS-MacOS_13-X86_64-ARM64.7z" | ||
7z x "$archive" '-xr!*.dSYM' | ||
done | ||
echo "CMAKE_PREFIX_PATH=$PWD/$(ls -1 | fgrep 6.)/macos" >> $GITHUB_ENV | ||
|
||
if [ "$MACOS_ASC_API_KEY" ]; then | ||
ascApiKey='ascApiKey.p8' | ||
echo "$MACOS_ASC_API_KEY" > "$ascApiKey" | ||
echo "ASC_API_KEY_PATH=$PWD/$ascApiKey" >> $GITHUB_ENV | ||
fi | ||
|
||
if [[ "$MACOS_CODE_SIGN_KEY_BASE64" && "$MACOS_KEYCHAIN_PASSWORD" ]]; then | ||
codesignKey='codesign.p12' | ||
echo "$MACOS_CODE_SIGN_KEY_BASE64" | base64 --decode > "$codesignKey" | ||
echo "CODE_SIGN_IDENTITY=Developer ID Application: Kodi Foundation" >> $GITHUB_ENV | ||
|
||
keychainPath='build.keychain' | ||
security create-keychain -p "$MACOS_KEYCHAIN_PASSWORD" "$keychainPath" | ||
security unlock-keychain -p "$MACOS_KEYCHAIN_PASSWORD" "$keychainPath" | ||
security default-keychain -s "$keychainPath" | ||
security import "$codesignKey" -f pkcs12 -P "" -T "$(which codesign)" "$keychainPath" | ||
security set-key-partition-list -S apple-tool:,apple: -s -k "$MACOS_KEYCHAIN_PASSWORD" "$keychainPath" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
dmgPath="$1" | ||
|
||
if [ -z "$CODE_SIGN_IDENTITY" ] ; then | ||
echo 'skip dmg signing & notarization - no code sign identity provided in CODE_SIGN_IDENTITY' | ||
exit 0 | ||
fi | ||
echo 'sign dmg' | ||
codesign --verbose=4 --force --sign "$CODE_SIGN_IDENTITY" "$dmgPath" | ||
|
||
if [[ -z "$ASC_API_KEY_PATH" || -z "$ASC_API_KEY_ID" || -z "$ASC_API_KEY_ISSUER" || -z "$ASC_TEAM_ID" ]] ; then | ||
echo 'skip dmg notarization - ASC_API_KEY_PATH / ASC_API_KEY_ID / ASC_API_KEY_ISSUER / ASC_TEAM_ID not provided' | ||
exit 0 | ||
fi | ||
echo 'notarize dmg' | ||
xcrun notarytool submit \ | ||
--verbose \ | ||
--key "$ASC_API_KEY_PATH" \ | ||
--key-id "$ASC_API_KEY_ID" \ | ||
--issuer "$ASC_API_KEY_ISSUER" \ | ||
--team-id "$ASC_TEAM_ID" \ | ||
--wait \ | ||
--timeout 30m \ | ||
"$dmgPath" | ||
xcrun stapler staple "$dmgPath" |