-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Android cross-compiler (#43535)
Produce cross compilers for Android targets, from Linux x64 and OSX x64 hosts. This should be reasonably solid groundwork for adding more targets and more hosts for cross-compile scenarios.
- Loading branch information
Showing
23 changed files
with
399 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
parameters: | ||
buildConfig: 'Debug' | ||
osGroup: '' | ||
platform: '' | ||
container: '' | ||
timeoutInMinutes: '' | ||
variables: {} | ||
pool: '' | ||
condition: true | ||
isOfficialBuild: false | ||
|
||
### Product build | ||
jobs: | ||
- template: xplat-pipeline-job.yml | ||
parameters: | ||
buildConfig: ${{ parameters.buildConfig }} | ||
osGroup: ${{ parameters.osGroup }} | ||
helixType: 'build/product/' | ||
enableMicrobuild: true | ||
pool: ${{ parameters.pool }} | ||
condition: ${{ parameters.condition }} | ||
|
||
${{ if eq(parameters.useCheckoutBundle, true) }}: | ||
dependsOn: checkout | ||
|
||
# Compute job name from template parameters | ||
name: ${{ format('mono_{0}_offsets', parameters.osGroup) }} | ||
displayName: ${{ format('Mono {0} AOT offsets', parameters.osGroup) }} | ||
|
||
# Run all steps in the container. | ||
# Note that the containers are defined in platform-matrix.yml | ||
container: ${{ parameters.container }} | ||
|
||
timeoutInMinutes: ${{ parameters.timeoutInMinutes }} | ||
|
||
gatherAssetManifests: true | ||
variables: | ||
- name: osGroup | ||
value: ${{ parameters.osGroup }} | ||
- name: officialBuildIdArg | ||
value: '' | ||
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}: | ||
- name: officialBuildIdArg | ||
value: '/p:officialBuildId=$(Build.BuildNumber)' | ||
- name: osOverride | ||
value: -os Linux | ||
- name: archType | ||
value: x64 | ||
- ${{ parameters.variables }} | ||
|
||
steps: | ||
|
||
# Install native dependencies | ||
# 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 in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}: | ||
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO | ||
displayName: Install native dependencies | ||
- ${{ if eq(parameters.osGroup, 'windows') }}: | ||
# Necessary to install python | ||
- script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force | ||
displayName: Install native dependencies | ||
|
||
# Build | ||
- ${{ if ne(parameters.osGroup, 'windows') }}: | ||
- script: ./build$(scriptExt) -subset mono.aotcross -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) /p:MonoGenerateOffsetsOnly=true | ||
displayName: Generate AOT offsets | ||
- ${{ if eq(parameters.osGroup, 'windows') }}: | ||
- script: build$(scriptExt) -subset mono.aotcross -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) /p:MonoGenerateOffsetsOnly=true | ||
displayName: Generate AOT offsets | ||
|
||
# Upload offset files | ||
- task: CopyFiles@2 | ||
displayName: Collect offset files | ||
inputs: | ||
sourceFolder: '$(Build.SourcesDirectory)/artifacts/obj/mono/' | ||
contents: '**/offsets-*.h' | ||
targetFolder: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles/' | ||
|
||
- task: PublishPipelineArtifact@1 | ||
displayName: Upload offset files | ||
inputs: | ||
targetPath: '$(Build.SourcesDirectory)/artifacts/obj/mono/offsetfiles' | ||
artifactName: 'Mono_Offsets_$(osGroup)' | ||
|
||
# Publish Logs | ||
- task: PublishPipelineArtifact@1 | ||
displayName: Publish Logs | ||
inputs: | ||
targetPath: $(Build.SourcesDirectory)/artifacts/log | ||
artifactName: 'BuildLogs_Mono_Offsets_$(osGroup)' | ||
continueOnError: true | ||
condition: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.