forked from mpusz/mp-units
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitpod.yml
180 lines (175 loc) · 8.69 KB
/
.gitpod.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
image:
file: .gitpod.Dockerfile
# --------------------------------------------------------
# exposing ports for VSCode Live Server
ports:
- port: 5500
# --------------------------------------------------------
# using prebuilds for the container
github:
prebuilds:
# enable for the default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: true
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: false
# --------------------------------------------------------
# some useful extensions to have
vscode:
extensions:
- twxs.cmake
- ms-vscode.cmake-tools
- xaver.clang-format
- streetsidesoftware.code-spell-checker
- vivaxy.vscode-conventional-commits
- hbenl.vscode-test-explorer
- matepek.vscode-catch2-test-adapter
- trond-snekvik.simple-rst
- lextudio.restructuredtext
- ritwickdey.liveserver
- ms-python.python
# --------------------------------------------------------
# VSCode setup, Conan installation, and build of all the targets
tasks:
- name: vscode settings
init: |
mkdir -p "$PWD/.vscode";
cat << 'EOF' > "$PWD/.vscode/settings.json"
{
"cmake.buildDirectory": "${workspaceFolder}/build/${buildKitVendor}-${buildKitVersionMajor}",
"cmake.configureArgs": [
"--toolchain conan_toolchain.cmake"
],
"cmake.generator": "Ninja Multi-Config",
"cmake.configureOnOpen": true,
"clang-format.executable": "/usr/bin/clang-format-15",
"editor.tabSize": 2,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"restructuredtext.preview.scrollEditorWithPreview": false,
"restructuredtext.preview.scrollPreviewWithEditor": false,
"liveServer.settings.root": "/build/docs/docs/sphinx/",
"esbonio.sphinx.confDir": "${workspaceFolder}/docs",
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
}
EOF
exit
- name: conan
before: |
pip3 install -U conan
conan config init
conan profile update settings.compiler.libcxx=libstdc++11 default
conan profile update settings.compiler.cppstd=20 default
conan profile update conf.tools.cmake.cmaketoolchain:generator=Ninja default
conan remote add -i 0 conan-mpusz https://mpusz.jfrog.io/artifactory/api/conan/conan-oss
pushd /workspace/.conan/profiles
cp default gcc10
cp default gcc11
cp default clang12
cp default clang13
cp default clang14
popd
conan profile update settings.compiler.version=10 gcc10
conan profile update env.CXX=/usr/bin/g++-10 gcc10
conan profile update env.CC=/usr/bin/gcc-10 gcc10
conan profile update settings.compiler=clang clang12
conan profile update settings.compiler.version=12 clang12
conan profile update settings.compiler.libcxx=libstdc++11 clang12
conan profile update env.CXX=/usr/bin/clang++-12 clang12
conan profile update env.CC=/usr/bin/clang-12 clang12
conan profile update settings.compiler=clang clang13
conan profile update settings.compiler.version=13 clang13
conan profile update settings.compiler.libcxx=libstdc++11 clang13
conan profile update env.CXX=/usr/bin/clang++-13 clang13
conan profile update env.CC=/usr/bin/clang-13 clang13
conan profile update settings.compiler=clang clang14
conan profile update settings.compiler.version=14 clang14
conan profile update settings.compiler.libcxx=libc++ clang14
conan profile update env.CXX=/usr/bin/clang++-14 clang14
conan profile update env.CC=/usr/bin/clang-14 clang14
gp sync-done conan-init
exit
- name: gcc-10
init: |
gp sync-await conan-init
mkdir -p build/GCC-10 && cd build/GCC-10
conan install ../.. -pr gcc10 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated
conan install ../.. -pr gcc10 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated -s build_type=Debug
cmake ../.. --no-warn-unused-cli --toolchain conan_toolchain.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10
cmake --build . --config Release -j
cmake --build . --config Debug -j
ctest -C Release
ctest -C Debug
echo "🛠️ gcc-10 pre-build done! You can close this terminal and use 'Build' button in the VSCode status bar for incremental builds. 🛠️"
- name: gcc-11
init: |
gp sync-await conan-init
mkdir -p build/GCC-11 && cd build/GCC-11
conan install ../.. -pr gcc11 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated
gp sync-done conan-gcc-install
conan install ../.. -pr gcc11 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated -s build_type=Debug
cmake ../.. --no-warn-unused-cli --toolchain conan_toolchain.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++
cmake --build . --config Release -j
cmake --build . --config Debug -j
ctest -C Release
ctest -C Debug
echo "🛠️ gcc-11 pre-build done! You can close this terminal and use 'Build' button in the VSCode status bar for incremental builds. 🛠️"
- name: clang-12
init: |
gp sync-await conan-init
mkdir -p build/Clang-12 && cd build/Clang-12
conan install ../.. -pr clang12 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated
conan install ../.. -pr clang12 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated -s build_type=Debug
cmake ../.. --no-warn-unused-cli --toolchain conan_toolchain.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12
cmake --build . --config Release -j
cmake --build . --config Debug -j
ctest -C Release
ctest -C Debug
echo "🛠️ clang-12 pre-build done! You can close this terminal and use 'Build' button in the VSCode status bar for incremental builds. 🛠️"
- name: clang-13
init: |
gp sync-await conan-init
mkdir -p build/Clang-13 && cd build/Clang-13
conan install ../.. -pr clang13 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated
conan install ../.. -pr clang13 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated -s build_type=Debug
cmake ../.. --no-warn-unused-cli --toolchain conan_toolchain.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DCMAKE_C_COMPILER=/usr/bin/clang-13 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-13
cmake --build . --config Release -j
cmake --build . --config Debug -j
ctest -C Release
ctest -C Debug
echo "🛠️ clang-13 pre-build done! You can close this terminal and use 'Build' button in the VSCode status bar for incremental builds. 🛠️"
- name: clang-14
init: |
gp sync-await conan-init
mkdir -p build/Clang-14 && cd build/Clang-14
conan install ../.. -pr clang4 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated
conan install ../.. -pr clang14 -e mp-units:CONAN_RUN_TESTS=True -o build_docs=False -b outdated -s build_type=Debug
cmake ../.. --no-warn-unused-cli --toolchain conan_toolchain.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE -DCMAKE_C_COMPILER=/usr/bin/clang-14 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-14
cmake --build . --config Release -j
cmake --build . --config Debug -j
ctest -C Release
ctest -C Debug
echo "🛠️ clang-14 pre-build done! You can close this terminal and use 'Build' button in the VSCode status bar for incremental builds. 🛠️"
- name: documentation
init: |
gp sync-await conan-init
pip3 install -Ur docs/requirements.txt
pip3 install -U sphinx-autobuild rstcheck esbonio
mkdir -p build/docs && cd build/docs
gp sync-await conan-gcc-install
conan install ../.. -e mp-units:CONAN_RUN_TESTS=True -b outdated
cmake ../.. --toolchain conan_toolchain.cmake
cmake --build . --target documentation --config Release -j
echo "📚 Documentation pre-build complete! You can open it by clicking on 'Go Live' in the VSCode status bar. 📚"