-
Notifications
You must be signed in to change notification settings - Fork 73
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
[PH] Create workflow for manually dispatching performance harness runs #1378
Changes from all commits
f7f246a
78564fa
7518f78
1f2ca01
975426a
947770e
8f01104
e3ae3a3
dc92ab5
6b4f745
8919364
feffc03
be9452b
754638d
cb73a84
b0075c0
a414b8c
3f13595
a83266b
158ad55
ba738b8
282cfe0
1de5698
c7695c0
0385511
f3097a2
4e2ebb0
f027744
2d7e8c4
96b3d71
fd54f6c
d0c1e2c
f995e47
41a1824
a1bcf4b
f4b7998
56e7a9d
7a12930
b1862f2
d1e099c
1e562e8
90f0852
a155889
6c86da5
1b9f64a
6c2758f
47ddeb6
4f3c5ef
f49f8c9
c597816
7670690
e5139d6
1a96850
775cce4
13424e2
78b16c5
b30be9c
4cb312e
45b6c77
bf95111
8c47cce
cd872b3
d50381b
b710831
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,16 @@ name: "Performance Harness Run" | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
platform-choice: | ||
description: 'Select Platform' | ||
type: choice | ||
options: | ||
- ubuntu20 | ||
- ubuntu22 | ||
override-test-params: | ||
description: 'Override perf harness params' | ||
type: string | ||
|
||
permissions: | ||
packages: read | ||
|
@@ -12,10 +22,99 @@ defaults: | |
shell: bash | ||
|
||
jobs: | ||
tmp: | ||
name: Stub | ||
|
||
v: | ||
name: Discover Inputs | ||
runs-on: ubuntu-latest | ||
outputs: | ||
test-params: ${{steps.overrides.outputs.test-params}} | ||
steps: | ||
- name: Setup Input Params | ||
id: overrides | ||
run: | | ||
echo test-params=testBpOpMode >> $GITHUB_OUTPUT | ||
|
||
if [[ "${{inputs.override-test-params}}" != "" ]]; then | ||
echo test-params=${{inputs.override-test-params}} >> $GITHUB_OUTPUT | ||
fi | ||
|
||
platforms: | ||
name: Run Platforms Workflow | ||
uses: ./.github/workflows/platforms.yaml | ||
with: | ||
override-build-matrix: ${{github.event.inputs.platform-choice}} | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
reuse-build: | ||
name: Reuse leap build | ||
needs: [v] | ||
if: | | ||
always() && | ||
needs.v.result == 'success' | ||
runs-on: ubuntu-latest | ||
outputs: | ||
build-artifact: ${{steps.downloadBuild.outputs.downloaded-file}} | ||
steps: | ||
- name: Workflow Stub | ||
- name: Download builddir | ||
id: downloadBuild | ||
uses: AntelopeIO/asset-artifact-download-action@v3 | ||
with: | ||
owner: AntelopeIO | ||
repo: leap | ||
file: build.tar.zst | ||
target: ${{github.sha}} | ||
artifact-name: ${{github.event.inputs.platform-choice}}-build | ||
fail-on-missing-target: false | ||
|
||
- name: Upload builddir | ||
if: steps.downloadBuild.outputs.downloaded-file != '' | ||
uses: AntelopeIO/upload-artifact-large-chunks-action@v1 | ||
with: | ||
name: ${{github.event.inputs.platform-choice}}-build | ||
path: build.tar.zst | ||
|
||
build-base: | ||
name: Run Build Workflow | ||
needs: [platforms, reuse-build] | ||
if: always() && needs.platforms.result == 'success' && needs.reuse-build.outputs.build-artifact == '' | ||
uses: ./.github/workflows/build_base.yaml | ||
with: | ||
p: ${{needs.platforms.outputs.p}} | ||
platform-matrix: ${{needs.platforms.outputs.platform-matrix}} | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
tests: | ||
name: Tests | ||
needs: [v, platforms, reuse-build, build-base] | ||
if: always() && needs.platforms.result == 'success' && (needs.build-base.result == 'success' || needs.reuse-build.result == 'success') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we really need to find a way to get #283 in good shape to avoid these tricky |
||
runs-on: ubuntu-latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This means it runs on a github owned runner, is that what you wanted? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @spoonincode - Correct. I was using the github owned runner for initial testing and verification of the workflow. Now that this is closer to complete, do you have a suggestion for a runner to use ( |
||
container: | ||
image: ${{fromJSON(needs.platforms.outputs.p)[github.event.inputs.platform-choice].image}} | ||
steps: | ||
- name: Download builddir | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{github.event.inputs.platform-choice}}-build | ||
- name: Run Performance Test | ||
run: | | ||
zstdcat build.tar.zst | tar x | ||
cd build | ||
./tests/performance_tests/performance_test.py ${{needs.v.outputs.test-params}} | ||
- name: Prepare results | ||
id: prep-results | ||
run: | | ||
echo "Workflow Stub" | ||
tar -pc build/performance_test | zstd --long -T0 -9 > performance_test_logs.tar.zst | ||
- name: Upload results | ||
uses: AntelopeIO/upload-artifact-large-chunks-action@v1 | ||
with: | ||
name: performance-test-results | ||
path: performance_test_logs.tar.zst | ||
- name: Upload report | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: performance-test-report | ||
path: ./build/performance_test/**/report.json |
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.
Similar comments as #1356 (comment): we shouldn't be copy pasting all of this, we need to come up with a better approach.
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.
@spoonincode - I have refactored the build to be a reusable workflow in PR#1356. Hoping to have that PR go into
main
first, then I will pull those changes into this branch and refactor the workflow to usebuild-base
as well.