Skip to content

Commit d7a89fa

Browse files
authored
Merge branch 'develop' into yus/cdash
2 parents 0dfbf68 + ceab906 commit d7a89fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+5688
-2195
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Cleanup caches on closed PRs
2+
# From https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
3+
on:
4+
pull_request:
5+
types: [ closed ]
6+
jobs:
7+
cleanup:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
actions: write
11+
steps:
12+
- name: Cleanup
13+
run: |
14+
echo "Fetching list of cache keys"
15+
cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
16+
while [ "$cacheKeysForPR" ]; do
17+
for cacheKey in $cacheKeysForPR; do
18+
echo gh cache delete $cacheKey
19+
gh cache delete $cacheKey
20+
done
21+
cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
22+
done
23+
env:
24+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
GH_REPO: ${{ github.repository }}
26+
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge

.github/workflows/cmake.yml

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ on:
44
branches: [ develop ]
55
pull_request:
66
branches: [ develop ]
7+
paths:
8+
- .github/workflows/cmake.yml
9+
- .gitmodules
10+
- '**/CMakeLists.txt'
11+
- '**/*.cmake'
12+
- '**/*.in'
13+
- '**/*.h'
14+
- '**/*.c'
15+
- '**/*.cc'
16+
- '**/*.cpp'
17+
- '**/*.f'
718
jobs:
819
build:
920
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
@@ -16,6 +27,20 @@ jobs:
1627
- { name: LLVM, CC: clang, CXX: clang++ }
1728
build_type: [Debug, Release]
1829
no_mpi: [OFF, ON]
30+
cxx_standard: [11, 20]
31+
metis: [OFF, ON]
32+
exclude:
33+
- compiler: { name: LLVM }
34+
build_type: Release
35+
- cxx_standard: 20
36+
build_type: Release
37+
env:
38+
CCACHE_DIR: ${{github.workspace}}/.ccache
39+
CCACHE_BASEDIR: ${{github.workspace}}
40+
CCACHE_COMPRESS: true
41+
CCACHE_MAXSIZE: 100M
42+
CMAKE_C_COMPILER_LAUNCHER: ccache
43+
CMAKE_CXX_COMPILER_LAUNCHER: ccache
1944

2045
steps:
2146
- uses: actions/checkout@v4
@@ -26,34 +51,76 @@ jobs:
2651
run: |
2752
sudo apt update
2853
sudo apt install gcc-10 g++-10 mpich
54+
- name: install metis
55+
if: matrix.metis == 'ON'
56+
run: sudo apt install libmetis-dev
57+
58+
- name: setup ccache
59+
id: setup-ccache
60+
run: |
61+
sudo apt-get install ccache
62+
ccache -p # Print ccache config
63+
echo timestamp=$(date -u '+%Y-%m-%dT%T') >> "$GITHUB_OUTPUT"
64+
65+
- name: ccache
66+
uses: actions/cache@v4
67+
with:
68+
path: ${{github.workspace}}/.ccache
69+
key: "${{matrix.compiler.name}}-\
70+
cxx:${{matrix.cxx_standard}}-\
71+
${{matrix.build_type}}-\
72+
nompi:${{matrix.no_mpi}}-\
73+
ccache-${{steps.setup-ccache.outputs.timestamp}}"
74+
restore-keys: "${{matrix.compiler.name}}-\
75+
cxx:${{matrix.cxx_standard}}-\
76+
${{matrix.build_type}}-\
77+
nompi:${{matrix.no_mpi}}-\
78+
ccache-"
79+
80+
- name: Clear ccache statistics
81+
run: ccache -z
2982

3083
- name: Configure CMake
3184
env:
3285
MPICH_CXX: ${{matrix.compiler.CXX}}
3386
MPICH_CC: ${{matrix.compiler.CC}}
34-
run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_COMPILER=mpicc -DCMAKE_VERBOSE_MAKEFILE=ON -DMESHES=${{github.workspace}}/pumi-meshes -DIS_TESTING=ON -DSCOREC_CXX_WARNINGS=ON -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install -DSCOREC_NO_MPI=${{matrix.no_mpi}}
87+
run: >
88+
cmake -S ${{github.workspace}} -B ${{github.workspace}}/build
89+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install
90+
-GNinja -DCMAKE_VERBOSE_MAKEFILE=ON
91+
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
92+
-DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_COMPILER=mpicc
93+
-DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}}
94+
-DSCOREC_CXX_WARNINGS=ON
95+
-DIS_TESTING=ON
96+
-DMESHES=${{github.workspace}}/pumi-meshes
97+
-DSCOREC_NO_MPI=${{matrix.no_mpi}}
98+
-DENABLE_METIS=${{matrix.metis}}
3599
36100
- name: Build
37101
env:
38102
MPICH_CXX: ${{matrix.compiler.CXX}}
39103
MPICH_CC: ${{matrix.compiler.CC}}
40-
run: cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}} -j --target install
104+
run: cmake --build ${{github.workspace}}/build --target install
41105

42106
- name: Test
43107
env:
44108
MPICH_CXX: ${{matrix.compiler.CXX}}
45109
MPICH_CC: ${{matrix.compiler.CC}}
46110
working-directory: ${{github.workspace}}/build
47-
run: ctest --output-on-failure -C ${{matrix.build_type}}
111+
run: ctest --output-on-failure
48112

49113
- name: Build User Project
50114
# only need to test with a single build config if the installed cmake config files work
51115
if: matrix.compiler.name == 'GNU' && matrix.build_type == 'Release'
52116
env:
53117
MPICH_CXX: ${{matrix.compiler.CXX}}
54118
MPICH_CC: ${{matrix.compiler.CC}}
55-
run: |
56-
cmake -S ${{github.workspace}}/doc -B ${{github.workspace}}/buildExample -DCMAKE_CXX_COMPILER=mpicxx -DSCOREC_PREFIX=${{github.workspace}}/build/install
119+
run: >
120+
cmake
121+
-S ${{github.workspace}}/doc -B ${{github.workspace}}/buildExample
122+
-DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx
123+
-DSCOREC_PREFIX=${{github.workspace}}/build/install ;
57124
cmake --build ${{github.workspace}}/buildExample
58125
59126
- name: Build MPI-NoMPI Example
@@ -65,10 +132,17 @@ jobs:
65132
MPICH_CXX: ${{matrix.compiler.CXX}}
66133
MPICH_CC: ${{matrix.compiler.CC}}
67134
run: >
68-
cmake -S ${{github.workspace}}/example/mpi-nompi
135+
cmake
136+
-S ${{github.workspace}}/example/mpi-nompi
69137
-B ${{github.workspace}}/example/mpi-nompi/build
70-
-DCMAKE_CXX_COMPILER=mpicxx
138+
-DCMAKE_C_COMPILER=mpicxx -DCMAKE_CXX_COMPILER=mpicxx
71139
-DSCOREC_PREFIX=${{github.workspace}}/build/install ;
72140
cmake --build ${{github.workspace}}/example/mpi-nompi/build ;
73141
ctest --test-dir ${{github.workspace}}/example/mpi-nompi/build
74142
--output-on-failure
143+
144+
- name: CCache statistics and recompression
145+
run: |
146+
ccache -sv
147+
ccache -X 5
148+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Doxygen GitHub Pages Deploy Action
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-22.04
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
20+
- name: Install dependencies
21+
run: |
22+
sudo apt update
23+
sudo apt install gcc-10 g++-10 mpich doxygen
24+
25+
- name: Configure CMake
26+
env:
27+
MPICH_CXX: g++-10
28+
MPICH_CC: gcc-10
29+
run: cmake -S ${{github.workspace}} -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=mpicxx -DCMAKE_C_COMPILER=mpicc -DCMAKE_VERBOSE_MAKEFILE=ON -DMESHES=${{github.workspace}}/pumi-meshes -DIS_TESTING=ON -DSCOREC_CXX_WARNINGS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install -DSCOREC_NO_MPI=ON
30+
31+
- name: Generate Doc
32+
run: doxygen ${{github.workspace}}/build/Doxyfile
33+
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: ./doc/html
38+
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v4
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
name: Build and Test PUMI Python Interface
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
pull_request:
7+
branches: [develop]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
env:
14+
PYTHONPATH: ${{ github.workspace }}/build/python_wrappers
15+
LD_LIBRARY_PATH: ${{ github.workspace }}/libs/install/lib:${LD_LIBRARY_PATH}
16+
CCACHE_DIR: ${{github.workspace}}/.ccache
17+
CCACHE_BASEDIR: ${{github.workspace}}
18+
CCACHE_COMPRESS: true
19+
CCACHE_MAXSIZE: 100M
20+
CMAKE_C_COMPILER_LAUNCHER: ccache
21+
CMAKE_CXX_COMPILER_LAUNCHER: ccache
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v3
26+
27+
- name: setup cache timestamp
28+
id: setup-cache
29+
run: |
30+
echo timestamp=$(date -u '+%Y-%m-%dT%T') >> "$GITHUB_OUTPUT"
31+
32+
- name: Cache pip
33+
uses: actions/cache@v4
34+
with:
35+
path: ~/.cache/pip
36+
key: "pyapi-pip-${{steps.setup-cache.outputs.timestamp}}"
37+
restore-keys: pyapi-pip-
38+
39+
- name: Install dependencies
40+
run: |
41+
sudo apt-get update
42+
sudo apt-get install -y mpich libbz2-dev ccache
43+
mkdir -p /opt/ccache/libexec
44+
ln -s $(which ccache) /opt/ccache/libexec/gcc
45+
ln -s $(which ccache) /opt/ccache/libexec/g++
46+
ln -s $(which ccache) /opt/ccache/libexec/cc
47+
ln -s $(which ccache) /opt/ccache/libexec/c++
48+
pip3 install mpi4py
49+
50+
- name: ccache
51+
uses: actions/cache@v4
52+
with:
53+
path: ${{github.workspace}}/.ccache
54+
key: "pyapi-ccache-${{steps.setup-cache.outputs.timestamp}}"
55+
restore-keys: "pyapi-ccache-"
56+
57+
- name: Clear ccache statistics
58+
run: |
59+
ccache -p # Print ccache config
60+
ccache -z
61+
62+
- name: Build SWIG
63+
run: |
64+
git clone https://github.com/swig/swig.git
65+
cd swig
66+
export PATH=/opt/ccache/libexec:$PATH
67+
./autogen.sh
68+
./configure --prefix=${{ github.workspace }}/libs/install
69+
make
70+
make install
71+
72+
- name: Build GKlib
73+
run: |
74+
git clone https://github.com/KarypisLab/GKlib.git
75+
cd GKlib
76+
make config prefix=${{ github.workspace }}/libs/install
77+
make install
78+
79+
- name: Build METIS
80+
run: |
81+
git clone https://github.com/KarypisLab/METIS.git
82+
cd METIS
83+
make config prefix=${{ github.workspace }}/libs/install
84+
make install
85+
86+
- name: Build ParMETIS
87+
run: |
88+
git clone https://github.com/KarypisLab/ParMETIS.git
89+
cd ParMETIS
90+
make config prefix=${{ github.workspace }}/libs/install
91+
make install
92+
93+
- name: Build Zoltan from Trilinos (minimal)
94+
run: |
95+
git clone --depth 1 https://github.com/trilinos/Trilinos.git
96+
cmake -S Trilinos -B build-zoltan \
97+
-GNinja \
98+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/libs/install \
99+
-DTPL_ENABLE_MPI:BOOL=ON \
100+
-DCMAKE_C_FLAGS="-O3 -fPIC" \
101+
-DCMAKE_CXX_FLAGS="-O3 -fPIC" \
102+
-DTrilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \
103+
-DTrilinos_ENABLE_Zoltan:BOOL=ON \
104+
-DZoltan_ENABLE_EXAMPLES:BOOL=OFF \
105+
-DZoltan_ENABLE_TESTS:BOOL=OFF \
106+
-DZoltan_ENABLE_ParMETIS:BOOL=ON \
107+
-DParMETIS_INCLUDE_DIRS=${{ github.workspace }}/libs/install \
108+
-DParMETIS_LIBRARY_DIRS=${{ github.workspace }}/libs/install
109+
cmake --build build-zoltan -t install
110+
111+
- name: Configure PUMI
112+
run: |
113+
cmake -S . -B build \
114+
-GNinja \
115+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install \
116+
-DCMAKE_C_COMPILER=mpicc \
117+
-DCMAKE_CXX_COMPILER=mpicxx \
118+
-DSCOREC_CXX_OPTIMIZE=ON \
119+
-DMDS_ID_TYPE=int \
120+
-DPCU_COMPRESS=ON \
121+
-DENABLE_ZOLTAN=ON \
122+
-DZOLTAN_PREFIX=${{ github.workspace }}/libs/install \
123+
-DPUMI_PYTHON_INTERFACE=ON \
124+
-DBUILD_SHARED_LIBS=ON \
125+
-DBUILD_EXES=OFF \
126+
-DIS_TESTING=OFF \
127+
-DENABLE_OMEGA_H=OFF \
128+
-DPARMETIS_PREFIX=${{ github.workspace }}/libs/install \
129+
-DENABLE_SIMMETRIX=OFF
130+
131+
- name: Build and install PUMI
132+
run: |
133+
cmake --build build --target install
134+
135+
- name: Run Python test
136+
working-directory: ${{github.workspace}}/python_wrappers
137+
run: |
138+
python3 test_pyCore.py -g input/cube.dmg -m input/cube.smb
139+
140+
- name: Ccache statistics and recompression
141+
run: |
142+
ccache -sv
143+
ccache -X 5

0 commit comments

Comments
 (0)