@@ -13,39 +13,64 @@ concurrency:
1313
1414jobs :
1515 review :
16- runs-on : ubuntu-latest
16+ runs-on : ubuntu-22.04
1717 steps :
1818 - name : Checkout PR branch
1919 uses : actions/checkout@v4
2020
21- - name : Install LLVM and Clang
22- uses : KyleMayes/install-llvm-action@v2
23- with :
24- version : " 20"
25-
26- - name : install lit
27- run : pip install lit
28-
2921 - name : run git config command
3022 run : |
3123 git config --global --add safe.directory /github/workspace
3224
25+ - name : Restore BDM Cache
26+ uses : actions/cache/restore@v4
27+ id : cache
28+ with :
29+ path : |
30+ biodynamo
31+ key : ubuntu-22.04-bdm
32+
33+ - name : Complain when cache not found
34+ if : ${{ steps.cache.outputs.cache-hit != 'true' }}
35+ run : |
36+ echo "Cache was not found!"
37+ exit 1
38+
3339 - name : Run clang-tidy
34403541 id : review
3642 with :
3743 build_dir : build
38- apt_packages : cmake,libxml2,libxml2-dev,libtinfo-dev,zlib1g-dev,libzstd-dev
44+ apt_packages : >
45+ build-essential, cmake, curl, freeglut3-dev, g++, gcc, git,
46+ libblas-dev, libbz2-dev, libffi-dev, liblapack-dev, liblzma-dev,
47+ libncursesw5-dev, libnuma-dev, libomp-dev, libomp5, libopenmpi-dev,
48+ libpthread-stubs0-dev, libreadline-dev, libsqlite3-dev, libssl-dev,
49+ libxml2-dev, libxmlsec1-dev, make, python3-dev, python3-openssl,
50+ tk-dev, wget, xz-utils, zlib1g-dev
3951 exclude : " test/*,unittests/*"
4052 split_workflow : true
4153 config_file : .clang-tidy
4254 cmake_command : >
43- CC=$GITHUB_WORKSPACE/llvm/bin/clang CXX=$GITHUB_WORKSPACE/llvm/bin/clang++
44- cmake . -B build -DLLVM_DIR="$GITHUB_WORKSPACE/llvm"
45- -DClang_DIR="$GITHUB_WORKSPACE/llvm"
55+ bash -x -c '
56+ curl https://pyenv.run | bash &&
57+ export PATH="$HOME/.pyenv/bin:$PATH" &&
58+ eval "$(pyenv init --path)" &&
59+ eval "$(pyenv init -)" &&
60+ pyenv install 3.9 &&
61+ pyenv shell 3.9 &&
62+ export &&
63+ source $GITHUB_WORKSPACE/biodynamo/build/bin/thisbdm.sh &&
64+ cmake . -B build
65+ -DBioDynaMo_DIR="$GITHUB_WORKSPACE/biodynamo/build/share/cmake/"
4666 -DCMAKE_BUILD_TYPE="Release"
47- -DLLVM_EXTERNAL_LIT="`which lit`"
48- -DCMAKE_EXPORT_COMPILE_COMMANDS=On
67+ -DCMAKE_EXPORT_COMPILE_COMMANDS=On || true'
4968
5069 - name : Upload artifacts
5170 uses :
ZedThree/clang-tidy-review/[email protected] 71+
72+ - name : Setup tmate session
73+ if : ${{ !cancelled() && runner.debug }}
74+ uses : mxschmitt/action-tmate@v3
75+ # When debugging increase to a suitable value!
76+ timeout-minutes : 30
0 commit comments