diff options
author | Sven Boemer <sbomer@gmail.com> | 2019-01-15 11:21:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-15 11:21:05 -0800 |
commit | 35c8c4e01066e50756c04893e535777b50e6f0e0 (patch) | |
tree | 4f4ee8a7b1bd0135bda0f9409168effd07ba2022 /eng | |
parent | 9107ff1d48a2454d1ac84a8dfa97178809d8e793 (diff) | |
download | coreclr-35c8c4e01066e50756c04893e535777b50e6f0e0.tar.gz coreclr-35c8c4e01066e50756c04893e535777b50e6f0e0.tar.bz2 coreclr-35c8c4e01066e50756c04893e535777b50e6f0e0.zip |
Add freebsd official build (#21988)
* Enable freebsd build
Two different environment variables are used to tell either buildtools or arcade to use an existing SDK instead of trying to restore one. The package build project is pure msbuild (it doesn't do platform detection in any wrapper .sh files), and we don't have FreeBSD detected in msbuild, so pass the __BuildOS in from the caller.
Diffstat (limited to 'eng')
-rw-r--r-- | eng/build-job.yml | 34 | ||||
-rw-r--r-- | eng/platform-matrix.yml | 11 | ||||
-rw-r--r-- | eng/test-job.yml | 10 | ||||
-rw-r--r-- | eng/xplat-job.yml | 5 |
4 files changed, 52 insertions, 8 deletions
diff --git a/eng/build-job.yml b/eng/build-job.yml index 0808055f5a..c1e3481580 100644 --- a/eng/build-job.yml +++ b/eng/build-job.yml @@ -21,6 +21,11 @@ jobs: name: ${{ format('build_{0}_{1}_{2}', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }} displayName: ${{ format('Build {0} {1} {2}', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }} + # FreeBSD builds are disabled in the public project because we + # don't have any FreeBSD agents in the public pool. + ${{ if and(eq(parameters.osGroup, 'FreeBSD'), eq(variables['System.TeamProject'], 'public')) }}: + condition: false + # Run all steps in the container. # Note that the containers are resources defined in azure-pipelines.yml containerName: ${{ parameters.containerName }} @@ -39,6 +44,12 @@ jobs: - ${{ if in(parameters.osIdentifier, 'Linux_rhel6', 'Linux_musl') }}: - name: portableBuildArg value: '-portablebuild=false' + - name: clangArg + value: '' + # Our FreeBSD doesn't yet detect available clang versions, so pass it explicitly. + - ${{ if eq(parameters.osGroup, 'FreeBSD') }}: + - name: clangArg + value: '-clang6.0' - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}: # Variables used to publish packages to blob feed - name: dotnetfeedUrl @@ -54,8 +65,9 @@ jobs: steps: # Install native dependencies - # - # This is only required for non-docker builds. + # Linux builds use docker images with dependencies preinstalled, + # and FreeBSD builds use a build agent with dependencies + # preinstalled, so we only need this step for OSX and Windows. - ${{ if eq(parameters.osGroup, 'OSX') }}: - script: sh eng/install-native-dependencies.sh $(osGroup) displayName: Install native dependencies @@ -66,8 +78,13 @@ jobs: # Build - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - - script: ./build.sh $(buildConfig) $(archType) $(crossArg) -skiptests -skipnuget + - script: ./build.sh $(buildConfig) $(archType) $(crossArg) -skiptests -skipnuget $(clangArg) displayName: Build product + ${{ if eq(parameters.osGroup, 'FreeBSD') }}: + env: + # init-tools.sh extracts an SDK from here to the Tools/dotnetcli folder instead of trying to restore it. + # Once we are using Arcade, use DotNetCoreSdkDir instead, as we do below. + DotNetBootstrapCliTarPath: /dotnet-sdk-freebsd-x64.tar - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: # TODO: IBCOptimize? EnforcePGO? pass an OfficialBuildId? SignType? file logging parameters? - script: set __TestIntermediateDir=int&&build.cmd $(buildConfig) $(archType) -skiptests -skipbuildpackages @@ -117,11 +134,18 @@ jobs: displayName: Build packages - script: ./eng/common/build.sh /p:DotNetPublishToBlobFeed=true --ci --restore --projects $(Build.SourcesDirectory)/eng/empty.proj displayName: Restore blob feed tasks - - script: ./eng/common/msbuild.sh --ci src/publishwitharcade.proj /p:__BuildType=$(buildConfigUpper) /p:__BuildArch=$(archType) /p:OSIdentifier=$(osIdentifier) /p:AzureFeedUrl=$(dotnetfeedUrl) /p:AzureAccountKey=$(dotnetfeedPAT) + ${{ if eq(parameters.osGroup, 'FreeBSD') }}: + env: + # Arcade uses this SDK instead of trying to restore one. + DotNetCoreSdkDir: /usr/local/dotnet + - script: ./eng/common/msbuild.sh --ci src/publishwitharcade.proj /p:__BuildType=$(buildConfigUpper) /p:__BuildArch=$(archType) /p:__BuildOS=$(osGroup) /p:OSIdentifier=$(osIdentifier) /p:AzureFeedUrl=$(dotnetfeedUrl) /p:AzureAccountKey=$(dotnetfeedPAT) displayName: Publish packages to blob feed env: # TODO: remove NUGET_PACKAGES once https://github.com/dotnet/arcade/issues/1578 is fixed - NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages + NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages + ${{ if eq(parameters.osGroup, 'FreeBSD') }}: + # Arcade uses this SDK instead of trying to restore one. + DotNetCoreSdkDir: /usr/local/dotnet - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: # TODO: pass publish feed url and access token in from the internal pipeline - script: build-packages.cmd -BuildArch=$(archType) -BuildType=$(buildConfigUpper) -OfficialBuildId=$(Build.BuildNumber) diff --git a/eng/platform-matrix.yml b/eng/platform-matrix.yml index b2d23c5d8e..d727ff7c05 100644 --- a/eng/platform-matrix.yml +++ b/eng/platform-matrix.yml @@ -76,6 +76,17 @@ jobs: helixQueuesInternal: 'Debian.9.Amd64,Ubuntu.1604.Amd64,Ubuntu.1804.Amd64,Centos.7.Amd64,Fedora.28.Amd64,RedHat.7.Amd64' ${{ insert }}: ${{ parameters.jobParameters }} +# FreeBSD + +- template: ${{ parameters.jobTemplate }} + parameters: + buildConfig: ${{ parameters.buildConfig }} + archType: x64 + osGroup: FreeBSD + osIdentifier: FreeBSD + # There are no FreeBSD helix queues, so we don't run tests at the moment. + ${{ insert }}: ${{ parameters.jobParameters }} + # macOS x64 - template: ${{ parameters.jobTemplate }} diff --git a/eng/test-job.yml b/eng/test-job.yml index 09ab9f616a..82b000e8dd 100644 --- a/eng/test-job.yml +++ b/eng/test-job.yml @@ -43,7 +43,7 @@ jobs: - group: DotNet-HelixApi-Access # Map template parameters to command line arguments - ${{ if eq(parameters.priority, '1') }}: - - ${{ if or(eq(parameters.osGroup, 'Linux'), eq(parameters.osGroup, 'OSX')) }}: + - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - name: priorityArg value: 'priority1' - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: @@ -63,7 +63,11 @@ jobs: # TODO: Enable crossgen in build-test.sh. It currently doesn't # accept a crossgen arg, so disable the macos/linux crossgen test # build jobs. - ${{ if and(eq(parameters.crossgen, 'true'), or(eq(parameters.osGroup, 'Linux'), eq(parameters.osGroup, 'OSX'))) }}: + ${{ if and(eq(parameters.crossgen, 'true'), in(parameters.osGroup, 'Linux', 'OSX')) }}: + condition: false + + # FreeBSD test jobs are disabled since we don't have any FreeBSD helix queues. + ${{ if eq(parameters.osGroup, 'FreeBSD') }}: condition: false # Test job depends on the corresponding build job @@ -84,7 +88,7 @@ jobs: # Download product build from pipeline artifact storage - - ${{ if or(eq(parameters.osGroup, 'Linux'), eq(parameters.osGroup, 'OSX')) }}: + - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - task: DownloadPipelineArtifact@0 displayName: Download product build pipeline artifact inputs: diff --git a/eng/xplat-job.yml b/eng/xplat-job.yml index a59dcefefd..4bfb1ca309 100644 --- a/eng/xplat-job.yml +++ b/eng/xplat-job.yml @@ -39,6 +39,9 @@ jobs: name: Hosted Ubuntu 1604 ${{ if and(eq(parameters.osGroup, 'Linux'), ne(variables['System.TeamProject'], 'public')) }}: name: dnceng-linux-internal-temp + # FreeBSD builds only in the internal project + ${{ if and(eq(parameters.osGroup, 'FreeBSD'), ne(variables['System.TeamProject'], 'public')) }}: + name: dnceng-freebsd-internal ${{ if and(eq(parameters.osGroup, 'OSX'), ne(variables['System.TeamProject'], 'public')) }}: name: Hosted Mac Internal ${{ if and(eq(parameters.osGroup, 'OSX'), eq(variables['System.TeamProject'], 'public')) }}: @@ -56,6 +59,8 @@ jobs: ${{ if eq(parameters.osGroup, 'Linux') }}: agentOs: Ubuntu + ${{ if eq(parameters.osGroup, 'FreeBSD') }}: + agentOs: FreeBSD ${{ if eq(parameters.osGroup, 'OSX') }}: agentOs: MacOS ${{ if eq(parameters.osGroup, 'Windows_NT') }}: |