-
Notifications
You must be signed in to change notification settings - Fork 49
106 lines (103 loc) · 3.72 KB
/
tarball.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
name: tarball
on:
push:
branches: [ amd-mainline, release/** ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
distbuild:
runs-on: ubuntu-latest
name: Create distribution tarball
env:
INSTALL_DIR: /tmp/foo1
steps:
- name: Set git sha mode
id: sha-mode
run: |
if [ "$EVENT" == 'pull_request' ]; then
echo "sha=${{github.event.pull_request.head.sha}}" >> $GITHUB_OUTPUT
else
echo "sha=$GITHUB_SHA" >> $GITHUB_OUTPUT
fi
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ steps.sha-mode.sha }}
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Python dependency installs
run: python3 -m pip install -t${INSTALL_DIR}/python-libs -r requirements.txt
- name: Configure
run: |
mkdir build
cd build
cmake -DPYTHON_DEPS=${INSTALL_DIR}/python-libs ..
- name: Release tarball
run: |
cd build
make package_source
- name: Archive tarball
uses: actions/upload-artifact@v4
with:
name: tarball-testing
path: build/rocprofiler-compute-*.tar.gz
retention-days: 3
disttest:
runs-on: ubuntu-latest
needs: [distbuild]
name: Tarball tests
env:
INSTALL_DIR: /tmp/foo2
steps:
- name: Access tarball
uses: actions/download-artifact@v4
with:
name: tarball-testing
- name: Expand
run: tar xfz rocprofiler-compute-*.tar.gz; rm rocprofiler-compute-*.tar.gz
- name: Python dependency installs
run: |
cd rocprofiler-compute-*
python3 -m pip install -t${INSTALL_DIR}/python-libs -r requirements.txt
- name: Configure
run: |
cd rocprofiler-compute-*
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/rocprofiler-compute \
-DPYTHON_DEPS=${INSTALL_DIR}/python-libs ..
- name: Install
run: |
cd rocprofiler-compute-*
cd build
make install
- name: Verify expected paths
run: |
# find $INSTALL_DIR
test -d $INSTALL_DIR/rocprofiler-compute
test -x $INSTALL_DIR/rocprofiler-compute/bin/rocprof-compute
test -s $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/VERSION
test -s $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/VERSION.sha
test -d $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/rocprof_compute_analyze
test -d $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/rocprof_compute_profile
test -d $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/rocprof_compute_soc
test -d $INSTALL_DIR/rocprofiler-compute/libexec/rocprofiler-compute/utils
test -s $INSTALL_DIR/rocprofiler-compute/share/rocprofiler-compute/sample/vcopy.cpp
test -d $INSTALL_DIR/rocprofiler-compute/share/rocprofiler-compute/modulefiles
- name: Query version (setting PYTHONPATH by hand)
run: |
export PYTHONPATH=${INSTALL_DIR}/python-libs:$PYTHONPATH
$INSTALL_DIR/rocprofiler-compute/bin/rocprof-compute --version
- name: Install Lmod
run: sudo apt-get install -y lmod
- name: Access rocprofiler-compute using modulefile
run: |
. /etc/profile.d/lmod.sh
module use $INSTALL_DIR/rocprofiler-compute/share/rocprofiler-compute/modulefiles
module load rocprofiler-compute
module list
rocprof-compute --version