@@ -13,39 +13,64 @@ concurrency:
13
13
14
14
jobs :
15
15
review :
16
- runs-on : ubuntu-latest
16
+ runs-on : ubuntu-22.04
17
17
steps :
18
18
- name : Checkout PR branch
19
19
uses : actions/checkout@v4
20
20
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
-
29
21
- name : run git config command
30
22
run : |
31
23
git config --global --add safe.directory /github/workspace
32
24
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
+
33
39
- name : Run clang-tidy
34
40
35
41
id : review
36
42
with :
37
43
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
39
51
exclude : " test/*,unittests/*"
40
52
split_workflow : true
41
53
config_file : .clang-tidy
42
54
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/"
46
66
-DCMAKE_BUILD_TYPE="Release"
47
- -DLLVM_EXTERNAL_LIT="`which lit`"
48
- -DCMAKE_EXPORT_COMPILE_COMMANDS=On
67
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=On || true'
49
68
50
69
- name : Upload artifacts
51
70
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