1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
12
1
name : " CodeQL"
13
2
14
3
on :
15
4
push :
16
- branches : [ "main", "release_v*" ]
5
+ branches : [ "main", "release_v*", "dev/milesp/doc-site-from-branch" ]
17
6
pull_request :
18
7
branches : [ "main", "release_v*" ]
19
8
schedule :
20
9
- cron : ' 28 22 * * 1'
21
10
11
+ env :
12
+ deploy_docs_site : false
13
+
22
14
jobs :
23
15
analyze :
24
16
name : Analyze
36
28
37
29
steps :
38
30
- name : Checkout repository
39
- uses : actions/checkout@v3
31
+ uses : actions/checkout@v4
40
32
with :
41
33
lfs : true
42
34
submodules : ' recursive'
@@ -46,17 +38,19 @@ jobs:
46
38
run : |
47
39
sudo apt update -y && sudo apt install -y --no-install-recommends \
48
40
git git-lfs gcc-11 g++-11 ninja-build ccache libgtest-dev libgmock-dev \
49
- shellcheck curl doxygen python3 python3-pip python3-dev python3-distutils
41
+ shellcheck curl doxygen python3 python3-pip python3-dev python3-distutils cmake
50
42
51
43
- if : matrix.language == 'c-cpp'
52
44
name : Install Python Dependencies
53
45
run : |
54
- python3 -m pip install sphinx-rtd-theme sphinx==4.5.0 breathe exhale \
55
- recommonmark graphviz numpy==1.24.1
46
+ sudo apt update -y && sudo apt install -y --no-install-recommends \
47
+ python3 python3-pip python3-dev python3-distutils doxygen && sudo rm -rf /var/lib/apt/lists/* \
48
+ && python3 -m pip install sphinx-rtd-theme sphinx==4.5.0 breathe exhale recommonmark graphviz \
49
+ && python3 -m pip install numpy==1.24.1 patchelf==0.17.2.1
56
50
57
51
- if : matrix.language == 'c-cpp'
58
52
name : Install CUDA Toolkit
59
-
53
+
60
54
id : cuda-toolkit
61
55
with :
62
56
cuda : ' 11.7.1'
@@ -72,22 +66,61 @@ jobs:
72
66
nvcc -V
73
67
74
68
- name : Initialize CodeQL
75
- uses : github/codeql-action/init@v2
69
+ uses : github/codeql-action/init@v3
76
70
with :
77
71
languages : ${{ matrix.language }}
78
72
queries : +security-and-quality
79
73
80
74
- if : matrix.language != 'c-cpp'
81
75
name : Autobuild
82
- uses : github/codeql-action/autobuild@v2
76
+ uses : github/codeql-action/autobuild@v3
83
77
84
78
- if : matrix.language == 'c-cpp'
85
79
name : Build CMake project
86
80
run : |
87
81
echo "Running CMake project build script"
88
- ./ci/build.sh debug build "-DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF" $*
82
+ ./ci/build.sh debug build "-DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_DOCS=ON -DBUILD_PYTHON=ON " $*
89
83
90
84
- name : Perform CodeQL Analysis
91
- uses : github/codeql-action/analyze@v2
85
+ uses : github/codeql-action/analyze@v3
92
86
with :
93
87
category : " /language:${{matrix.language}}"
88
+
89
+ - if : github.ref == 'refs/heads/main'
90
+ name : Check for Changes in main
91
+ id : check_main_changed
92
+ run : |
93
+ git fetch origin main
94
+ if [[ $(git rev-list -n 1 HEAD) == $(git rev-list -n 1 origin/main) ]]; then
95
+ echo "No changes in main"
96
+ echo "deploy_docs_site=false" >> $GITHUB_ENV
97
+ else
98
+ echo "Changes detected in main"
99
+ echo "deploy_docs_site=true" >> $GITHUB_ENV
100
+ - if : github.ref == 'refs/heads/main'
101
+ name : Export Main Changed Status
102
+ run : |
103
+ echo "Main changed status: $deploy_docs_site"
104
+ env :
105
+ deploy_docs_site : ${{ steps.check_main_changed.outputs.deploy_docs_site }}
106
+
107
+ - if : github.ref == 'refs/heads/main' && matrix.language == 'c-cpp' && env.deploy_docs_site == 'true'
108
+ name : Clean up Sphinx Build Directory
109
+ run : |
110
+ find build/docs/sphinx -name '*.doctree' -delete
111
+ find build/docs/sphinx -name '*.map' -delete
112
+ find build/docs/sphinx -name '*.pickle' -delete
113
+ find build/docs/sphinx -name '*.inv' -delete
114
+ find build/docs/sphinx -name '*.gz' -delete
115
+
116
+ - if : github.ref == 'refs/heads/main' && matrix.language == 'c-cpp' && env.deploy_docs_site == 'true'
117
+ name : Create .nojekyll file
118
+ run : touch build/docs/sphinx/.nojekyll
119
+
120
+ - if : github.ref == 'refs/heads/main' && matrix.language == 'c-cpp' && env.deploy_docs_site == 'true'
121
+ name : Deploy to GitHub Pages
122
+ uses : JamesIves/github-pages-deploy-action@v4
123
+ with :
124
+ folder : build/docs/sphinx
125
+ branch : gh-pages
126
+ clean : true
0 commit comments