-
Notifications
You must be signed in to change notification settings - Fork 237
160 lines (142 loc) · 5.85 KB
/
therock-ci-linux.yml
File metadata and controls
160 lines (142 loc) · 5.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: TheRock CI Linux
on:
workflow_call:
inputs:
cmake_options:
type: string
projects_to_test:
type: string
test_type:
type: string
amdgpu_families:
type: string
test_runs_on:
type: string
permissions:
contents: read
jobs:
therock-build-linux:
name: Build (${{ inputs.amdgpu_families }})
runs-on: azure-linux-scale-rocm
permissions:
id-token: write
container:
image: ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:4443d9d710b9471e8ef658d509358bd92602498e67161b9280474bce0bb0decd
options: -v /runner/config:/home/awsconfig/
strategy:
fail-fast: true
env:
CACHE_DIR: ${{ github.workspace }}/.container-cache
CCACHE_CONFIGPATH: ${{ github.workspace }}/.ccache/ccache.conf
AMDGPU_FAMILIES: ${{ inputs.amdgpu_families }}
TEATIME_FORCE_INTERACTIVE: 0
AWS_SHARED_CREDENTIALS_FILE: /home/awsconfig/credentials.ini
steps:
- name: "Checking out repository for rocm-libraries"
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Checkout TheRock repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: "ROCm/TheRock"
path: TheRock
ref: 1408a826dc2c3446a0295c0ef0c71c4d92f0f4f9 # 2026-03-16
- name: Install python deps
run: |
pip install -r TheRock/requirements.txt
- name: Patch rocm-libraries
run: |
# Remove patches here if they cannot be applied cleanly, and they have not been deleted from TheRock repo
# rm ./TheRock/patches/amd-mainline/rocm-libraries/*.patch
# git -c user.name="therockbot" -c "user.email=therockbot@amd.com" am --whitespace=nowarn ./TheRock/patches/amd-mainline/rocm-libraries/*.patch
# safe.directory must be set before Runner health status
- name: Adjust git config
run: |
git config --global --add safe.directory $PWD
git config fetch.parallel 10
- name: Setup ccache
run: |
./TheRock/build_tools/setup_ccache.py \
--config-preset "github-oss-presubmit" \
--dir "$(dirname $CCACHE_CONFIGPATH)" \
--local-path "$CACHE_DIR/ccache"
- name: Runner health status
run: |
./TheRock/build_tools/health_status.py
- name: Pull DVC files for rocm-libraries # LOGNAME details here https://github.com/ROCm/rocm-libraries/pull/1617
run: |
if command -v dvc &> /dev/null; then
echo "dvc detected"
else
echo "Warning, dvc not detected!"
fi
LOGNAME=github-runner dvc pull -v
- name: Fetch sources
timeout-minutes: 30
run: |
./TheRock/build_tools/fetch_sources.py --jobs 12 --no-include-rocm-libraries --no-include-ml-frameworks
- name: Configure Projects
env:
amdgpu_families: ${{ env.AMDGPU_FAMILIES }}
package_version: ADHOCBUILD
extra_cmake_options: "-DTHEROCK_ROCM_LIBRARIES_SOURCE_DIR=../ ${{ inputs.cmake_options }}"
BUILD_DIR: build
run: |
python3 TheRock/build_tools/github_actions/build_configure.py
- name: Build therock-archives and therock-dist
run: cmake --build TheRock/build --target therock-archives therock-dist -- -k 0
- name: Report
if: ${{ !cancelled() }}
run: |
echo "Full SDK du:"
echo "------------"
du -h -d 1 TheRock/build/dist/rocm
echo "Artifact Archives:"
echo "------------------"
ls -lh TheRock/build/artifacts/*.tar.xz
echo "Artifacts:"
echo "----------"
du -h -d 1 TheRock/build/artifacts
echo "CCache Stats:"
echo "-------------"
ccache -s -v
tail -v -n +1 .ccache/compiler_check_cache/* > TheRock/build/logs/ccache_compiler_check_cache.log
- name: Configure AWS Credentials for non-forked repos
if: ${{ always() && !github.event.pull_request.head.repo.fork }}
uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::692859939525:role/therock-ci-external
- name: Post Build Upload
if: always()
run: |
python3 TheRock/build_tools/github_actions/post_build_upload.py \
--run-id ${{ github.run_id }} \
--artifact-group ${{ env.AMDGPU_FAMILIES }} \
--build-dir TheRock/build \
--upload
- name: Notify MIOpen Teams Channel on Failure
# Channel name "MIOpen CI Reporting"
if: ${{ contains(inputs.projects_to_test, 'miopen') && failure() && github.event_name == 'push' }}
run: |
python3 .github/scripts/notify_teams.py \
--project miopen \
--failure_stage build \
--platform linux \
--log-path TheRock/build/logs \
--webhook-url "${{ secrets.MIOPEN_CI_WEBHOOK_URL }}" \
--pr-number "${{ github.event.pull_request.number }}" \
--pr-title "${{ github.event.pull_request.title }}"
therock-test-linux:
name: Test (${{ inputs.amdgpu_families }})
needs: [therock-build-linux]
# TODO(TheRock#3288): Re-enable gfx950-dcgpu runners once we get more capacity
# Due to migrating MI325s, we have lost capacity as of 3/13/2026 11:41am PST
if: ${{ inputs.amdgpu_families != 'gfx950-dcgpu' && inputs.amdgpu_families != 'gfx94X-dcgpu' }}
uses: ./.github/workflows/therock-test-packages.yml
with:
projects_to_test: ${{ inputs.projects_to_test }}
amdgpu_families: ${{ inputs.amdgpu_families }}
test_runs_on: ${{ inputs.test_runs_on }}
platform: "linux"
test_type: ${{ inputs.test_type }}
secrets: inherit