-
Notifications
You must be signed in to change notification settings - Fork 5
148 lines (127 loc) · 4.76 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Continuous integration
on:
pull_request:
branches : main
types: [push, opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-code-format
cancel-in-progress: true
jobs:
Formatting:
name: Format source
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
directory: [Source, Examples]
steps:
- uses: actions/checkout@v4
- name: Run clang-format
uses: jidicula/clang-format-action@v4.10.1
with:
clang-format-version: '18'
check-path: ${{ matrix.directory }}
Linux-GNU:
needs: Formatting
name: Linux-GNU
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
comp: [g++-9, g++-10, g++-11, g++-12]
directory: [Examples/EBGeometry_DCEL, Examples/EBGeometry_F18, Examples/EBGeometry_OctreeBoundingVolume, Examples/EBGeometry_PackedSpheres, Examples/EBGeometry_RandomCity, Examples/EBGeometry_Shapes]
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.comp }}
- name: Compile examples
working-directory: ${{ matrix.directory }}
run: |
${{ matrix.comp }} -std=c++17 \
-pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 \
-Winit-self -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wnoexcept -Wold-style-cast \
-Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-null-sentinel \
-Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-unused \
main.cpp
- name: Run examples
working-directory: ${{ matrix.directory }}
run: |
./a.out
if [[ $? == 0 ]]; then exit 0; else exit 1; fi
Linux-Intel:
needs: Formatting
name: Linux-Intel
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
directory: [Examples/EBGeometry_DCEL, Examples/EBGeometry_PackedSpheres, Examples/EBGeometry_RandomCity, Examples/EBGeometry_Shapes]
steps:
- uses: actions/checkout@v4
- name: Install Intel oneAPI
working-directory: /tmp
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get -y install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
- name: Compile examples
working-directory: ${{ matrix.directory }}
run: |
source /opt/intel/oneapi/setvars.sh
icpc -std=c++17 -O0 \
-Wall -Warray-bounds -Wchar-subscripts -Wcomment -Wenum-compare -Wformat -Wuninitialized -Wmaybe-uninitialized -Wmain -Wnarrowing -Wnonnull \
-Wparentheses -Wpointer-sign -Wreorder -Wreturn-type -Wsign-compare -Wsequence-point -Wtrigraphs -Wunused-function -Wunused-but-set-variable \
-Wunused-variable -Wwrite-strings -Werror \
main.cpp -lstdc++fs
- name: Run examples
working-directory: ${{ matrix.directory }}
run: |
./a.out
if [[ $? == 0 ]]; then exit 0; else exit 1; fi
Build-documentation:
needs: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install doxygen
sudo apt install graphviz
sudo apt install texlive
sudo apt install texlive-latex-extra
sudo apt install latexmk
python3 -m pip install sphinx==5.0.0 sphinx_rtd_theme sphinxcontrib-bibtex
- name: Build doxygen
working-directory: ${{ github.workspace }}/Docs
run: |
doxygen doxyfile
- name: Build HTML documentation
working-directory: ${{ github.workspace }}/Docs/Sphinx
run: |
make html
- name: Build PDF documentation
working-directory: ${{ github.workspace }}/Docs/Sphinx
run: |
make latexpdf
- name: Upload
uses: actions/upload-artifact@v1
with:
name: docs
path: Docs/Sphinx/build
- name: Cleanup
working-directory: ${{ github.workspace }}/Docs
run: |
cp -a Sphinx/build/html/* ./
mv Sphinx/build/latex/ebgeometry.pdf ./
rm -rf Sphinx/build
CI-passed:
needs: [Linux-GNU, Linux-Intel, Build-documentation]
runs-on: ubuntu-latest
steps:
- name: Do nothing
run: |