diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f31310544f..7de381f6c1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -35,10 +35,10 @@ stages: gradleOptions: '-Xmx3072m' publishJUnitResults: false tasks: 'check :ui:jpackage -Pgeneration -PjniLocation=build/OpenCVJNI -Pheadless=true -PlogTests -Pjdk14=/opt/java/jdk-14 --stacktrace' - - task: CopyFiles@2 + - task: PublishPipelineArtifact@1 inputs: - contents: 'ui/build/installer/GRIP-*.deb' - targetFolder: $(Build.ArtifactStagingDirectory) + targetPath: 'ui/build/installer' + artifactName: 'LinuxInstaller' - script: | export GH_TOKEN=$(GH_TOKEN) .azure-scripts/push-javadoc-to-gh-pages.sh @@ -46,7 +46,6 @@ stages: condition: | and(not(eq(variables['Build.Reason'], 'PullRequest')), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - - task: Gradle@2 inputs: workingDirectory: '' @@ -54,14 +53,10 @@ stages: gradleOptions: '-Xmx3072m' publishJUnitResults: false tasks: ':ui:jpackage -Pcuda -Pjdk14=/opt/java/jdk-14 --stacktrace' - - task: CopyFiles@2 + - task: PublishPipelineArtifact@1 inputs: - contents: 'ui/build/installer/GRIP-*.deb' - targetFolder: $(Build.ArtifactStagingDirectory) - - - task: PublishBuildArtifacts@1 - inputs: - artifactName: 'LinuxInstaller' + targetPath: 'ui/build/installer' + artifactName: 'LinuxInstaller-cuda' - job: Windows_64_Bit pool: @@ -95,11 +90,10 @@ stages: jdkArchitectureOption: 'x64' publishJUnitResults: true tasks: 'check :ui:jpackage -Pheadless=true -Pgeneration -PlogTests -PskipUITests -Pjdk14=..\build\jdk-14 --stacktrace' - - task: CopyFiles@2 + - task: PublishPipelineArtifact@1 inputs: - contents: 'ui\build\installer\GRIP-*.exe' - targetFolder: $(Build.ArtifactStagingDirectory) - + targetPath: 'ui/build/installer' + artifactName: 'Win64Installer' - task: Gradle@2 inputs: workingDirectory: '' @@ -107,14 +101,10 @@ stages: gradleOptions: '-Xmx3072m' publishJUnitResults: false tasks: ':ui:jpackage -Pcuda -PskipUITests -Pjdk14=..\build\jdk-14 --stacktrace' - - task: CopyFiles@2 - inputs: - contents: 'ui\build\installer\GRIP-*.exe' - targetFolder: $(Build.ArtifactStagingDirectory) - - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@1 inputs: - artifactName: 'Win64Installer' + targetPath: 'ui/build/installer' + artifactName: 'Win64Installer-cuda' - job: Windows_32_Bit pool: @@ -157,13 +147,9 @@ stages: # publishJUnitResults: false # tasks: ':ui:jpackage -Pcuda -PskipUITests -Pjdk14=..\build\jdk-14 --stacktrace' - - task: CopyFiles@2 - inputs: - contents: 'ui\build\installer\GRIP-*.exe' - targetFolder: $(Build.ArtifactStagingDirectory) - - - task: PublishBuildArtifacts@1 + - task: PublishPipelineArtifact@1 inputs: + targetPath: 'ui/build/installer' artifactName: 'Win32Installer' - job: Mac @@ -188,10 +174,10 @@ stages: jdkArchitectureOption: 'x64' publishJUnitResults: false tasks: 'check jacocoTestReport jacocoRootReport :ui:jpackage -Pheadless=true -Pgeneration -PlogTests -Pjdk14=/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/ --stacktrace' - - task: CopyFiles@2 + - task: PublishPipelineArtifact@1 inputs: - contents: 'ui/build/installer/*' - targetFolder: $(Build.ArtifactStagingDirectory) + targetPath: 'ui/build/installer' + artifactName: 'MacInstaller' - script: | curl -s https://codecov.io/bash > .codecov @@ -199,48 +185,29 @@ stages: ./.codecov -t $(CODECOV_TOKEN) displayName: 'Upload jacoco reports to codecov' - - task: Gradle@2 - inputs: - workingDirectory: '' - gradleWrapperFile: 'gradlew' - gradleOptions: '-Xmx3072m' - jdkVersionOption: '1.11' - jdkArchitectureOption: 'x64' - publishJUnitResults: false - tasks: ':ui:jpackage -Pcuda -Pjdk14=/Library/Java/JavaVirtualMachines/jdk-14.jdk/Contents/Home/ --stacktrace' - - - task: CopyFiles@2 - inputs: - contents: 'ui/build/installer/*' - targetFolder: $(Build.ArtifactStagingDirectory) - - - task: PublishBuildArtifacts@1 - inputs: - artifactName: 'MacInstaller' - -- stage: Publish - jobs: - - job: UploadGitHubRelease - - pool: - vmImage: 'Ubuntu 16.04' - - condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v') - steps: - - task: DownloadPipelineArtifact@2 - displayName: Download artifacts - inputs: - path: $(Build.ArtifactStagingDirectory) - - - task: GitHubRelease@0 - displayName: Create GitHub Release - inputs: - gitHubConnection: 'GRIP GitHub Connection' - repositoryName: $(Build.Repository.Name) - action: edit - target: $(Build.SourceVersion) - tagSource: auto - tag: $(Build.SourceBranchName) - assetUploadMode: 'replace' - isDraft: true - addChangeLog: true +- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}: + - stage: Publish + jobs: + - job: UploadGitHubRelease + + pool: + vmImage: 'Ubuntu 16.04' + + steps: + - task: DownloadPipelineArtifact@2 + displayName: Download artifacts + inputs: + path: $(Build.ArtifactStagingDirectory) + + - task: GitHubRelease@0 + displayName: Create GitHub Release + inputs: + gitHubConnection: 'GRIP GitHub Connection' + repositoryName: $(Build.Repository.Name) + action: edit + target: $(Build.SourceVersion) + tagSource: auto + tag: $(Build.SourceBranchName) + assetUploadMode: 'replace' + isDraft: true + addChangeLog: true diff --git a/ui/ui.gradle.kts b/ui/ui.gradle.kts index 4ffea4c4fa..23e89d52ba 100644 --- a/ui/ui.gradle.kts +++ b/ui/ui.gradle.kts @@ -281,7 +281,7 @@ tasks.register("jpackage") { val projectVersion = "${project.version}" applicationVersion.set(projectVersion.drop(1).takeWhile { it != '-' }) // 'v1.5.2-abfa51a' -> '1.5.2' - fullApplicationVersion.set(projectVersion) + fullApplicationVersion.set(projectVersion + "-" + osdetector.classifier) copyright.set("Copyright (c) 2015-2019 WPI") licenseFile.set(rootDir.resolve("LICENSE.txt")) applicationVendor.set("Worcester Polytechnic Institute")