diff options
author | Steven Koo <steven.koo@ni.com> | 2021-12-16 11:17:57 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-01-06 15:10:53 -0600 |
commit | f0ae43ad740335771b4c48a37b92b6f4b38f766a (patch) | |
tree | 6928ad7d8e576af7d0a31998a8a19958c8b14943 /.ci/templates/job-uhd-build-src.yml | |
parent | d0bd9f174195f9baca4c383b4c98acef983f0f88 (diff) | |
download | uhd-f0ae43ad740335771b4c48a37b92b6f4b38f766a.tar.gz uhd-f0ae43ad740335771b4c48a37b92b6f4b38f766a.tar.bz2 uhd-f0ae43ad740335771b4c48a37b92b6f4b38f766a.zip |
ci: build on macOS
This adds macOS build support using homebrew
Signed-off-by: Steven Koo <steven.koo@ni.com>
Diffstat (limited to '.ci/templates/job-uhd-build-src.yml')
-rw-r--r-- | .ci/templates/job-uhd-build-src.yml | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/.ci/templates/job-uhd-build-src.yml b/.ci/templates/job-uhd-build-src.yml index ea3abbede..176b1d2e9 100644 --- a/.ci/templates/job-uhd-build-src.yml +++ b/.ci/templates/job-uhd-build-src.yml @@ -7,6 +7,7 @@ parameters: - make_trace - ninja - msbuild + - make_homebrew_macos - name: 'custom_boost_version_url' type: string default: 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2' @@ -25,17 +26,23 @@ jobs: dockerImageMatrixLin: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixLin'] ] dockerImageMatrixWin: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixWin'] ] dockerImageMatrixUbuntuDeb: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixUbuntuDeb'] ] + macOSBuilders: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.macOSBuilders'] ] pool: ${{ if eq(parameters.toolset, 'msbuild') }}: name: de-dre-lab ${{ if ne(parameters.toolset, 'msbuild') }}: name: Drivers-NIBuildFarm-RFMIBUILD demands: - - docker - ${{ if eq(parameters.toolset, 'msbuild') }}: + - docker - Agent.OS -equals Windows_NT - - ${{ if ne(parameters.toolset, 'msbuild') }}: + - ${{ if or(eq(parameters.toolset, 'make'), eq(parameters.toolset, 'make_trace'), eq(parameters.toolset, 'ninja'), eq(parameters.toolset, 'make_custom_boost_version')) }}: + - docker - Agent.OS -equals Linux + - ${{ if eq(parameters.toolset, 'make_homebrew_macos') }}: + - Agent.OS -equals Darwin + - Agent.OSVersion -equals $(macOSVersionDemand) + - Agent.OSArchitecture -equals $(macOSArchDemand) workspace: clean: outputs strategy: @@ -43,9 +50,12 @@ jobs: matrix: $[ variables.dockerImageMatrixWin ] ${{ if or(eq(parameters.toolset, 'make'), eq(parameters.toolset, 'make_trace'), eq(parameters.toolset, 'ninja'), eq(parameters.toolset, 'make_custom_boost_version')) }}: matrix: $[ variables.dockerImageMatrixLin ] - container: - image: '$(dockerImagePrefix)$(DockerImageName):$(dockerBuildNumber)' - endpoint: 'Docker / Artifactory - rnd-builds-local' + ${{ if eq(parameters.toolset, 'make_homebrew_macos') }}: + matrix: $[ variables.macOSBuilders ] + ${{ if ne(parameters.toolset, 'make_homebrew_macos') }}: + container: + image: '$(dockerImagePrefix)$(DockerImageName):$(dockerBuildNumber)' + endpoint: 'Docker / Artifactory - rnd-builds-local' steps: - checkout: self clean: true @@ -65,6 +75,12 @@ jobs: uhdBuildDir: $(Build.BinariesDirectory)/uhddev/build uhdEnableTraceLog: true + - ${{ if eq(parameters.toolset, 'make_homebrew_macos') }}: + - template: steps-build-uhd-make-homebrew-macos.yml + parameters: + uhdSrcDir: ../../../s + uhdBuildDir: $(Build.BinariesDirectory)/uhddev/build + - ${{ if eq(parameters.toolset, 'ninja') }}: - template: steps-build-uhd-ninja.yml parameters: @@ -118,6 +134,7 @@ jobs: sourceFolder: $(Build.BinariesDirectory)/uhddev/ contents: build/Testing/** targetFolder: $(Common.TestResultsDirectory) + condition: and(succeeded(), ne('${{ parameters.toolset }}', 'make_homebrew_macos')) displayName: Copy ${{ parameters.toolset }} ctest results - task: PublishTestResults@2 @@ -125,5 +142,6 @@ jobs: testResultsFormat: cTest testResultsFiles: $(Common.TestResultsDirectory)/build/Testing/**/Test.xml failTaskOnFailedTests: true - testRunTitle: uhd ctest $(dockerOSName)-${{ parameters.toolset }} - displayName: Publish $(dockerOSName)-${{ parameters.toolset }} ctest results + testRunTitle: uhd ctest $(buildOSName)-${{ parameters.toolset }} + condition: and(succeeded(), ne('${{ parameters.toolset }}', 'make_homebrew_macos')) + displayName: Publish $(buildOSName)-${{ parameters.toolset }} ctest results |