-
Notifications
You must be signed in to change notification settings - Fork 67
145 lines (127 loc) · 4.74 KB
/
python-api-test.yml
File metadata and controls
145 lines (127 loc) · 4.74 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
name: Build and Test PUMI Python Interface
on:
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
PYTHONPATH: ${{ github.workspace }}/build/python_wrappers
LD_LIBRARY_PATH: ${{ github.workspace }}/libs/install/lib:${LD_LIBRARY_PATH}
CCACHE_DIR: ${{github.workspace}}/.ccache
CCACHE_BASEDIR: ${{github.workspace}}
CCACHE_COMPRESS: true
CCACHE_MAXSIZE: 100M
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: setup cache timestamp
id: setup-cache
run: |
echo timestamp=$(date -u '+%Y-%m-%dT%T') >> "$GITHUB_OUTPUT"
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: "pyapi-pip-${{steps.setup-cache.outputs.timestamp}}"
restore-keys: pyapi-pip-
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y mpich libbz2-dev ccache
mkdir -p /opt/ccache/libexec
ln -s $(which ccache) /opt/ccache/libexec/gcc
ln -s $(which ccache) /opt/ccache/libexec/g++
ln -s $(which ccache) /opt/ccache/libexec/cc
ln -s $(which ccache) /opt/ccache/libexec/c++
pip3 install mpi4py
- name: ccache
uses: actions/cache@v4
with:
path: ${{github.workspace}}/.ccache
key: "pyapi-ccache-${{steps.setup-cache.outputs.timestamp}}"
restore-keys: "pyapi-ccache-"
- name: Clear ccache statistics
run: |
ccache -p # Print ccache config
ccache -z
- name: Build SWIG
run: |
git clone https://github.com/swig/swig.git
cd swig
export PATH=/opt/ccache/libexec:$PATH
./autogen.sh
./configure --prefix=${{ github.workspace }}/libs/install
make
make install
- name: Build GKlib
run: |
git clone https://github.com/KarypisLab/GKlib.git
cd GKlib
installDir=${{ github.workspace }}/libs/install
make config prefix=$installDir shared=1
make install
ln -s $installDir/lib/libGKlib.so.0 $installDir/lib/libGKlib.so #https://github.com/KarypisLab/GKlib/issues/49
- name: Build METIS
run: |
git clone https://github.com/KarypisLab/METIS.git
cd METIS
make config prefix=${{ github.workspace }}/libs/install shared=1
make install
- name: Build ParMETIS
run: |
git clone https://github.com/KarypisLab/ParMETIS.git
cd ParMETIS
make config prefix=${{ github.workspace }}/libs/install shared=1
make install
- name: Build Zoltan from Trilinos (minimal)
run: |
git clone --depth 1 https://github.com/trilinos/Trilinos.git
cmake -S Trilinos -B build-zoltan \
-GNinja \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/libs/install \
-DTPL_ENABLE_MPI:BOOL=ON \
-DCMAKE_C_FLAGS="-O3 -fPIC" \
-DCMAKE_CXX_FLAGS="-O3 -fPIC" \
-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
-DTrilinos_ENABLE_Zoltan:BOOL=ON \
-DZoltan_ENABLE_EXAMPLES:BOOL=OFF \
-DZoltan_ENABLE_TESTS:BOOL=OFF \
-DZoltan_ENABLE_ParMETIS:BOOL=ON \
-DParMETIS_INCLUDE_DIRS=${{ github.workspace }}/libs/install \
-DParMETIS_LIBRARY_DIRS=${{ github.workspace }}/libs/install
cmake --build build-zoltan -t install
- name: Configure PUMI
run: |
cmake -S . -B build \
-GNinja \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpicxx \
-DSCOREC_CXX_OPTIMIZE=ON \
-DMDS_ID_TYPE=int \
-DPCU_COMPRESS=ON \
-DENABLE_ZOLTAN=ON \
-DZOLTAN_PREFIX=${{ github.workspace }}/libs/install \
-DPUMI_PYTHON_INTERFACE=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_EXES=OFF \
-DIS_TESTING=OFF \
-DENABLE_OMEGA_H=OFF \
-DPARMETIS_PREFIX=${{ github.workspace }}/libs/install \
-DENABLE_SIMMETRIX=OFF
- name: Build and install PUMI
run: |
cmake --build build --target install
- name: Run Python test
working-directory: ${{github.workspace}}/python_wrappers
run: |
python3 test_pyCore.py -g input/cube.dmg -m input/cube.smb
- name: Ccache statistics and recompression
run: |
ccache -sv
ccache -X 5