-
Notifications
You must be signed in to change notification settings - Fork 17
172 lines (145 loc) · 5.56 KB
/
Copy pathgithub-actions.yml
File metadata and controls
172 lines (145 loc) · 5.56 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
161
162
163
164
165
166
167
168
169
170
171
172
name: PerfFlowAspect CI
on: [ push, pull_request ]
jobs:
build-c:
name: check c bindings
runs-on: ubuntu-24.04
strategy:
matrix:
config: [boilerplate, release, debug_cuda_only, debug_mpi_only, debug_threads_only, boilerplate_caliper]
include:
- config: boilerplate
PERFFLOWASPECT_WITH_CUDA: OFF
PERFFLOWASPECT_WITH_MPI: ON
PERFFLOWASPECT_WITH_MULTITHREADS: ON
CMAKE_BUILD_TYPE: Debug
PERFFLOWASPECT_WITH_CALIPER: OFF
- config: release
PERFFLOWASPECT_WITH_CUDA: OFF
PERFFLOWASPECT_WITH_MPI: ON
PERFFLOWASPECT_WITH_MULTITHREADS: ON
CMAKE_BUILD_TYPE: Release
PERFFLOWASPECT_WITH_CALIPER: OFF
- config: debug_cuda_only
PERFFLOWASPECT_WITH_CUDA: OFF
PERFFLOWASPECT_WITH_MPI: OFF
PERFFLOWASPECT_WITH_MULTITHREADS: OFF
CMAKE_BUILD_TYPE: Debug
PERFFLOWASPECT_WITH_CALIPER: OFF
- config: debug_mpi_only
PERFFLOWASPECT_WITH_CUDA: OFF
PERFFLOWASPECT_WITH_MPI: ON
PERFFLOWASPECT_WITH_MULTITHREADS: OFF
CMAKE_BUILD_TYPE: Debug
PERFFLOWASPECT_WITH_CALIPER: OFF
- config: debug_threads_only
PERFFLOWASPECT_WITH_CUDA: OFF
PERFFLOWASPECT_WITH_MPI: OFF
PERFFLOWASPECT_WITH_MULTITHREADS: ON
CMAKE_BUILD_TYPE: Debug
PERFFLOWASPECT_WITH_CALIPER: OFF
- config: boilerplate_caliper
PERFFLOWASPECT_WITH_CUDA: OFF
PERFFLOWASPECT_WITH_MPI: OFF
PERFFLOWASPECT_WITH_MULTITHREADS: OFF
CMAKE_BUILD_TYPE: Debug
PERFFLOWASPECT_WITH_CALIPER: ON
steps:
# Checkout PerfFlowAspect repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- name: Setup Build Env
run: |
sudo apt-get update
sudo apt install clang-20 llvm-dev libjansson-dev libssl-dev bison flex make cmake mpich pybind11-dev
clang++-20 --version
- name: Clone Caliper
uses: actions/checkout@v2
with:
repository: LLNL/Caliper
path: Caliper
- name: Build Caliper
working-directory: Caliper
run: |
mkdir build && mkdir install
cd build
cmake -DWITH_PYTHON_BINDINGS=On -DCMAKE_INSTALL_PREFIX=../install ../
make VERBOSE=1
make install
- name: Compile check
run: |
cd src/c
mkdir build install
cd build
export CMAKE_OPTS="-DCMAKE_CXX_COMPILER=clang++-20 -DLLVM_DIR=/usr/lib/llvm-20/cmake -DCMAKE_INSTALL_PREFIX=../install"
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_BUILD_TYPE=${{matrix.CMAKE_BUILD_TYPE}}"
export CMAKE_OPTS="${CMAKE_OPTS} -DPERFFLOWASPECT_WITH_CUDA=${{matrix.PERFFLOWASPECT_WITH_CUDA}}"
export CMAKE_OPTS="${CMAKE_OPTS} -DPERFFLOWASPECT_WITH_MPI=${{matrix.PERFFLOWASPECT_WITH_MPI}}"
export CMAKE_OPTS="${CMAKE_OPTS} -DPERFFLOWASPECT_WITH_MULTITHREADS=${{matrix.PERFFLOWASPECT_WITH_MULTITHREADS}}"
export CMAKE_OPTS="${CMAKE_OPTS} -DPERFFLOWASPECT_WITH_CALIPER=${{matrix.PERFFLOWASPECT_WITH_CALIPER}} -Dcaliper_DIR=/home/runner/work/PerfFlowAspect/PerfFlowAspect/Caliper/install"
echo -e ${CMAKE_OPTS}
cmake ${CMAKE_OPTS} ..
# build
make VERBOSE=1
# install
make install
- name: Run C Smoke Tests
run: |
cd src/c/install/test
./t0001-cbinding-basic.t
build-python:
name: check python bindings
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
steps:
# Checkout PerfFlowAspect repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip pytest setuptools
cd src/python
python -m pip install -r requirements.txt
python -m pip list
# Export path for caliper
export PYTHONPATH="/home/runner/work/PerfFlowAspect/PerfFlowAspect/Caliper/install/lib/${{ matrix.python-version }}/site-packages:$PYTHONPATH"
- name: Run Python Smoke Tests
run: |
cd src/python/test
./t0001-pybinding-basic.t
check-code-format:
runs-on: ubuntu-latest
steps:
# Checkout PerfFlowAspect repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- name: Setup build environment
run: |
sudo apt install pipx
pipx ensurepath
- name: Style check c/cpp/h files
run: |
sudo apt-get update
sudo apt-get install astyle
astyle --version
cd ${GITHUB_WORKSPACE}
./scripts/.ci-check-c-code-format.sh
err=$?
if [ $err -eq 0 ]; then exit 0; else echo -e "Formatting issue found in C/C++ files. Please run ./scripts/check-c-code-format.sh"; exit 1; fi
- name: Install python dependencies
run: |
pipx install flake8==7.1.2 rstfmt
pipx install black
- name: Format check with flake8 and black
run: |
cd src/python
black --diff --check .
flake8
- name: Format check with rstfmt
run: |
cd ${GITHUB_WORKSPACE}
./scripts/.ci-check-rst-format.sh