-
Notifications
You must be signed in to change notification settings - Fork 937
Use GitHub hosted runners instead of Codebuild runners for test-and-publish-nightly-build workflow #1154
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
Use GitHub hosted runners instead of Codebuild runners for test-and-publish-nightly-build workflow #1154
Conversation
test/test/pmu/PmuTests.java
Outdated
| 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"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
test/test/pmu/PmuTests.java
Outdated
| } | ||
| } | ||
|
|
||
| private boolean isOsARMBased() { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
test/test/pmu/PmuTests.java
Outdated
|
|
||
| private boolean isOsARMBased() { | ||
| String arch = System.getProperty(OS_ARCH_ENV_VAR); | ||
| return arch.contains(AARCH64) || arch.contains(ARM); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
test/test/pmu/PmuTests.java
Outdated
| } | ||
|
|
||
| private boolean isRunningOnGithubActions() { | ||
| return System.getenv(GITHUB_ACTIONS_ENV_VAR) != null && System.getenv(GITHUB_ACTIONS_ENV_VAR).equals("true"); |
There was a problem hiding this comment.
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"))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Signed-off-by: Andrei Pangin <1749416+apangin@users.noreply.github.com>
|
Thank you for the contribution. I merged PR, however, |
Here is the follow up PR for the publish step fix: #1157 |
Description
We are moving away from AWS Codebuild Self Hosted runners to Github hosted runners for the
test-and-publish-nightly-buildworkflowRelated 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.