Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kotlin problem matchers #1775

Merged
merged 75 commits into from
Jun 27, 2024
Merged

Add kotlin problem matchers #1775

merged 75 commits into from
Jun 27, 2024

Conversation

clementetb
Copy link
Contributor

@clementetb clementetb commented Jun 4, 2024

  • Updates components to use node20.
  • Separates cache check in multiple jobs. Reduces the execution time from 7min to 20s.
  • Replaces checkstyle-github-action with problem matchers.
  • Add problem matcher for kotlin and gradle outputs.

@clementetb clementetb changed the title Add kotlin compiler matcher Add kotlin problem matchers Jun 11, 2024
@clementetb clementetb added the no-jira-ticket Skip checking the PR title for Jira reference label Jun 11, 2024
@clementetb clementetb marked this pull request as ready for review June 11, 2024 09:16
Copy link
Contributor

@rorbech rorbech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome speed up. LGTM

Copy link
Collaborator

@nhachicha nhachicha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor 👍 minor comments

"severity": "error",
"pattern": [
{
"regexp": "(.+\\.kt):(\\d+):(\\d+):\\s(.*)",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add kts Gradle scripts?

Copy link
Contributor Author

@clementetb clementetb Jun 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is required. We don't run detekt against our build scripts.

"severity": "error",
"pattern": [
{
"regexp": "^e\\:\\s(?:(?:(.*):(?:\\s\\()?(\\d+)(?:(?:\\,\\s)|\\:)(\\d+))(?:\\))?\\:\\s)?(.*)$",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you come up with all these regexp? or are they already provided somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I came up with them. Because we use two kotlin versions in our project (buildSrc, and regular project) we have two kinds of logs for kotlin compilation errors.

if: always() && !cancelled() && steps.jvm-cache.outputs.cache-hit == 'true'
with:
name: packages-jvm-${{ steps.find-library-version.outputs.label }}
name: packages-jvm-${{ needs.checksum.outputs.version-label }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the name be packages-m2-jvm-sync ? it should match the usage in pr.yml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, packages-m2-jvm-sync is to define a cache, whereas packages-jvm- is to define an artifact.

- name: Check JNI Linux lib cache
id: jni-linux-lib-cache
uses: cmelchior/cache@main
uses: actions/cache@v4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we need anything from CM fork? or v4 already has everything we need?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fork had a CACHE_SKIP_SAVE env parameter to skip saving the cache, I guess that it was an optimization, but after splitting the check cache in multiple jobs is no longer required.

path: ./packages/cinterop/build/realmLinuxBuild
path: ./packages/cinterop/build/realmWindowsBuild
key: jni-windows-lib-${{ needs.checksum.outputs.packages-sha }}
enableCrossOsArchive: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is unnecessary for Linux (enableCrossOsArchive) since we build and retrieve on Ubuntu

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so.

with:
cmake-version: ${{ vars.VERSION_CMAKE }}

- name: Setup ninja
uses: cmelchior/setup-ninja@master
uses: clementetb/setup-ninja@master
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is based in cmelchior/setup-ninja that it is based on ashutoshvarma's

@clementetb clementetb merged commit 18b4def into main Jun 27, 2024
78 checks passed
@clementetb clementetb deleted the ct/add_problem_matchers branch June 27, 2024 09:04
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes no-changelog no-jira-ticket Skip checking the PR title for Jira reference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants