KEMBAR78
Use GitHub hosted runners instead of Codebuild runners for test-and-publish-nightly-build workflow by visheshruparelia · Pull Request #1154 · async-profiler/async-profiler · GitHub
Skip to content

Conversation

@visheshruparelia
Copy link
Contributor

Description

We are moving away from AWS Codebuild Self Hosted runners to Github hosted runners for the test-and-publish-nightly-build workflow

Related issues

#1118

Motivation and context

Github runners have now added Linux ARM to their fleet. This allows the contributors to run workflows on the forked branches.

How has this been tested?

The builds are green.
PS - We have skipped a test running when it runs on Github actions Linux ARM machine. For more details: actions/runner-images#11689


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@visheshruparelia visheshruparelia marked this pull request as ready for review February 28, 2025 16:46
Comment on lines 19 to 22
private static final String GITHUB_ACTIONS_ENV_VAR = "GITHUB_ACTIONS";
private static final String OS_ARCH_ENV_VAR = "os.arch";
private static final String AARCH64 = "aarch64";
private static final String ARM = "arm";
Copy link
Member

Choose a reason for hiding this comment

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

No need to make a constant of every single string, especially when they are used only once in a local scope.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Test(mainClass = Dictionary.class, os = Os.LINUX)
public void cycles(TestProcess p) throws Exception {
try {
// We are skipping the test in one case, for more details: https://github.com/actions/runner-images/issues/11689
Copy link
Member

Choose a reason for hiding this comment

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

We can do this check after profiling if the output is empty. In this case, the test will work again automatically when GHA issue is fixed. Also, it's better to at least run profiler than do nothing at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense. Updated the PR @apangin

}
}

private boolean isOsARMBased() {
Copy link
Member

Choose a reason for hiding this comment

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

IMO, these methods are redundant. They are trivial; it's ok to just inline the code where used.

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 had the same thought, went in favor of methods to keep it a bit more readable. Made them inline nevertheless.


private boolean isOsARMBased() {
String arch = System.getProperty(OS_ARCH_ENV_VAR);
return arch.contains(AARCH64) || arch.contains(ARM);
Copy link
Member

Choose a reason for hiding this comment

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

The issue is specific to AArch64, no need to check for ARM32.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

}

private boolean isRunningOnGithubActions() {
return System.getenv(GITHUB_ACTIONS_ENV_VAR) != null && System.getenv(GITHUB_ACTIONS_ENV_VAR).equals("true");
Copy link
Member

Choose a reason for hiding this comment

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

Can be simplified to !"true".equals(System.getenv("GITHUB_ACTIONS"))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

visheshruparelia and others added 2 commits March 1, 2025 22:06
Signed-off-by: Andrei Pangin <1749416+apangin@users.noreply.github.com>
@apangin apangin merged commit ceb1a31 into async-profiler:master Mar 1, 2025
4 of 9 checks passed
@apangin
Copy link
Member

apangin commented Mar 1, 2025

Thank you for the contribution. I merged PR, however, publish job failed: https://github.com/async-profiler/async-profiler/actions/runs/13609846141/job/38045684720
Could you please take a look?

@visheshruparelia
Copy link
Contributor Author

Thank you for the contribution. I merged PR, however, publish job failed: https://github.com/async-profiler/async-profiler/actions/runs/13609846141/job/38045684720 Could you please take a look?

Here is the follow up PR for the publish step fix: #1157

krk pushed a commit to krk/async-profiler that referenced this pull request Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants