-
Notifications
You must be signed in to change notification settings - Fork 3
194 lines (178 loc) · 5.69 KB
/
cpack.yml
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: Installer Packaging (CPack)
run-name: cpack
on:
workflow_dispatch:
push:
branches: [amd-staging, amd-mainline, release/**]
tags:
- "v[1-9].[0-9]+.[0-9]+*"
- "rocm-[1-9].[0-9]+.[0-9]+*"
paths-ignore:
- '*.md'
- 'docs/**'
- 'source/docs/**'
pull_request:
branches: [amd-staging, amd-mainline, release/**]
paths:
- '.github/workflows/cpack.yml'
- 'docker/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
jobs:
installers:
if: github.repository == 'ROCm/rocprofiler-systems'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
# ubuntu 20.04
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "0.0"
- os-distro: "ubuntu"
os-version: "20.04"
rocm-version: "6.2"
# ubuntu 22.04
- os-distro: "ubuntu"
os-version: "22.04"
rocm-version: "0.0"
- os-distro: "ubuntu"
os-version: "22.04"
rocm-version: "6.2"
# ubuntu 24.04
- os-distro: "ubuntu"
os-version: "24.04"
rocm-version: "0.0"
- os-distro: "ubuntu"
os-version: "24.04"
rocm-version: "6.2"
# opensuse 15.5
- os-distro: "opensuse"
os-version: "15.5"
rocm-version: "0.0"
- os-distro: "opensuse"
os-version: "15.5"
rocm-version: "6.2"
# opensuse 15.6
- os-distro: "opensuse"
os-version: "15.6"
rocm-version: "0.0"
- os-distro: "opensuse"
os-version: "15.6"
rocm-version: "6.2"
# RHEL 8.8
- os-distro: "rhel"
os-version: "8.8"
rocm-version: "0.0"
- os-distro: "rhel"
os-version: "8.8"
rocm-version: "6.2"
# RHEL 8.9
- os-distro: "rhel"
os-version: "8.9"
rocm-version: "0.0"
- os-distro: "rhel"
os-version: "8.9"
rocm-version: "6.2"
# RHEL 8.10
- os-distro: "rhel"
os-version: "8.10"
rocm-version: "0.0"
- os-distro: "rhel"
os-version: "8.10"
rocm-version: "6.2"
# RHEL 9.2
- os-distro: "rhel"
os-version: "9.2"
rocm-version: "0.0"
- os-distro: "rhel"
os-version: "9.2"
rocm-version: "6.2"
# RHEL 9.3
- os-distro: "rhel"
os-version: "9.3"
rocm-version: "0.0"
- os-distro: "rhel"
os-version: "9.3"
rocm-version: "6.2"
# RHEL 9.4
- os-distro: "rhel"
os-version: "9.4"
rocm-version: "0.0"
- os-distro: "rhel"
os-version: "9.4"
rocm-version: "6.2"
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@v1.2.0
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: false
swap-storage: false
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure ROCm Version
if: ${{ matrix.rocm-version == 0 }}
run: |
echo "CI_SCRIPT_ARGS=--core +python" >> $GITHUB_ENV
- name: Configure ROCm Version
if: ${{ matrix.rocm-version > 0 }}
run: |
echo "CI_SCRIPT_ARGS=--rocm +python" >> $GITHUB_ENV
- name: Configure Generators
run: |
echo "CI_GENERATOR_ARGS=--generators STGZ" >> $GITHUB_ENV
- name: Build Base Container
timeout-minutes: 30
run: |
pushd docker
./build-docker.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }}
popd
- name: Build Release
timeout-minutes: 150
run: |
pushd docker
./build-docker-release.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- ${CI_SCRIPT_ARGS} ${CI_GENERATOR_ARGS}
popd
- name: List Files
timeout-minutes: 10
run: |
find build-release -type f | egrep '\.(sh|deb|rpm)$'
- name: STGZ Artifacts
timeout-minutes: 10
uses: actions/upload-artifact@v4
with:
name: rocprofiler-systems-stgz-${{ matrix.os-distro }}-${{ matrix.os-version }}-rocm-${{ matrix.rocm-version }}-installer
path: |
build-release/stgz/*.sh
# before testing remove any artifacts of the build
- name: Remove Build
timeout-minutes: 10
run: |
shopt -s nullglob
for i in $(find build-release -type f | egrep '/(stgz|deb|rpm)/.*\.(sh|deb|rpm)$'); do mv ${i} ./; done
sudo rm -rf build-release
sudo rm -rf /opt/rocprofiler-systems
- name: Test STGZ Install
timeout-minutes: 20
run: |
set -v
for i in rocprofiler-systems-*.sh
do
./docker/test-docker-release.sh --distro ${{ matrix.os-distro }} --versions ${{ matrix.os-version }} --rocm-versions ${{ matrix.rocm-version }} -- --stgz ${i}
done
- name: Upload STGZ Release Assets
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'ROCm/rocprofiler-systems'
with:
fail_on_unmatched_files: True
files: |
rocprofiler-systems-*.sh