mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-09 09:34:49 +09:00
Define JIT format jobs as GitHub Actions instead of AzDO jobs (#103846)
This commit is contained in:
parent
7df87e8ea4
commit
98e75704a8
4 changed files with 55 additions and 90 deletions
55
.github/workflows/jit-format.yml
vendored
Normal file
55
.github/workflows/jit-format.yml
vendored
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/coreclr/jit/**'
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- name: linux
|
||||||
|
image: ubuntu-latest
|
||||||
|
container: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-cross-amd64-net9.0
|
||||||
|
extension: '.sh'
|
||||||
|
cross: '--cross'
|
||||||
|
- name: windows
|
||||||
|
image: windows-latest
|
||||||
|
extension: '.cmd'
|
||||||
|
cross: ''
|
||||||
|
runs-on: ${{ matrix.os.image }}
|
||||||
|
container: ${{ matrix.os.container }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout jitutils
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: jitutils
|
||||||
|
repository: dotnet/jitutils
|
||||||
|
ref: main
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Install .NET
|
||||||
|
uses: actions/setup-dotnet@v1
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.0.x'
|
||||||
|
- name: Build jitutils
|
||||||
|
run: |
|
||||||
|
cd jitutils
|
||||||
|
./bootstrap${{ matrix.os.extension }}
|
||||||
|
- name: Checkout runtime
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: runtime
|
||||||
|
- name: Install Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
|
||||||
|
- name: Run jitformat.py
|
||||||
|
run: |
|
||||||
|
python3 runtime/src/coreclr/scripts/jitformat.py --jitutils jitutils -r ${{ github.workspace }}/runtime -o ${{ matrix.os.name }} -a x64 ${{ matrix.os.cross }}
|
||||||
|
|
||||||
|
- name: Publish format.patch
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
path: format.patch
|
||||||
|
name: format.${{matrix.os.name}}.patch
|
||||||
|
if: failure()
|
|
@ -202,9 +202,6 @@ jobs:
|
||||||
- src/coreclr/jit/*
|
- src/coreclr/jit/*
|
||||||
- src/coreclr/pal/*
|
- src/coreclr/pal/*
|
||||||
- src/coreclr/vm/*
|
- src/coreclr/vm/*
|
||||||
- subset: coreclr_jit
|
|
||||||
include:
|
|
||||||
- src/coreclr/jit/*
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# ** WASM **
|
# ** WASM **
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
parameters:
|
|
||||||
buildConfig: ''
|
|
||||||
archType: ''
|
|
||||||
osGroup: ''
|
|
||||||
osSubgroup: ''
|
|
||||||
container: ''
|
|
||||||
crossBuild: false
|
|
||||||
timeoutInMinutes: ''
|
|
||||||
variables: {}
|
|
||||||
pool: ''
|
|
||||||
condition: true
|
|
||||||
|
|
||||||
### Format job
|
|
||||||
jobs:
|
|
||||||
- template: /eng/pipelines/common/templates/runtimes/xplat-job.yml
|
|
||||||
parameters:
|
|
||||||
buildConfig: ${{ parameters.buildConfig }}
|
|
||||||
archType: ${{ parameters.archType }}
|
|
||||||
osGroup: ${{ parameters.osGroup }}
|
|
||||||
osSubgroup: ${{ parameters.osSubgroup }}
|
|
||||||
container: ${{ parameters.container }}
|
|
||||||
crossBuild: ${{ parameters.crossBuild }}
|
|
||||||
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
|
|
||||||
name: ${{ format('format_{0}{1}_{2}', parameters.osGroup, parameters.osSubgroup, parameters.archType) }}
|
|
||||||
displayName: ${{ format('Formatting {0}{1} {2}', parameters.osGroup, parameters.osSubgroup, parameters.archType) }}
|
|
||||||
helixType: 'format'
|
|
||||||
pool: ${{ parameters.pool }}
|
|
||||||
variables:
|
|
||||||
- template: /eng/pipelines/coreclr/templates/jit-python-variables.yml
|
|
||||||
parameters:
|
|
||||||
osGroup: ${{ parameters.osGroup }}
|
|
||||||
- ${{ each variable in parameters.variables }}:
|
|
||||||
- ${{insert}}: ${{ variable }}
|
|
||||||
|
|
||||||
- ${{ if eq(parameters.osGroup, 'linux') }}:
|
|
||||||
- name: LinuxCrossArg
|
|
||||||
value: '--cross'
|
|
||||||
- ${{ if ne(parameters.osGroup, 'linux') }}:
|
|
||||||
- name: LinuxCrossArg
|
|
||||||
value: ''
|
|
||||||
|
|
||||||
condition: and(succeeded(), ${{ parameters.condition }})
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- task: UseDotNet@2
|
|
||||||
# This should match what jitutils YML uses to build.
|
|
||||||
displayName: 'Install .NET SDK'
|
|
||||||
inputs:
|
|
||||||
packageType: 'sdk'
|
|
||||||
version: '8.x'
|
|
||||||
installationPath: $(Agent.ToolsDirectory)/dotnet
|
|
||||||
|
|
||||||
- script: $(PythonSetupScript)
|
|
||||||
displayName: Enable python venv
|
|
||||||
|
|
||||||
- script: $(PythonScript) $(Build.SourcesDirectory)/src/coreclr/scripts/jitformat.py -r $(Build.SourcesDirectory) -o $(osGroup) -a $(archType) $(LinuxCrossArg)
|
|
||||||
displayName: Run jitformat.py
|
|
||||||
|
|
||||||
- task: PublishBuildArtifacts@1
|
|
||||||
displayName: Publish format.patch
|
|
||||||
inputs:
|
|
||||||
PathtoPublish: '$(Build.SourcesDirectory)/format.patch'
|
|
||||||
ArtifactName: format.$(osGroup).$(archType).patch
|
|
||||||
continueOnError: true
|
|
||||||
condition: failed()
|
|
|
@ -442,27 +442,6 @@ extends:
|
||||||
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
|
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_runtimetests.containsChange'], true),
|
||||||
eq(variables['isRollingBuild'], true))
|
eq(variables['isRollingBuild'], true))
|
||||||
|
|
||||||
#
|
|
||||||
# Build CoreCLR Formatting Job
|
|
||||||
# Only when CoreCLR is changed, and only in the 'main' branch (no release branches;
|
|
||||||
# both Rolling and PR builds).
|
|
||||||
#
|
|
||||||
- template: /eng/pipelines/common/platform-matrix.yml
|
|
||||||
parameters:
|
|
||||||
jobTemplate: /eng/pipelines/coreclr/templates/format-job.yml
|
|
||||||
platforms:
|
|
||||||
- linux_x64
|
|
||||||
- windows_x64
|
|
||||||
jobParameters:
|
|
||||||
condition: >-
|
|
||||||
and(
|
|
||||||
or(
|
|
||||||
eq(variables['Build.SourceBranchName'], 'main'),
|
|
||||||
eq(variables['System.PullRequest.TargetBranch'], 'main')),
|
|
||||||
or(
|
|
||||||
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr_jit.containsChange'], true),
|
|
||||||
eq(variables['isRollingBuild'], true)))
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Build CoreCLR with no R2R
|
# Build CoreCLR with no R2R
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue