mirror of
https://github.com/YACReader/yacreader
synced 2025-05-27 19:00:29 -04:00
Replace qt6 builds in macos with a universal build
This commit is contained in:
parent
fe1a980983
commit
56b1e20aef
@ -141,10 +141,10 @@ jobs:
|
|||||||
displayName: 'Run tests'
|
displayName: 'Run tests'
|
||||||
|
|
||||||
#
|
#
|
||||||
# MacOS qt6(intel)
|
# MacOS Qt6(universal)
|
||||||
#
|
#
|
||||||
|
|
||||||
- job: MacOS_qt6_Intel
|
- job: MacOS_qt6_Universal
|
||||||
timeoutInMinutes: 90
|
timeoutInMinutes: 90
|
||||||
dependsOn: CodeFormatValidation
|
dependsOn: CodeFormatValidation
|
||||||
variables:
|
variables:
|
||||||
@ -175,66 +175,7 @@ jobs:
|
|||||||
VERSION="$(cat common/yacreader_global.h | grep '#define VERSION "' | tr -d '#define VERSION' | tr -d '"' )"
|
VERSION="$(cat common/yacreader_global.h | grep '#define VERSION "' | tr -d '#define VERSION' | tr -d '"' )"
|
||||||
echo "Trying to know if we are in a forked repo: $IS_FORK"
|
echo "Trying to know if we are in a forked repo: $IS_FORK"
|
||||||
SKIP_CODESIGN="$(tr [A-Z] [a-z] <<< "$IS_FORK")"
|
SKIP_CODESIGN="$(tr [A-Z] [a-z] <<< "$IS_FORK")"
|
||||||
./compileOSX.sh $VERSION $(Build.BuildNumber) $SKIP_CODESIGN Qt6 x86_64
|
./compileOSX.sh $VERSION $(Build.BuildNumber) $SKIP_CODESIGN Qt6 universal
|
||||||
displayName: 'Build'
|
|
||||||
- script: |
|
|
||||||
cd $(Build.SourcesDirectory)/tests
|
|
||||||
qmake
|
|
||||||
make check TESTARGS="-maxwarnings 100000"
|
|
||||||
displayName: 'Build and run tests'
|
|
||||||
- script: |
|
|
||||||
SKIP_CODESIGN="$(tr [A-Z] [a-z] <<< "$IS_FORK")"
|
|
||||||
if [ "$SKIP_CODESIGN" = false ]; then
|
|
||||||
xcrun notarytool submit *.dmg --apple-id $(AppleId) --team-id $(TeamId) --password $(AppPassword) --wait
|
|
||||||
xcrun stapler staple *.dmg
|
|
||||||
fi
|
|
||||||
displayName: 'Notarize'
|
|
||||||
- task: CopyFiles@2
|
|
||||||
inputs:
|
|
||||||
contents: '*.dmg'
|
|
||||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
|
||||||
- task: PublishPipelineArtifact@1
|
|
||||||
inputs:
|
|
||||||
path: $(Build.ArtifactStagingDirectory)
|
|
||||||
artifactName: Macos qt6 Intel $(Build.BuildNumber) dmg
|
|
||||||
|
|
||||||
#
|
|
||||||
# MacOS qt6(apple)
|
|
||||||
#
|
|
||||||
|
|
||||||
#TODO create a template
|
|
||||||
- job: MacOS_qt6_Apple
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
dependsOn: CodeFormatValidation
|
|
||||||
variables:
|
|
||||||
- ${{ if and(eq(variables['System.TeamFoundationCollectionUri'], 'https://dev.azure.com/luisangelsm/'), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))) }}:
|
|
||||||
- group: macos-codesign
|
|
||||||
pool:
|
|
||||||
vmImage: 'macOS-latest'
|
|
||||||
steps:
|
|
||||||
- script: |
|
|
||||||
pip3 install aqtinstall
|
|
||||||
python3 -m aqt install 6.3.1 mac desktop -m qt5compat qtmultimedia qtimageformats
|
|
||||||
echo '##vso[task.prependpath]$(Build.SourcesDirectory)/6.3.1/macos/bin'
|
|
||||||
brew install create-dmg
|
|
||||||
brew install node
|
|
||||||
brew link --overwrite node
|
|
||||||
npm install -g appdmg
|
|
||||||
mkdir $(Build.SourcesDirectory)\compressed_archive
|
|
||||||
wget "https://github.com/YACReader/yacreader-7z-deps/blob/main/7z2301-src.7z?raw=true" -O $(Build.SourcesDirectory)/compressed_archive/7z2301-src.7z
|
|
||||||
7z x $(Build.SourcesDirectory)/compressed_archive/7z2301-src.7z -o$(Build.SourcesDirectory)/compressed_archive/lib7zip
|
|
||||||
displayName: 'Install dependencies'
|
|
||||||
- ${{ if and(eq(variables['System.TeamFoundationCollectionUri'], 'https://dev.azure.com/luisangelsm/'), or(eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))) }}:
|
|
||||||
- task: InstallAppleCertificate@2
|
|
||||||
inputs:
|
|
||||||
certSecureFile: 'developerID_application.p12'
|
|
||||||
certPwd: $(P12Password)
|
|
||||||
- script: |
|
|
||||||
cd $(Build.SourcesDirectory)
|
|
||||||
VERSION="$(cat common/yacreader_global.h | grep '#define VERSION "' | tr -d '#define VERSION' | tr -d '"' )"
|
|
||||||
echo "Trying to know if we are in a forked repo: $IS_FORK"
|
|
||||||
SKIP_CODESIGN="$(tr [A-Z] [a-z] <<< "$IS_FORK")"
|
|
||||||
./compileOSX.sh $VERSION $(Build.BuildNumber) $SKIP_CODESIGN Qt6 arm64
|
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
- script: |
|
- script: |
|
||||||
cd $(Build.SourcesDirectory)/tests
|
cd $(Build.SourcesDirectory)/tests
|
||||||
@ -370,8 +311,7 @@ jobs:
|
|||||||
- Linux_qt6
|
- Linux_qt6
|
||||||
- Linux_qt6_7zip
|
- Linux_qt6_7zip
|
||||||
- MacOS
|
- MacOS
|
||||||
- MacOS_qt6_Apple
|
- MacOS_qt6_Universal
|
||||||
- MacOS_qt6_Intel
|
|
||||||
- Windows_x86
|
- Windows_x86
|
||||||
- Windows_x64
|
- Windows_x64
|
||||||
- Windows_x64_qt6
|
- Windows_x64_qt6
|
||||||
@ -413,8 +353,7 @@ jobs:
|
|||||||
- Linux_qt6
|
- Linux_qt6
|
||||||
- Linux_qt6_7zip
|
- Linux_qt6_7zip
|
||||||
- MacOS
|
- MacOS
|
||||||
- MacOS_qt6_Apple
|
- MacOS_qt6_Universal
|
||||||
- MacOS_qt6_Intel
|
|
||||||
- Windows_x86
|
- Windows_x86
|
||||||
- Windows_x64
|
- Windows_x64
|
||||||
- Windows_x64_qt6
|
- Windows_x64_qt6
|
||||||
|
@ -17,13 +17,10 @@ if [ "$6" == "clean" ]; then
|
|||||||
./cleanOSX.sh
|
./cleanOSX.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ARCH" == "arm64" ]; then
|
if [ "$ARCH" == "x86_64" ]; then
|
||||||
ARCH_NAME="Apple"
|
|
||||||
elif [ "$ARCH" == "x86_64" ]; then
|
|
||||||
ARCH_NAME="Intel"
|
ARCH_NAME="Intel"
|
||||||
else
|
elif [ "$ARCH" == "x86_64" ]; then
|
||||||
echo "Unknown arch: $ARCH"
|
ARCH_NAME="U"
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Building for $ARCH_NAME"
|
echo "Building for $ARCH_NAME"
|
||||||
@ -32,19 +29,19 @@ hash qmake 2>/dev/null || { echo >&2 "Qmake command not available. Please add th
|
|||||||
|
|
||||||
echo "Compiling YACReader"
|
echo "Compiling YACReader"
|
||||||
cd YACReader
|
cd YACReader
|
||||||
qmake DEFINES+="BUILD_NUMBER=\\\\\\\"${BUILD_NUMBER}\\\\\\\"" QMAKE_APPLE_DEVICE_ARCHS="${ARCH}"
|
qmake DEFINES+="BUILD_NUMBER=\\\\\\\"${BUILD_NUMBER}\\\\\\\"" QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64"
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo "Compiling YACReaderLibrary"
|
echo "Compiling YACReaderLibrary"
|
||||||
cd YACReaderLibrary
|
cd YACReaderLibrary
|
||||||
qmake DEFINES+="BUILD_NUMBER=\\\\\\\"${BUILD_NUMBER}\\\\\\\"" QMAKE_APPLE_DEVICE_ARCHS="${ARCH}"
|
qmake DEFINES+="BUILD_NUMBER=\\\\\\\"${BUILD_NUMBER}\\\\\\\"" QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64"
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo "Compiling YACReaderLibraryServer"
|
echo "Compiling YACReaderLibraryServer"
|
||||||
cd YACReaderLibraryServer
|
cd YACReaderLibraryServer
|
||||||
qmake DEFINES+="BUILD_NUMBER=\\\\\\\"${BUILD_NUMBER}\\\\\\\"" QMAKE_APPLE_DEVICE_ARCHS="${ARCH}"
|
qmake DEFINES+="BUILD_NUMBER=\\\\\\\"${BUILD_NUMBER}\\\\\\\"" QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64"
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
@ -87,7 +84,7 @@ fi
|
|||||||
|
|
||||||
echo "Preparing apps for release, Done."
|
echo "Preparing apps for release, Done."
|
||||||
|
|
||||||
dest="YACReader-$VERSION.$BUILD_NUMBER MacOSX-$ARCH_NAME ${QT_VERSION}"
|
dest="YACReader-$VERSION.$BUILD_NUMBER MacOSX $ARCH_NAME ${QT_VERSION}"
|
||||||
echo "Copying to destination folder ${dest}"
|
echo "Copying to destination folder ${dest}"
|
||||||
mkdir -p "$dest"
|
mkdir -p "$dest"
|
||||||
cp -R YACReader.app "${dest}/YACReader.app"
|
cp -R YACReader.app "${dest}/YACReader.app"
|
||||||
|
Loading…
Reference in New Issue
Block a user