Skip to content

Commit 6a11102

Browse files
authored
Merge pull request #1 from icl-utk-edu/gragghia/ci
Creating initial CI files
2 parents c366ba6 + 49ed2da commit 6a11102

File tree

2 files changed

+109
-0
lines changed

2 files changed

+109
-0
lines changed

.github/workflows/ci.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/bin/bash -e
2+
3+
COMPONENT=$1
4+
COMPILER=$2
5+
6+
[ -z "$COMPILER" ] && COMPILER=gcc@10
7+
8+
source /etc/profile
9+
set +x
10+
set -e
11+
trap 'echo "# $BASH_COMMAND"' DEBUG
12+
shopt -s expand_aliases
13+
14+
module load $COMPILER
15+
16+
cd src
17+
18+
if [ "$COMPONENT" = "lmsensors" ]; then
19+
wget https://github.com/groeck/lm-sensors/archive/V3-4-0.tar.gz
20+
tar -zxf V3-4-0.tar.gz
21+
cd lm-sensors-3-4-0
22+
make install PREFIX=../lm ETCDIR=../lm/etc
23+
cd ..
24+
export PAPI_LMSENSORS_ROOT=lm
25+
export PAPI_LMSENSORS_INC=$PAPI_LMSENSORS_ROOT/include/sensors
26+
export PAPI_LMSENSORS_LIB=$PAPI_LMSENSORS_ROOT/lib64
27+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PAPI_LMSENSORS_ROOT/lib
28+
fi
29+
30+
if [ "$COMPONENT" = "cuda" ] || [ "$COMPONENT" = "nvml" ]; then
31+
module load cuda
32+
export PAPI_CUDA_ROOT=$ICL_CUDA_ROOT
33+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PAPI_CUDA_ROOT/extras/CUPTI/lib64
34+
fi
35+
36+
if [ "$COMPONENT" = "rocm" ] || [ "$COMPONENT" = "rocm_smi" ]; then
37+
export PAPI_ROCM_ROOT=`ls -d /opt/rocm-*`
38+
export PAPI_ROCMSMI_ROOT=$PAPI_ROCM_ROOT/rocm_smi
39+
fi
40+
41+
if [ "$COMPONENT" = "infiniband_umad" ]; then
42+
export PAPI_INFINIBAND_UMAD_ROOT=/usr
43+
fi
44+
45+
if [ "$COMPONENT" = "perf_event" ]; then
46+
./configure --with-debug=yes
47+
else
48+
./configure --with-debug=yes --with-components=$COMPONENT
49+
fi
50+
51+
make -j4
52+
53+
utils/papi_component_avail
54+
55+
# Make sure the $COMPONENT is active
56+
utils/papi_component_avail | grep -A1000 'Active components' | grep -q "Name: $COMPONENT "
57+
58+
if [ "$COMPONENT" != "cuda" ]; then
59+
echo Testing
60+
./run_tests.sh
61+
fi

.github/workflows/main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
jobs:
13+
papi_component:
14+
strategy:
15+
matrix:
16+
component: [perf_event, lmsensors, io, net, powercap, appio, coretemp, stealtime]
17+
fail-fast: false
18+
runs-on: cpu_intel
19+
timeout-minutes: 60
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Test
23+
run: .github/workflows/ci.sh ${{matrix.component}}
24+
papi_component_nvidia:
25+
strategy:
26+
matrix:
27+
component: [cuda, nvml]
28+
fail-fast: false
29+
runs-on: gpu_nvidia
30+
timeout-minutes: 60
31+
steps:
32+
- uses: actions/checkout@v3
33+
- name: Test
34+
run: .github/workflows/ci.sh ${{matrix.component}}
35+
papi_component_amd:
36+
strategy:
37+
matrix:
38+
component: [rocm, rocm_smi]
39+
fail-fast: false
40+
runs-on: gpu_amd
41+
timeout-minutes: 60
42+
steps:
43+
- uses: actions/checkout@v3
44+
- name: Test
45+
run: .github/workflows/ci.sh ${{matrix.component}}
46+
# powercap_ppc
47+
# sensors_ppc
48+
# infiniband

0 commit comments

Comments
 (0)