diff options
-rw-r--r-- | .ci/templates/job-get-latest-uhd-docker.yml | 7 | ||||
-rw-r--r-- | .ci/templates/job-uhd-build-src.yml | 32 | ||||
-rw-r--r-- | .ci/templates/stages-uhd-pipeline.yml | 3 | ||||
-rw-r--r-- | .ci/templates/steps-build-uhd-make-homebrew-macos.yml | 29 | ||||
-rw-r--r-- | .ci/uhd-build-docker-container.yml | 5 |
5 files changed, 69 insertions, 7 deletions
diff --git a/.ci/templates/job-get-latest-uhd-docker.yml b/.ci/templates/job-get-latest-uhd-docker.yml index a6b712fb0..ad46db9b0 100644 --- a/.ci/templates/job-get-latest-uhd-docker.yml +++ b/.ci/templates/job-get-latest-uhd-docker.yml @@ -7,6 +7,7 @@ # $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixLin'] ] # $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixWin'] ] # $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixUbuntuDeb'] ] +# $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.macOSBuilders'] ] jobs: - job: get_latest_uhd_docker displayName: Get Last Docker Build Version @@ -17,6 +18,9 @@ jobs: - checkout: none - download: uhd_build_docker_container displayName: Download Docker Image List + # The following script pulls each line from the DockerImageNames + # file and variablizes them in the AzDO Pipeline Context. + # sed '1q;d' pulls the first line, sed '2q;d' pulls the second, etc. - script: | cd $(Pipeline.Workspace)/uhd_build_docker_container/ docker_build_number=$(sed '1q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName)) @@ -24,11 +28,13 @@ jobs: docker_image_matrix_lin=$(sed '3q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName)) docker_image_matrix_win=$(sed '4q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName)) docker_image_matrix_ubuntu_deb=$(sed '5q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName)) + macos_builders=$(sed '6q;d' $(UHDPipelineDockerImageArtifactName)/$(UHDPipelineDockerImageArtifactName)) echo "##vso[task.setvariable variable=dockerBuildNumber;isOutput=true;]$docker_build_number" echo "##vso[task.setvariable variable=dockerImagePrefix;isOutput=true;]$docker_image_prefix" echo "##vso[task.setvariable variable=dockerImageMatrixLin;isOutput=true;]$docker_image_matrix_lin" echo "##vso[task.setvariable variable=dockerImageMatrixWin;isOutput=true;]$docker_image_matrix_win" echo "##vso[task.setvariable variable=dockerImageMatrixUbuntuDeb;isOutput=true;]$docker_image_matrix_ubuntu_deb" + echo "##vso[task.setvariable variable=macOSBuilders;isOutput=true;]$macos_builders" name: setDockerVar - script: | echo "Docker Build Number: " @@ -37,4 +43,5 @@ jobs: echo $(setDockerVar.dockerImageMatrixLin) echo $(setDockerVar.dockerImageMatrixWin) echo $(setDockerVar.dockerImageMatrixUbuntuDeb) + echo $(setDockerVar.macOSBuilders) name: echoDockerVar 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 diff --git a/.ci/templates/stages-uhd-pipeline.yml b/.ci/templates/stages-uhd-pipeline.yml index a67dbed97..462f73026 100644 --- a/.ci/templates/stages-uhd-pipeline.yml +++ b/.ci/templates/stages-uhd-pipeline.yml @@ -47,6 +47,9 @@ stages: parameters: toolset: msbuild release_binaries: ${{ parameters.release_binaries }} + - template: job-uhd-build-src.yml + parameters: + toolset: make_homebrew_macos - ${{ if parameters.custom_boost_version }}: - template: job-uhd-build-src.yml diff --git a/.ci/templates/steps-build-uhd-make-homebrew-macos.yml b/.ci/templates/steps-build-uhd-make-homebrew-macos.yml new file mode 100644 index 000000000..629e56212 --- /dev/null +++ b/.ci/templates/steps-build-uhd-make-homebrew-macos.yml @@ -0,0 +1,29 @@ +parameters: +- name: uhdSrcDir + type: string +- name: uhdBuildDir + type: string + +steps: +- script: | + pyenv exec python3 -m venv ${{ parameters.uhdBuildDir }}/pyenv + source ${{ parameters.uhdBuildDir }}/pyenv/bin/activate + python3 -m pip install mako + displayName: Install python UHD deps + +- script: | + mkdir -p ${{ parameters.uhdBuildDir }} + cd ${{ parameters.uhdBuildDir }} + source ${{ parameters.uhdBuildDir }}/pyenv/bin/activate + cmake ${{ parameters.uhdSrcDir }}/host + displayName: cmake homebrew macOS UHD + +- script: | + source ${{ parameters.uhdBuildDir }}/pyenv/bin/activate + cd ${{ parameters.uhdBuildDir }} + make -j$(sysctl -n hw.ncpu) -k + displayName: make homebrew macOS UHD + +- script: | + rm -rf ${{ parameters.uhdBuildDir }}/pyenv + displayName: Delete venv diff --git a/.ci/uhd-build-docker-container.yml b/.ci/uhd-build-docker-container.yml index 9a3e5082f..bbf0d4c61 100644 --- a/.ci/uhd-build-docker-container.yml +++ b/.ci/uhd-build-docker-container.yml @@ -55,6 +55,10 @@ variables: "{'Ubuntu-1804-builder':{'dockerOSName':'ubuntu1804','dockerImageName':'uhd-builder-ubuntu1804','ubuntuReleaseName':'bionic'}, 'Ubuntu-2004-builder':{'dockerOSName':'ubuntu2004','dockerImageName':'uhd-builder-ubuntu2004','ubuntuReleaseName':'focal'}}" +- name: macOSBuilders + value: + "{'macOS-1014-x64':{'buildOSName':'macOS-1014-x64', 'macOSVersionDemand':'10.14', 'macOSArchDemand': 'X64'}}" + - name: dockerImagePrefix value: 'rfsdr/' @@ -199,6 +203,7 @@ jobs: echo "${{ variables.linuxDockerImages }}" >> $(UHDPipelineDockerImageArtifactName) echo "${{ variables.winDockerImages }}" >> $(UHDPipelineDockerImageArtifactName) echo "${{ variables.ubuntuDebDockerImages }}" >> $(UHDPipelineDockerImageArtifactName) + echo "${{ variables.macOSBuilders }}" >> $(UHDPipelineDockerImageArtifactName) displayName: Generate created image list - task: PublishPipelineArtifact@1 inputs: |