Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 4 additions & 22 deletions eng/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,19 @@ jobs:
- script: eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
displayName: Install native dependencies

# Run init-tools (pre-arcade dependency bootstrapping)
# TODO: replace this with an arcade equivalent
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- script: ./init-tools.sh
displayName: Init tools
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- script: .\init-tools.cmd
displayName: Init tools

# Sync
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
- script: ./Tools/dotnetcli/dotnet msbuild build.proj /p:RestoreDuringBuild=true /t:Sync
displayName: Sync
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- script: .\Tools\dotnetcli\dotnet.exe msbuild build.proj /p:RestoreDuringBuild=true /t:Sync
displayName: Sync


# Build
- ${{ if and(and(ne(parameters.archType, 'arm'), ne(parameters.archType, 'arm64')), ne(parameters.osGroup, 'Windows_NT')) }}:
- script: ./build.sh $(buildConfig) $(archType) -skipnuget -skiprestore
- script: ./build.sh $(buildConfig) $(archType) -skiptests
displayName: Build product
- ${{ if and(ne(parameters.osGroup, 'Windows_NT'), eq(parameters.archType, 'arm')) }}:
- script: ROOTFS_DIR=$(rootfsDir) CAC_ROOTFS_DIR=$(cacRootfsDir) ./build.sh $(buildConfig) $(archType) -cross -skipnuget -skiprestore
- script: ROOTFS_DIR=$(rootfsDir) CAC_ROOTFS_DIR=$(cacRootfsDir) ./build.sh $(buildConfig) $(archType) -cross -skiptests
displayName: Build product
- ${{ if and(ne(parameters.osGroup, 'Windows_NT'), eq(parameters.archType, 'arm64')) }}:
- script: ROOTFS_DIR=$(rootfsDir) ./build.sh $(buildConfig) $(archType) -cross -skipnuget -skiprestore
- script: ROOTFS_DIR=$(rootfsDir) ./build.sh $(buildConfig) $(archType) -cross -skiptests
displayName: Build product
- ${{ 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 -skiprestore
- script: set __TestIntermediateDir=int&&build.cmd $(buildConfig) $(archType) -skiptests
displayName: Build product


Expand Down
61 changes: 41 additions & 20 deletions eng/xplat-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parameters:
variables: {} ## any extra variables to add to the defaults defined below

jobs:
- template: /eng/common/templates/phases/base.yml
- template: /eng/common/templates/job/job.yml
parameters:

name: ${{ parameters.name }}
Expand All @@ -21,7 +21,7 @@ jobs:

dependsOn: ${{ parameters.dependsOn }}

queue:
pool:
${{ if and(eq(parameters.osGroup, 'Linux'), eq(variables['System.TeamProject'], 'public')) }}:
name: Hosted Ubuntu 1604
${{ if and(eq(parameters.osGroup, 'Linux'), ne(variables['System.TeamProject'], 'public')) }}:
Expand All @@ -36,8 +36,11 @@ jobs:
name: dotnet-external-temp
timeoutInMinutes: 240

${{ if ne(parameters.containerName, '') }}:
container: ${{ parameters.containerName }}
workspace:
clean: all

${{ if ne(parameters.containerName, '') }}:
container: ${{ parameters.containerName }}

${{ if eq(parameters.osGroup, 'Linux') }}:
agentOs: Ubuntu
Expand All @@ -47,24 +50,42 @@ jobs:
agentOs: Windows_NT

variables:
buildConfig: ${{ parameters.buildConfig }}
${{ if eq(parameters.buildConfig, 'checked') }}:
buildConfigUpper: 'Checked'
${{ if eq(parameters.buildConfig, 'debug') }}:
buildConfigUpper: 'Debug'
${{ if eq(parameters.buildConfig, 'release') }}:
buildConfigUpper: 'Release'
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osGroupName: ${{ parameters.osGroupName }}
- name: buildConfig
value: ${{ parameters.buildConfig }}

- ${{ if eq(parameters.buildConfig, 'checked') }}:
- name: buildConfigUpper
value: 'Checked'

- ${{ if eq(parameters.buildConfig, 'debug') }}:
- name: buildConfigUpper
value: 'Debug'

- ${{ if eq(parameters.buildConfig, 'release') }}:
- name: buildConfigUpper
value: 'Release'

- name: archType
value: ${{ parameters.archType }}

- name: osGroup
value: ${{ parameters.osGroup }}

- name: osGroupName
value: ${{ parameters.osGroupName }}

# Crossbuild specific variables.
${{ if eq(parameters.archType, 'arm') }}:
rootfsDir: /crossrootfs/arm
cacRootfsDir: /crossrootfs/x86
${{ if eq(parameters.archType, 'arm64') }}:
rootfsDir: /crossrootfs/arm64
- ${{ if eq(parameters.archType, 'arm') }}:
- name: rootfsDir
value: /crossrootfs/arm

- name: cacRootfsDir
value: /crossrootfs/x86

- ${{ if eq(parameters.archType, 'arm64') }}:
- name: rootfsDir
value: /crossrootfs/arm64

${{insert}}: ${{ parameters.variables }}
- ${{insert}}: ${{ parameters.variables }}

steps: ${{ parameters.steps }}