-
Notifications
You must be signed in to change notification settings - Fork 49
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
[Reproducible rosetta build] Adds support for building rosetta with local patches and an already generated patch dir #354
Changes from all commits
abb6f97
068aab9
fb7cf0b
4b0c406
4044450
38da8a1
9ad94c8
1aac03a
42ec9bb
2f02023
ad12e78
bdc34c8
a5c478e
b4fd2d8
fe6e3d8
ad83f21
b7e1a6c
0dd9617
dc44fe4
acf2acf
027cd63
7c10ffa
f1046d2
bbf2c21
cd0d5d1
e973c9a
1f6d4f1
6d9ae00
cc66ce6
fe8708a
b1e332e
62ca85b
bc6c702
ff6ec2a
67df9b8
d67966a
1ba1bff
e8f87d2
24b4931
e2c34b4
7ee441b
4f4d909
b777244
c4c22af
736246a
bc4b6db
ce1cf94
9ac7367
44d3026
5c47fcb
139e539
5e2a5ad
cb99d71
0959264
314db99
8943e9f
94115ba
ee11851
6b6fc92
cf66cfd
9fd4503
f2e80a1
7db2f84
7090349
6900d86
06327c1
618a3f5
c659d3c
8395604
2ab0cc9
69c17fc
d9400d3
33dc9ac
4fc18dc
b806a5a
8391f74
984a19a
715f62c
7f06cb8
92b6d0a
c4f5b84
bcfd0e4
12a2fd6
1925b14
6e71c64
adb10da
b956b30
c727607
d450ceb
fc2c6e6
f9c6cd3
7230589
429ae4d
de32e4f
43a57c6
ab73f6b
9eb97e8
772f606
fcb29b4
22d400b
e9f074f
602002f
12a57eb
dbaba5b
ccafb52
279c388
2b5ee7c
978f3d0
b784727
cc16e92
7cc4abb
4a3bd4a
f6a446e
7fffabf
71d960c
7bf3790
2a2ca94
e977aa2
8c23902
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ on: | |
inputs: | ||
BASE_IMAGE: | ||
type: string | ||
description: 'PAX image built by NVIDIA/JAX-Toolbox' | ||
description: 'Upstream Pax mealkit image without $arch-mealkit suffix, e.g., (ghcr.io/nvidia/jax-toolbox-internal:6857094059-upstream-pax). Leaving empty implies ghcr.io/nvidia/upstream-pax:mealkit' | ||
default: '' | ||
required: false | ||
PUBLISH: | ||
|
@@ -49,15 +49,6 @@ jobs: | |
if: steps.if-upstream-failed.outputs.UPSTREAM_FAILED == 'true' | ||
uses: styfle/[email protected] | ||
|
||
- name: Determine if the resulting container should be 'published' | ||
id: if-publish | ||
shell: bash -x -e {0} | ||
run: | ||
# A container should be published if: | ||
# 1) the workflow is triggered by workflow_dispatch and the PUBLISH input is true, or | ||
# 2) the workflow is triggered by workflow_run (i.e., a nightly build) | ||
echo "PUBLISH=${{ github.event_name == 'workflow_run' || (github.event_name == 'workflow_dispatch' && inputs.PUBLISH) }}" >> $GITHUB_OUTPUT | ||
|
||
- name: Set build date | ||
id: date | ||
shell: bash -x -e {0} | ||
|
@@ -77,6 +68,10 @@ jobs: | |
BASE_IMAGE_ARM64=${{ inputs.BASE_IMAGE }}-arm64-mealkit | ||
fi | ||
echo "BASE_LIBRARY=${{ env.BASE_LIBRARY }}" >> $GITHUB_OUTPUT | ||
# A container should be published if: | ||
# 1) the workflow is triggered by workflow_dispatch and the PUBLISH input is true, or | ||
# 2) the workflow is triggered by workflow_run (i.e., a nightly build) | ||
echo "PUBLISH=${{ github.event_name == 'workflow_run' || (github.event_name == 'workflow_dispatch' && inputs.PUBLISH) }}" >> $GITHUB_OUTPUT | ||
echo "BASE_IMAGE_AMD64=${BASE_IMAGE_AMD64}" >> $GITHUB_OUTPUT | ||
echo "BASE_IMAGE_ARM64=${BASE_IMAGE_ARM64}" >> $GITHUB_OUTPUT | ||
|
||
|
@@ -100,6 +95,29 @@ jobs: | |
BASE_IMAGE: ${{ needs.metadata.outputs.BASE_IMAGE_ARM64 }} | ||
secrets: inherit | ||
|
||
publish-build-badge: | ||
needs: [metadata, amd64, arm64] | ||
uses: ./.github/workflows/_publish_badge.yaml | ||
if: always() | ||
with: | ||
ENDPOINT_FILENAME: 'rosetta-pax-build-status.json' | ||
PUBLISH: ${{ needs.metadata.outputs.PUBLISH == 'true' }} | ||
SCRIPT: | | ||
if [[ ${{ needs.amd64.result }} == "success" && ${{ needs.arm64.result }} == "success" ]]; then | ||
BADGE_COLOR=brightgreen | ||
MSG=passing | ||
STATUS=success | ||
else | ||
BADGE_COLOR=red | ||
MSG=failing | ||
STATUS=failure | ||
fi | ||
echo "LABEL='nightly'" >> $GITHUB_OUTPUT | ||
echo "MESSAGE='${MSG}'" >> $GITHUB_OUTPUT | ||
echo "COLOR='${BADGE_COLOR}'" >> $GITHUB_OUTPUT | ||
echo "STATUS='${STATUS}'" >> ${GITHUB_OUTPUT} | ||
secrets: inherit | ||
|
||
publish-mealkit: | ||
needs: [metadata, amd64, arm64] | ||
if: needs.metadata.outputs.PUBLISH == 'true' | ||
|
@@ -113,8 +131,17 @@ jobs: | |
type=raw,value=mealkit,priority=500 | ||
type=raw,value=mealkit-${{ needs.metadata.outputs.BUILD_DATE }},priority=500 | ||
|
||
# TODO: Test ARM when runners available | ||
test-amd64: | ||
needs: amd64 | ||
uses: ./.github/workflows/_test_pax_rosetta.yaml | ||
with: | ||
PAX_IMAGE: ${{ needs.amd64.outputs.DOCKER_TAG_FINAL }} | ||
secrets: inherit | ||
|
||
# TODO: ARM Tests | ||
publish-final: | ||
needs: [metadata, amd64, arm64] | ||
needs: [metadata, amd64, arm64, test-amd64] | ||
if: needs.metadata.outputs.PUBLISH == 'true' | ||
uses: ./.github/workflows/_publish_container.yaml | ||
with: | ||
|
@@ -123,49 +150,45 @@ jobs: | |
${{ needs.arm64.outputs.DOCKER_TAG_FINAL }} | ||
TARGET_IMAGE: pax | ||
TARGET_TAGS: | | ||
type=raw,value=latest,priority=1000 | ||
type=raw,value=nightly-${{ needs.metadata.outputs.BUILD_DATE }},priority=900 | ||
${{ needs.test-amd64.outputs.TEST_STATUS == 'success' && 'type=raw,value=latest,priority=1000' || '' }} | ||
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. I'd recommend to put this logic in a 'metadata' job/jobstep, and then reference the job/jobstep output for better readability. 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 depends on test results. |
||
type=raw,value=nightly-${{ needs.metadata.outputs.BUILD_DATE }},priority=900 | ||
|
||
test-pax: | ||
needs: [metadata, amd64, arm64] | ||
uses: ./.github/workflows/_test_pax_rosetta.yaml | ||
if: (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'workflow_dispatch' | ||
with: | ||
PAX_IMAGE: ${{ needs.amd64.outputs.DOCKER_TAG_FINAL }} | ||
secrets: inherit | ||
|
||
publish-test: | ||
needs: [metadata, amd64, arm64, test-pax] | ||
# TODO: ARM Tests | ||
publish-test-badge: | ||
needs: [metadata, publish-build-badge, test-amd64] | ||
uses: ./.github/workflows/_publish_badge.yaml | ||
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. Note that `_publish_badge.yaml`` will be deprecated soon. 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. Would it be okay to tackle this in a subsequent PR? My thinking is we can get the reproducible build/ci changes out and then circle back to sitrep. I expect the reproducible PRs to all be flushed out within a week or two :) |
||
if: ( always() ) | ||
if: always() | ||
secrets: inherit | ||
with: | ||
ENDPOINT_FILENAME: 'rosetta-pax-overall-test-status.json' | ||
PUBLISH: ${{ github.event_name == 'workflow_run' || needs.metadata.outputs.PUBLISH == 'true' }} | ||
PUBLISH: ${{ needs.metadata.outputs.PUBLISH == 'true' }} | ||
SCRIPT: | | ||
PAX_STATUS=${{ needs.test-pax.outputs.TEST_STATUS }} | ||
PAX_STATUS=${{ needs.test-amd64.outputs.TEST_STATUS }} | ||
|
||
echo "LABEL='Tests'" >> $GITHUB_OUTPUT | ||
|
||
if [[ ${{ needs.amd64.result }} == "success" && ${{ needs.arm64.result }} == "success" ]]; then | ||
STATUS=failure | ||
if [[ ${{ needs.publish-build-badge.outputs.STATUS }} == "success" ]]; then | ||
if [[ $PAX_STATUS == "success" ]]; then | ||
COLOR=brightgreen | ||
MESSAGE="MGMN passed" | ||
STATUS=success | ||
else | ||
COLOR=red | ||
MESSAGE="MGMN failed" | ||
fi | ||
else | ||
MESSAGE="n/a" | ||
COLOR="red" | ||
MESSAGE="n/a" | ||
fi | ||
|
||
echo "MESSAGE='${MESSAGE}'" >> $GITHUB_OUTPUT | ||
echo "COLOR='${COLOR}'" >> $GITHUB_OUTPUT | ||
echo "MESSAGE='${MESSAGE}'" >> $GITHUB_OUTPUT | ||
echo "STATUS='${STATUS}'" >> ${GITHUB_OUTPUT} | ||
|
||
finalize: | ||
if: always() | ||
needs: [metadata, amd64, arm64] | ||
needs: [metadata, amd64, arm64, test-amd64] | ||
uses: ./.github/workflows/_finalize.yaml | ||
with: | ||
PUBLISH_BADGE: ${{ needs.metadata.outputs.PUBLISH == '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.
Note that
_publish_badge.yaml
will be deprecated soon.