Skip to content

Commit 84186cd

Browse files
authored
Merge branch 'csrc-sdsu:main' into cylinder_branch
2 parents 0e10c5c + 30b32e3 commit 84186cd

20 files changed

Lines changed: 797 additions & 125 deletions

File tree

.github/workflows/ci.yml

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,47 @@ jobs:
3434
DEFAULT_BRANCH: main
3535
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3636

37+
- name: Install system deps
38+
run: |
39+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
40+
sudo add-apt-repository "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main"
41+
sudo apt-get update
42+
sudo apt-get install -y build-essential cmake clang clang-tidy-20 clang-format perl libarmadillo-dev libopenblas-dev libsuperlu-dev libeigen3-dev
43+
44+
- name: Gather source files
45+
id: files
46+
run: |
47+
# list C/C++ source files tracked by git
48+
echo "::set-output name=sources::$(git ls-files '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hpp' '*.hh' | tr '\n' ' ')"
49+
50+
- name: Configure with CMake (generate compile_commands.json)
51+
run: |
52+
mkdir -p build
53+
ls -al /usr/share/eigen3/cmake
54+
cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DEigen3_DIR=/usr/share/eigen3/cmake
55+
ls -la build/compile_commands.json
56+
57+
- name: clang-tidy (fail on warnings/errors)
58+
run: |
59+
if [ -z "${{ steps.files.outputs.sources }}" ]; then
60+
echo "No C/C++ sources found — skipping clang-tidy."
61+
else
62+
# Run clang-tidy using compile_commands.json. Collect output and fail if diagnostics are present.
63+
# Note: clang-tidy often prints diagnostics to stdout/stderr; we capture and grep for "warning:" or "error:".
64+
printf '%s\n' ${{ steps.files.outputs.sources }} > /tmp/clang_tidy_files.txt
65+
set -o pipefail
66+
perl -pi -e 's/-I(.*?)third_party_install/-isystem \1third_party_install/g' build/compile_commands.json
67+
clang-tidy-20 --format-style='llvm' -p build $(cat /tmp/clang_tidy_files.txt) 2>&1 | tee clang-tidy.out || true
68+
if grep -E "warning:|error:" clang-tidy.out >/dev/null; then
69+
echo "clang-tidy reported warnings/errors — failing the job."
70+
echo ""
71+
tail -n +1 clang-tidy.out
72+
exit 1
73+
else
74+
echo "clang-tidy: no warnings/errors detected."
75+
fi
76+
fi
77+
3778
build-MOLE-ubuntu:
3879
runs-on: ubuntu-latest
3980
needs: lint-new-code
@@ -167,11 +208,11 @@ jobs:
167208
fi
168209

169210
if [ -n "$CHANGED" ]; then
170-
echo "changed=true" >> $GITHUB_OUTPUT
211+
echo "changed=true" >> "$GITHUB_OUTPUT"
171212
echo "Documentation sources have changed:"
172213
echo "$CHANGED"
173214
else
174-
echo "changed=false" >> $GITHUB_OUTPUT
215+
echo "changed=false" >> "$GITHUB_OUTPUT"
175216
echo "No documentation sources changed"
176217
fi
177218

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,3 @@ The archival copy of the MOLE User Manual is maintained on [Zenodo](https://zeno
221221
}
222222
```
223223
224-
## Gallery
225-
226-
Now, some cool pictures obtained with MOLE:
227-
228-
![Obtained with curvilinear operators](doc/assets/img/4thOrder.png)
229-
![Obtained with curvilinear operators](doc/assets/img/4thOrder2.png)
230-
![Obtained with curvilinear operators](doc/assets/img/4thOrder3.png)
231-
![Obtained with curvilinear operators](doc/assets/img/grid2.png)
232-
![Obtained with curvilinear operators](doc/assets/img/grid.png)
233-
![Obtained with curvilinear operators](doc/assets/img/WavyGrid.png)
234-
![Obtained with curvilinear operators](doc/assets/img/wave2D.png)
235-
![Obtained with curvilinear operators](doc/assets/img/burgers.png)

doc/assets/img/4thOrder.png

-522 KB
Binary file not shown.

doc/assets/img/4thOrder2.png

-395 KB
Binary file not shown.

doc/assets/img/4thOrder3.png

-452 KB
Binary file not shown.

doc/assets/img/WavyGrid.png

-990 KB
Binary file not shown.

doc/assets/img/burgers.png

-129 KB
Binary file not shown.

doc/assets/img/grid.png

-575 KB
Binary file not shown.

doc/assets/img/grid2.png

-628 KB
Binary file not shown.

doc/assets/img/wave2D.png

-161 KB
Binary file not shown.

0 commit comments

Comments
 (0)