-
-
Notifications
You must be signed in to change notification settings - Fork 310
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 certain directories trigger for PR/push testing #2241
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6a4fc6a
Add certain directories trigger for PR/push testing
pxc-ddd 0c5837c
Merge remote-tracking branch 'upstream/master'
xichen1 6ef611c
use run-aqa with the target specified by the changed dirs
xichen1 31357b4
remove unnecessary push trigger, leave only PR trigger
xichen1 a934ad5
merge openj9 and hotspot, deal with duplication situation
xichen1 47bfb21
Combine getChangeLocation and getBuildLists into one getBuildLists, r…
xichen1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: 'Directories/Files Change Test PR' | ||
on: | ||
pull_request: | ||
types: [ready_for_review] | ||
paths-ignore: | ||
- '.gitignore' | ||
- '*.md' | ||
- 'doc/**' | ||
- '.github/ISSUE_TEMPLATE/**' | ||
- '.github/*.yml' | ||
- 'buildenv/**' | ||
jobs: | ||
getBuildLists: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
buildLists: ${{ steps.locations_parse.outputs.build_lists }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: jitterbit/get-changed-files@v1 | ||
id: get_change | ||
with: | ||
format: space-delimited | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: parse locations | ||
id: locations_parse | ||
run: | | ||
python3 ./.github/workflows/getBuildLists.py ${{ steps.get_change.outputs.all }} | ||
testChangeBasedBuildListWithHotspotAndOpenj9: | ||
runs-on: ${{ matrix.os }} | ||
needs: getBuildLists | ||
if: ${{!contains( fromJson(needs.getBuildLists.outputs.buildLists), 'skip')}} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-16.04, macos-10.15, windows-2016] | ||
version: [8, 15] | ||
build_list: ${{ fromJson(needs.getBuildLists.outputs.buildLists) }} | ||
impl: [hotspot, openj9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: AdoptOpenJDK/install-jdk@v1 | ||
with: | ||
version: ${{ matrix.version }} | ||
source: 'nightly' | ||
impl: ${{ matrix.impl }} | ||
- name: AQA | ||
uses: AdoptOpenJDK/run-aqa@v1 | ||
with: | ||
build_list: ${{ matrix.build_list }} | ||
target: '_sanity.${{ matrix.build_list }}' | ||
jdksource: 'install-jdk' | ||
version: ${{ matrix.version }} | ||
openjdk_testRepo: '${{ github.event.pull_request.head.repo.full_name }}:${GITHUB_HEAD_REF}' | ||
- uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: output_changed_based_build_list | ||
path: ./**/output_*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import sys | ||
import json | ||
|
||
|
||
def main(): | ||
print(sys.argv) | ||
result = [] | ||
# TODO: handle the change of buildenv dir | ||
for argument in sys.argv: | ||
if (argument.startswith('perf/') and ('perf' not in result)): | ||
result.append('perf') | ||
elif (argument.startswith('system/') and ('system' not in result)): | ||
result.append('system') | ||
elif (argument.startswith('functional/') and ('functional' not in result)): | ||
result.append('functional') | ||
elif (argument.startswith('openjdk/') and ('openjdk' not in result)): | ||
result.append('openjdk') | ||
|
||
if not result: | ||
result.append('skip') | ||
print('::set-output name=build_lists::{}'.format(json.dumps(result))) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 would suggest add impl: [hotspot, openj9] to combine testChangeBasedBuildListWithHotspot and testChangeBasedBuildListWithopenj9 to one job to reduce code redundancy so it's easy to maintain.
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.
Fixed by adding
impl: [hotspot, openj9]
andimpl: ${{ matrix.impl }}
.