mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Add an azure pipelines job to compile the macos version with qt6
This commit is contained in:
parent
52fe8683bb
commit
894ba18ffd
@ -86,7 +86,53 @@ jobs:
|
|||||||
# MacOS
|
# MacOS
|
||||||
#
|
#
|
||||||
|
|
||||||
- job: MacOS
|
- job: MacOS_qt6
|
||||||
|
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: |
|
||||||
|
brew install qt
|
||||||
|
brew link qt --force
|
||||||
|
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/p7zip_16.02_src_all.tar.bz2?raw=true" -O $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02_src_all.tar.bz2
|
||||||
|
tar xjf $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02_src_all.tar.bz2 -C $(Build.SourcesDirectory)/compressed_archive
|
||||||
|
mv $(Build.SourcesDirectory)/compressed_archive/p7zip_16.02 $(Build.SourcesDirectory)/compressed_archive/libp7zip
|
||||||
|
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
|
||||||
|
displayName: 'Build'
|
||||||
|
- script: |
|
||||||
|
cd $(Build.SourcesDirectory)/tests
|
||||||
|
qmake
|
||||||
|
make check TESTARGS="-maxwarnings 100000"
|
||||||
|
displayName: 'Build and run tests'
|
||||||
|
- task: CopyFiles@2
|
||||||
|
inputs:
|
||||||
|
contents: '*.dmg'
|
||||||
|
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||||
|
- task: PublishPipelineArtifact@1
|
||||||
|
inputs:
|
||||||
|
path: $(Build.ArtifactStagingDirectory)
|
||||||
|
artifactName: Macos qt6 $(Build.BuildNumber) dmg
|
||||||
|
|
||||||
|
- job: MacOS
|
||||||
dependsOn: CodeFormatValidation
|
dependsOn: CodeFormatValidation
|
||||||
variables:
|
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'))) }}:
|
- ${{ 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'))) }}:
|
||||||
@ -186,6 +232,7 @@ jobs:
|
|||||||
dependsOn:
|
dependsOn:
|
||||||
- Linux
|
- Linux
|
||||||
- MacOS
|
- MacOS
|
||||||
|
- MacOS_qt6
|
||||||
- Windows_x86
|
- Windows_x86
|
||||||
- Windows_x64
|
- Windows_x64
|
||||||
- Windows_x64_qt6
|
- Windows_x64_qt6
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
VERSION=${1:-"9.5.0"}
|
VERSION=${1:-"9.9.1"}
|
||||||
|
|
||||||
BUILD_NUMBER=${2:-"0"}
|
BUILD_NUMBER=${2:-"0"}
|
||||||
|
|
||||||
SKIP_CODESIGN=${3:-false}
|
SKIP_CODESIGN=${3:-false}
|
||||||
|
|
||||||
|
QT_VERSION=${4:-""}
|
||||||
|
|
||||||
if [ "$4" == "clean" ]; then
|
if [ "$4" == "clean" ]; then
|
||||||
./cleanOSX.sh
|
./cleanOSX.sh
|
||||||
fi
|
fi
|
||||||
@ -74,7 +76,7 @@ fi
|
|||||||
echo "Preparing apps for release, Done."
|
echo "Preparing apps for release, Done."
|
||||||
|
|
||||||
echo "Copying to destination folder"
|
echo "Copying to destination folder"
|
||||||
dest="YACReader-$VERSION.$BUILD_NUMBER MacOSX-Intel"
|
dest="YACReader-$VERSION.$BUILD_NUMBER MacOSX-Intel$QT_VERSION"
|
||||||
mkdir -p "$dest"
|
mkdir -p "$dest"
|
||||||
cp -R YACReader.app "${dest}/YACReader.app"
|
cp -R YACReader.app "${dest}/YACReader.app"
|
||||||
cp -R YACReaderLibrary.app "${dest}/YACReaderLibrary.app"
|
cp -R YACReaderLibrary.app "${dest}/YACReaderLibrary.app"
|
||||||
|
Loading…
Reference in New Issue
Block a user