Skip to content

Commit 8e437ab

Browse files
authored
[ci] Rename workflows relating to artifacts. (#1622)
## Motivation Progress on #1522, related to #1559. This allows us to more clearly differentiate between "artifact builds" (the root of our build graph) and "package builds" (which use artifacts). I would like to further refactor these artifact workflows so they can be used from `release_*_packages.yml` workflows instead of having the release workflows reimplement artifact building. ## Technical Details See this diagram from https://github.com/ROCm/TheRock/blob/main/docs/development/development_guide.md#overall-build-architecture: ![Build architecture (dark)](https://raw.githubusercontent.com/ROCm/TheRock/2db6d353df9849f4a109f5d90e6174686164c69b/docs/development/assets/therock_build_architecture_dark.excalidraw.svg) ## Test Plan Watch presubmit CI to check that all builds are still running as expected.
1 parent 5016a89 commit 8e437ab

File tree

12 files changed

+54
-47
lines changed

12 files changed

+54
-47
lines changed

.github/workflows/build_linux_packages.yml renamed to .github/workflows/build_portable_linux_artifacts.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Linux Packages
1+
name: Build Portable Linux Artifacts
22

33
on:
44
workflow_dispatch:
@@ -8,6 +8,7 @@ on:
88
default: ADHOCBUILD
99
amdgpu_families:
1010
type: string
11+
default: gfx94X-dcgpu
1112
expect_failure:
1213
type: boolean
1314
default: false
@@ -32,8 +33,8 @@ permissions:
3233
contents: read
3334

3435
jobs:
35-
build_linux_packages:
36-
name: Build Linux Packages (xfail ${{ inputs.expect_failure }})
36+
build_portable_linux_artifacts:
37+
name: Build Artifacts (xfail ${{ inputs.expect_failure }})
3738
runs-on: azure-linux-scale-rocm
3839
continue-on-error: ${{ inputs.expect_failure }}
3940
permissions:
@@ -94,8 +95,8 @@ jobs:
9495
run: |
9596
python3 build_tools/github_actions/build_configure.py
9697
97-
- name: Build therock-dist
98-
run: cmake --build build --target therock-dist therock-archives -- -k 0
98+
- name: Build therock-archives and therock-dist
99+
run: cmake --build build --target therock-archives therock-dist -- -k 0
99100

100101
- name: Test Packaging
101102
if: ${{ github.event.repository.name == 'TheRock' }}

.github/workflows/build_windows_packages.yml renamed to .github/workflows/build_windows_artifacts.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Windows Packages
1+
name: Build Windows Artifacts
22

33
on:
44
workflow_dispatch:
@@ -30,8 +30,8 @@ permissions:
3030
contents: read
3131

3232
jobs:
33-
build_windows_packages:
34-
name: Build Windows Packages (xfail ${{ inputs.expect_failure }})
33+
build_windows_artifacts:
34+
name: Build Artifacts (xfail ${{ inputs.expect_failure }})
3535
runs-on: azure-windows-scale-rocm
3636
continue-on-error: ${{ inputs.expect_failure }}
3737
permissions:
@@ -117,8 +117,8 @@ jobs:
117117
ccache -z
118118
python3 build_tools/github_actions/build_configure.py
119119
120-
- name: Build therock-dist
121-
run: cmake --build "${{ env.BUILD_DIR }}" --target therock-dist therock-archives -- -k 0
120+
- name: Build therock-archives and therock-dist
121+
run: cmake --build "${{ env.BUILD_DIR }}" --target therock-archives therock-dist -- -k 0
122122

123123
- name: Report
124124
if: ${{ !cancelled() }}

.github/workflows/build_windows_pytorch_wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
python build_tools/github_actions/python_to_cp_version.py \
124124
--python-version ${{ inputs.python_version }}
125125
126-
# TODO(amd-justchen): share with build_windows_packages.yml. Include in VM image? Dockerfile?
126+
# TODO(amd-justchen): share with build_windows_artifacts.yml. Include in VM image? Dockerfile?
127127
- name: Install requirements
128128
run: |
129129
choco install --no-progress -y ninja --version 1.13.1

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
test_runs_on: ${{ matrix.families.test-runs-on }}
7979
artifact_run_id: ${{ inputs.artifact_run_id }}
8080
expect_failure: ${{ matrix.families.expect_failure == true }}
81-
linux_use_prebuilt_artifacts: ${{ inputs.linux_use_prebuilt_artifacts == true && 'true' || 'false' }}
81+
use_prebuilt_artifacts: ${{ inputs.linux_use_prebuilt_artifacts == true && 'true' || 'false' }}
8282
permissions:
8383
contents: read
8484
id-token: write
@@ -102,7 +102,7 @@ jobs:
102102
artifact_run_id: ${{ inputs.artifact_run_id }}
103103
extra_cmake_options: ${{ matrix.extra_cmake_options }}
104104
expect_failure: ${{ matrix.families.expect_failure == true }}
105-
windows_use_prebuilt_artifacts: ${{ inputs.windows_use_prebuilt_artifacts == true && 'true' || 'false' }}
105+
use_prebuilt_artifacts: ${{ inputs.windows_use_prebuilt_artifacts == true && 'true' || 'false' }}
106106
permissions:
107107
contents: read
108108
id-token: write

.github/workflows/ci_linux.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ on:
1111
type: string
1212
expect_failure:
1313
type: boolean
14-
linux_use_prebuilt_artifacts:
14+
use_prebuilt_artifacts:
1515
type: string
1616

1717
permissions:
1818
contents: read
1919

2020
jobs:
21-
build_linux_packages:
21+
build_portable_linux_artifacts:
2222
name: Build
23-
if: ${{ inputs.linux_use_prebuilt_artifacts == 'false' }}
24-
uses: ./.github/workflows/build_linux_packages.yml
23+
if: ${{ inputs.use_prebuilt_artifacts == 'false' }}
24+
uses: ./.github/workflows/build_portable_linux_artifacts.yml
2525
secrets: inherit
2626
with:
2727
amdgpu_families: ${{ inputs.amdgpu_families }}
@@ -30,23 +30,23 @@ jobs:
3030
contents: read
3131
id-token: write
3232

33-
test_linux_packages:
34-
needs: [build_linux_packages]
33+
test_linux_artifacts:
34+
needs: [build_portable_linux_artifacts]
3535
name: Test
3636
# If the dependent job failed/cancelled, this job will not be run
37-
# The linux_use_prebuilt_artifacts "or" statement ensures that tests will run if previous build step is run or skipped.concurrency.
37+
# The use_prebuilt_artifacts "or" statement ensures that tests will run if previous build step is run or skipped.concurrency.
3838
if: >-
3939
${{
4040
!failure() &&
4141
!cancelled() &&
4242
(
43-
inputs.linux_use_prebuilt_artifacts == 'false' ||
44-
inputs.linux_use_prebuilt_artifacts == 'true'
43+
inputs.use_prebuilt_artifacts == 'false' ||
44+
inputs.use_prebuilt_artifacts == 'true'
4545
)
4646
}}
4747
strategy:
4848
fail-fast: false
49-
uses: ./.github/workflows/test_packages.yml
49+
uses: ./.github/workflows/test_artifacts.yml
5050
with:
5151
amdgpu_families: ${{ inputs.amdgpu_families }}
5252
test_runs_on: ${{ inputs.test_runs_on }}

.github/workflows/ci_nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
test_runs_on: ${{ matrix.families.test-runs-on }}
6666
artifact_run_id: ${{ inputs.artifact_run_id }}
6767
expect_failure: ${{ matrix.families.expect_failure == true }}
68-
linux_use_prebuilt_artifacts: ${{ inputs.linux_use_prebuilt_artifacts == true && 'true' || 'false' }}
68+
use_prebuilt_artifacts: ${{ inputs.linux_use_prebuilt_artifacts == true && 'true' || 'false' }}
6969
permissions:
7070
contents: read
7171
id-token: write
@@ -89,7 +89,7 @@ jobs:
8989
artifact_run_id: ${{ inputs.artifact_run_id }}
9090
extra_cmake_options: ${{ matrix.extra_cmake_options }}
9191
expect_failure: ${{ matrix.families.expect_failure == true }}
92-
windows_use_prebuilt_artifacts: ${{ inputs.windows_use_prebuilt_artifacts == true && 'true' || 'false' }}
92+
use_prebuilt_artifacts: ${{ inputs.windows_use_prebuilt_artifacts == true && 'true' || 'false' }}
9393
permissions:
9494
contents: read
9595
id-token: write

.github/workflows/ci_windows.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
type: string
1212
expect_failure:
1313
type: boolean
14-
windows_use_prebuilt_artifacts:
14+
use_prebuilt_artifacts:
1515
type: string
1616
extra_cmake_options:
1717
type: string
@@ -21,10 +21,10 @@ permissions:
2121
contents: read
2222

2323
jobs:
24-
build_windows_packages:
24+
build_windows_artifacts:
2525
name: Build
26-
if: ${{ inputs.windows_use_prebuilt_artifacts == 'false' }}
27-
uses: ./.github/workflows/build_windows_packages.yml
26+
if: ${{ inputs.use_prebuilt_artifacts == 'false' }}
27+
uses: ./.github/workflows/build_windows_artifacts.yml
2828
with:
2929
amdgpu_families: ${{ inputs.amdgpu_families }}
3030
extra_cmake_options: ${{ inputs.extra_cmake_options }}
@@ -33,23 +33,23 @@ jobs:
3333
contents: read
3434
id-token: write
3535

36-
test_windows_packages:
37-
needs: [build_windows_packages]
36+
test_windows_artifacts:
37+
needs: [build_windows_artifacts]
3838
name: Test
3939
# If the dependent job failed/cancelled, this job will not be run
40-
# The windows_use_prebuilt_artifacts "or" statement ensures that tests will run if previous build step is run or skipped.concurrency.
40+
# The use_prebuilt_artifacts "or" statement ensures that tests will run if previous build step is run or skipped.concurrency.
4141
if: >-
4242
${{
4343
!failure() &&
4444
!cancelled() &&
4545
(
46-
inputs.windows_use_prebuilt_artifacts == 'false' ||
47-
inputs.windows_use_prebuilt_artifacts == 'true'
46+
inputs.use_prebuilt_artifacts == 'false' ||
47+
inputs.use_prebuilt_artifacts == 'true'
4848
)
4949
}}
5050
strategy:
5151
fail-fast: false
52-
uses: ./.github/workflows/test_packages.yml
52+
uses: ./.github/workflows/test_artifacts.yml
5353
with:
5454
amdgpu_families: ${{ inputs.amdgpu_families }}
5555
test_runs_on: ${{ inputs.test_runs_on }}

.github/workflows/release_windows_packages.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
run: |
156156
pip install -r requirements.txt
157157
158-
# TODO(amd-justchen): share with build_windows_packages.yml. Include in VM image? Dockerfile?
158+
# TODO(amd-justchen): share with build_windows_artifacts.yml. Include in VM image? Dockerfile?
159159
- name: Install requirements
160160
run: |
161161
choco install --no-progress -y ccache
@@ -175,7 +175,6 @@ jobs:
175175
- name: Configure MSVC
176176
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
177177

178-
# TODO(#762): Move to script and share with build_windows_packages.yml.
179178
- name: Runner health status
180179
run: |
181180
ccache --zero-stats

.github/workflows/test_packages.yml renamed to .github/workflows/test_artifacts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test Packages
1+
name: Test Artifacts
22

33
on:
44
workflow_dispatch:

build_tools/github_actions/configure_ci.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ def get_modified_paths(base_ref: str) -> Optional[Iterable[str]]:
9292
# At time of writing, workflows run in this sequence:
9393
# `ci.yml`
9494
# `ci_linux.yml`
95-
# `build_linux_packages.yml`
96-
# `test_linux_packages.yml`
97-
# `test_[rocm subproject].yml`
95+
# `build_linux_artifacts.yml`
96+
# `test_artifacts.yml`
97+
# `test_component.yml`
9898
# If we add external-builds tests there, we can revisit this, maybe leaning
9999
# on options like LINUX_USE_PREBUILT_ARTIFACTS or sufficient caching to keep
100100
# workflows efficient when only nodes closer to the edges of the build graph
@@ -120,9 +120,10 @@ def check_for_non_skippable_path(paths: Optional[Iterable[str]]) -> bool:
120120
GITHUB_WORKFLOWS_CI_PATTERNS = [
121121
"setup.yml",
122122
"ci*.yml",
123-
"build*package*.yml",
124-
"test*packages.yml",
125-
"test*.yml", # This may be too broad, but there are many test workflows.
123+
"build*artifact*.yml",
124+
"test*artifacts.yml",
125+
"test_sanity_check.yml",
126+
"test_component.yml",
126127
]
127128

128129

0 commit comments

Comments
 (0)