Skip to content

Commit

Permalink
[wasm] Add chrome versions to PR title, and labels (#90889)
Browse files Browse the repository at this point in the history
* [wasm] Add chrome versions to PR title, and labels

* CI: add chrome related bits to default subset
  • Loading branch information
radical authored Aug 22, 2023
1 parent 09d7b43 commit 9f8c01d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/bump-chrome-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
run: >-
make -C src/mono/wasm build-tasks &&
.dotnet/dotnet build eng/testing/bump-chrome-version.proj -p:Configuration=Release &&
git add eng/testing/ChromeVersions.props
git add eng/testing/ChromeVersions.props &&
cat eng/testing/bump-chrome-pr.env >> "$GITHUB_ENV"
- name: Check for changes
id: check_changes
Expand All @@ -48,18 +49,26 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const { CHROME_LINUX_VER, CHROME_WIN_VER } = process.env;
const title = `[wasm] Bump chrome for testing - linux: ${CHROME_LINUX_VER}, windows: ${CHROME_WIN_VER}`;
const { data: pullRequest } = await github.rest.pulls.create({
base: context.ref,
head: "update-chrome-version-${{ github.run_id }}",
owner: context.repo.owner,
repo: context.repo.repo,
title: '[wasm] Bump chrome version used for testing',
title: title,
body: ''
});
await github.rest.issues.setLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequest.number,
labels: ['arch-wasm', 'area-infrastructure-mono']
});
await github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pullRequest.number,
reviewers: ["radical"]
reviewers: ["lewing", "pavelsavara", "maraf", "ilonatommy", "radical"]
});
return pullRequest.number;
9 changes: 7 additions & 2 deletions eng/pipelines/common/evaluate-default-paths.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
# do not set them when using the template
_const_paths:
_wasm_specific_only: [
eng/testing/bump-chrome-version.proj
eng/testing/ChromeVersions.props
eng/testing/WasmRunner*
eng/testing/WasiRunner*
Expand Down Expand Up @@ -46,6 +47,10 @@ parameters:
src/native/libs/System.IO.Compression.Native/*
src/native/libs/System.Native/*
]
_wasm_chrome: [
eng/testing/bump-chrome-version.proj
eng/testing/ChromeVersions.props
]

# src/workloads is only used in runtime-official builds
# where evaluate-paths is not used
Expand Down Expand Up @@ -182,7 +187,6 @@ jobs:
include:
- eng/Version.Details.xml
- eng/Versions.props
eng/testing/ChromeVersions.props
- eng/testing/scenarios/BuildWasmAppsJobsList.txt
- eng/testing/workloads-testing.targets
- src/installer/pkg/sfx/Microsoft.NETCore.App/*
Expand All @@ -206,6 +210,7 @@ jobs:
- src/mono/wasm/runtime/*
- src/mono/wasm/templates/*
- src/mono/wasm/Wasm.Build.Tests/*
- ${{ parameters._const_paths._wasm_chrome }}
- ${{ parameters._const_paths._wasm_src_native }}
- src/tasks/*
- ${{ parameters._const_paths._wasm_pipelines }}
Expand All @@ -215,7 +220,7 @@ jobs:
- subset: wasmdebuggertests
combined: true
include:
- eng/testing/ChromeVersions.props
- ${{ parameters._const_paths._wasm_chrome }}
- src/libraries/System.Runtime.InteropServices/*
- src/libraries/System.Runtime.InteropServices.JavaScript/*
- src/mono/mono/*
Expand Down
9 changes: 9 additions & 0 deletions eng/testing/bump-chrome-version.proj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<Output TaskParameter="BaseSnapshotUrl" PropertyName="win_ChromeBaseSnapshotUrl" />
</GetChromeVersions>

<ItemGroup>
<!-- ensure newline at the end -->
<EnvVarForPR Include="CHROME_LINUX_VER=$(linux_ChromeVersion)" />
<EnvVarForPR Include="CHROME_WIN_VER=$(win_ChromeVersion)" />
</ItemGroup>

<PropertyGroup>
<_PropsContent>
&lt;Project&gt;
Expand All @@ -43,8 +49,11 @@
&lt;/Project&gt;
</_PropsContent>
</PropertyGroup>

<Message Text="Writing version props: $(_PropsContent)" Importance="High" />
<WriteLinesToFile Lines="$(_PropsContent)" File="$(RepositoryEngineeringDir)testing\ChromeVersions.props" Overwrite="true" />

<WriteLinesToFile Lines="@(EnvVarForPR)" File="$(RepositoryEngineeringDir)testing\bump-chrome-pr.env" Overwrite="true" />
</Target>

<Import Project="..\..\Directory.Build.targets" />
Expand Down

0 comments on commit 9f8c01d

Please sign in to comment.