trigger: batch: true branches: include: - release/11.x pr: branches: include: - release/11.x variables: - template: eng/common-variables.yml stages: - stage: build displayName: Build jobs: - template: /eng/common/templates/jobs/jobs.yml parameters: enablePublishBuildArtifacts: true enablePublishBuildAssets: true enablePublishUsingPipelines: true variables: - _BuildConfig: Release jobs: ############ LINUX BUILD ############ - job: Build_Linux displayName: Linux timeoutInMinutes: 180 strategy: matrix: x64: assetManifestOS: linux assetManifestPlatform: x64 imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-bfcd90a-20200121150017 rootfs: archflag: --arch x64 LLVMTableGenArg: ClangTableGenArg: arm64: assetManifestOS: linux assetManifestPlatform: arm64 imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-arm64-cfdd435-20200121150126 rootfs: /crossrootfs/arm64 archflag: --arch arm64 LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/llvm-tblgen ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/clang-tblgen arm: assetManifestOS: linux assetManifestPlatform: arm imagename: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-cross-09ec757-20200320131433 rootfs: /crossrootfs/arm archflag: --arch arm LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/llvm-tblgen ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/clang-tblgen pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: vmImage: ubuntu-20.04 ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: NetCore1ESPool-Internal demands: ImageOverride -equals Build.Ubuntu.1804.Amd64 container: image: $(imagename) steps: - bash: | set -ex git clean -ffdx git reset --hard HEAD displayName: 'Clean up working directory' - bash: | ./build.sh --ci --restore --build --arch x64 -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:BuildLLVMTableGenOnly=true displayName: 'Build host llvm-tblgen for cross-compiling' condition: and(succeeded(), ne(variables['assetManifestPlatform'], 'x64')) - bash: | ./build.sh --ci --restore --build --pack $(archflag) --configuration $(_BuildConfig) $(_InternalBuildArgs) $(LLVMTableGenArg) $(ClangTableGenArg) displayName: 'Build and package' env: ROOTFS_DIR: $(rootfs) - bash: | ./eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) --projects $(Build.SourcesDirectory)/llvm.proj displayName: Publish packages condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) ############ MACOS BUILD ############ - job: Build_macOS displayName: macOS timeoutInMinutes: 180 strategy: matrix: x64: assetManifestOS: osx assetManifestPlatform: x64 archflag: --arch x64 LLVMTableGenArg: ClangTableGenArg: arm64: assetManifestOS: osx assetManifestPlatform: arm64 archflag: --arch arm64 LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/llvm-tblgen ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)/artifacts/obj/BuildRoot-x64/bin/clang-tblgen pool: vmImage: macOS-10.15 steps: - bash: | set -ex git clean -ffdx git reset --hard HEAD displayName: 'Clean up working directory' - bash: | ./build.sh --ci --restore --build --arch x64 -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:BuildLLVMTableGenOnly=true displayName: 'Build host llvm-tblgen for cross-compiling' condition: and(succeeded(), ne(variables['assetManifestPlatform'], 'x64')) - bash: | ./build.sh --ci --restore --build --pack $(archflag) --configuration $(_BuildConfig) $(_InternalBuildArgs) $(LLVMTableGenArg) $(ClangTableGenArg) displayName: 'Build and package' - bash: ./eng/common/build.sh --ci --restore --publish --configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) --projects $(Build.SourcesDirectory)/llvm.proj displayName: Publish packages condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) ############ WINDOWS BUILD ############ - job: Build_Windows displayName: Windows timeoutInMinutes: 180 strategy: matrix: x64: assetManifestOS: win assetManifestPlatform: x64 archflag: -arch x64 LLVMTableGenArg: ClangTableGenArg: arm64: assetManifestOS: win assetManifestPlatform: arm64 archflag: -arch arm64 LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\llvm-tblgen.exe ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\clang-tblgen.exe arm: assetManifestOS: win assetManifestPlatform: arm archflag: -arch arm LLVMTableGenArg: /p:LLVMTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\llvm-tblgen.exe ClangTableGenArg: /p:ClangTableGenPath=$(Build.SourcesDirectory)\artifacts\obj\BuildRoot-x64\bin\clang-tblgen.exe pool: ${{ if eq(variables['System.TeamProject'], 'public') }}: name: NetCore1ESPool-Public demands: ImageOverride -equals Build.Windows.Amd64.VS2022.Pre.Open ${{ if eq(variables['System.TeamProject'], 'internal') }}: name: NetCore1ESPool-Internal demands: ImageOverride -equals Build.Windows.Amd64.VS2022.Pre steps: - script: | git clean -ffdx git reset --hard HEAD displayName: 'Clean up working directory' - powershell: eng\build.ps1 -ci -restore -build -arch x64 -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:BuildLLVMTableGenOnly=true displayName: 'Build host llvm-tblgen for cross-compiling' condition: and(succeeded(), ne(variables['assetManifestPlatform'], 'x64')) - powershell: eng\build.ps1 -ci -restore -build -pack $(archflag) -configuration $(_BuildConfig) $(_InternalBuildArgs) $(LLVMTableGenArg) $(ClangTableGenArg) displayName: 'Build and package' - powershell: eng\common\build.ps1 -ci -restore -publish -configuration $(_BuildConfig) $(_InternalBuildArgs) /p:AssetManifestOS=$(assetManifestOS) /p:PlatformName=$(assetManifestPlatform) -projects $(Build.SourcesDirectory)\llvm.proj displayName: Publish packages condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) ############ POST BUILD ARCADE LOGIC ############ - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: - template: /eng/common/templates/post-build/post-build.yml parameters: publishingInfraVersion: 3 enableSourceLinkValidation: false enableSigningValidation: false enableSymbolValidation: false enableNugetValidation: true