Skip to content

Commit 67632af

Browse files
committed
wip
squash it Nightly Manifest Bump (2024-02-15) (#559) https://github.com/NVIDIA/JAX-Toolbox/actions/runs/7923173445 Co-authored-by: JAX-Toolbox CI <[email protected]> add delete fix condition Nightly Manifest Bump (2024-02-16) (#563) https://github.com/NVIDIA/JAX-Toolbox/actions/runs/7933818822 Co-authored-by: JAX-Toolbox CI <[email protected]> test (#564) add allow-empty for safety test Nightly Manifest Bump (2024-02-16) (#565) https://github.com/NVIDIA/JAX-Toolbox/actions/runs/7934518919 Co-authored-by: JAX-Toolbox CI <[email protected]> wip fixes simulate failure changing to always make the PR created if MERGE_MANIFEST_BRANCH is true and not make it contingent on success since CI can be flaky wip test test Nightly Manifest Bump (2024-02-16) (#567) https://github.com/NVIDIA/JAX-Toolbox/actions/runs/7934916259 Co-authored-by: JAX-Toolbox CI <[email protected]> Nightly Manifest Bump (2024-02-16) (#568) https://github.com/NVIDIA/JAX-Toolbox/actions/runs/7934977098 Co-authored-by: JAX-Toolbox CI <[email protected]> test use artifacts everywhere try again typos disable fail Nightly Manifest Bump (2024-02-20) (#572) https://github.com/NVIDIA/JAX-Toolbox/actions/runs/7978537171 Co-authored-by: JAX-Toolbox CI <[email protected]> simulate fail revert
1 parent ce2fd49 commit 67632af

File tree

4 files changed

+223
-174
lines changed

4 files changed

+223
-174
lines changed

.github/workflows/_build_base.yaml

+10-50
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ on:
3737
description: 'User email in GIT to perform git pull/push'
3838
required: false
3939
default: '[email protected]'
40-
BUMP_MANIFEST:
41-
type: boolean
42-
description: "Flag to bump manifest file or not"
43-
default: false
44-
required: false
40+
MANIFEST_ARTIFACT_NAME:
41+
type: string
42+
description: Artifact name in current run w/ manifest/patches. Leaving empty uses manifest/patches in current branch
43+
default: ''
44+
required: false
4545
outputs:
4646
DOCKER_TAG:
4747
description: "Tag of the image built"
@@ -57,40 +57,7 @@ permissions:
5757

5858
jobs:
5959

60-
bump-manifest:
61-
runs-on: ubuntu-22.04
62-
steps:
63-
- name: Check out the repository under ${GITHUB_WORKSPACE}
64-
uses: actions/checkout@v4
65-
66-
- name: Test if manifest bump is functional, and save result to a new file
67-
working-directory: .github/container
68-
shell: bash -x -e {0}
69-
run: |
70-
bash bump.sh --input-manifest manifest.yaml --output-manifest manifest.yaml.new
71-
72-
- name: Replace current manifest with the new one and show diff
73-
if: inputs.BUMP_MANIFEST
74-
working-directory: .github/container
75-
shell: bash -x -e {0}
76-
run: |
77-
mv manifest.yaml.new manifest.yaml
78-
git diff
79-
80-
- name: Upload bumped manifest to be used in build-base
81-
uses: actions/upload-artifact@v4
82-
with:
83-
name: maybe-bumped-manifest-${{ inputs.ARCHITECTURE }}
84-
path: .github/container/manifest.yaml
85-
86-
- name: Upload patch folder to be used in build-base
87-
uses: actions/upload-artifact@v4
88-
with:
89-
name: maybe-bumped-patches-${{ inputs.ARCHITECTURE }}
90-
path: .github/container/patches
91-
9260
build-base:
93-
needs: bump-manifest
9461
runs-on: [self-hosted, "${{ inputs.ARCHITECTURE }}", small]
9562
env:
9663
BADGE_FILENAME_FULL: ${{ inputs.BADGE_FILENAME }}-${{ inputs.ARCHITECTURE }}.json
@@ -102,26 +69,19 @@ jobs:
10269

10370
- name: Check out the repository under ${GITHUB_WORKSPACE}
10471
uses: actions/checkout@v4
105-
72+
10673
- name: Delete checked-out manifest and patches
107-
if: inputs.BUMP_MANIFEST
74+
if: inputs.MANIFEST_ARTIFACT_NAME != ''
10875
run: |
10976
rm .github/container/manifest.yaml
11077
rm -rf .github/container/patches
11178
112-
- name: Replace checked-out manifest file with bumped one
113-
if: inputs.BUMP_MANIFEST
79+
- name: Replace checked-out manifest file/patches with bumped one
80+
if: inputs.MANIFEST_ARTIFACT_NAME != ''
11481
uses: actions/download-artifact@v4
11582
with:
116-
name: maybe-bumped-manifest-${{ inputs.ARCHITECTURE }}
83+
name: ${{ inputs.MANIFEST_ARTIFACT_NAME }}
11784
path: .github/container/
118-
119-
- name: Replace checked-out patch folder with bumped one
120-
if: inputs.BUMP_MANIFEST
121-
uses: actions/download-artifact@v4
122-
with:
123-
name: maybe-bumped-patches-${{ inputs.ARCHITECTURE }}
124-
path: .github/container/patches
12585

12686
- name: Log the changes in manifest file and patch folder
12787
working-directory: .github/container

.github/workflows/_ci.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ on:
1111
description: Build date in YYYY-MM-DD format
1212
required: false
1313
default: NOT SPECIFIED
14-
BUMP_MANIFEST:
15-
type: boolean
16-
description: Flag to bump manifest file or not
17-
default: false
14+
MANIFEST_ARTIFACT_NAME:
15+
type: string
16+
description: Artifact name in current run w/ manifest/patches. Leaving empty uses manifest/patches in current branch
17+
default: ''
1818
required: false
1919
outputs:
2020
DOCKER_TAGS:
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
ARCHITECTURE: ${{ inputs.ARCHITECTURE }}
3535
BUILD_DATE: ${{ inputs.BUILD_DATE }}
36-
BUMP_MANIFEST: ${{ inputs.BUMP_MANIFEST }}
36+
MANIFEST_ARTIFACT_NAME: ${{ inputs.MANIFEST_ARTIFACT_NAME }}
3737
secrets: inherit
3838

3939
build-jax:

.github/workflows/_ci_tmp.yaml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: ~CI, single-arch
2+
run-name: CI-${{ inputs.ARCHITECTURE }}
3+
on:
4+
workflow_call:
5+
inputs:
6+
ARCHITECTURE:
7+
type: string
8+
required: true
9+
BUILD_DATE:
10+
type: string
11+
description: Build date in YYYY-MM-DD format
12+
required: false
13+
default: NOT SPECIFIED
14+
MANIFEST_ARTIFACT_NAME:
15+
type: string
16+
description: Artifact name in current run w/ manifest/patches. Leaving empty uses manifest/patches in current branch
17+
default: ''
18+
required: false
19+
outputs:
20+
DOCKER_TAGS:
21+
description: JSON object containing tags of all docker images built
22+
value: ${{ jobs.collect-docker-tags.outputs.TAGS }}
23+
24+
permissions:
25+
contents: read # to fetch code
26+
actions: write # to cancel previous workflows
27+
packages: write # to upload container
28+
29+
jobs:
30+
31+
pass:
32+
runs-on: ubuntu-22.04
33+
steps:
34+
- name: Check out the repository under ${GITHUB_WORKSPACE}
35+
uses: actions/checkout@v4
36+
37+
- name: Delete checked-out manifest and patches
38+
if: inputs.MANIFEST_ARTIFACT_NAME != ''
39+
run: |
40+
rm .github/container/manifest.yaml
41+
rm -rf .github/container/patches
42+
43+
- name: Replace checked-out manifest file/patches with bumped one
44+
if: inputs.MANIFEST_ARTIFACT_NAME != ''
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: ${{ inputs.MANIFEST_ARTIFACT_NAME }}
48+
path: .github/container/
49+
50+
- name: Log the changes in manifest file and patch folder
51+
working-directory: .github/container
52+
shell: bash -x -e {0}
53+
run: |
54+
ls -lah
55+
ls -lah patches
56+
echo "Changes in manifest file and patch folder"
57+
git diff
58+
fail:
59+
runs-on: ubuntu-22.04
60+
steps:
61+
- name: Pass
62+
run: exit 1

0 commit comments

Comments
 (0)