Files
mp-units/.gitpod.yml
T

127 lines
5.1 KiB
YAML

image:
file: .gitpod/Dockerfile
# --------------------------------------------------------
# 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
- redhat.vscode-yaml
- 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.generator": "Ninja Multi-Config",
"cmake.configureOnOpen": true,
"cmake.options.statusBarVisibility": "visible",
"cmake.options.advanced": {
"testPreset": {
"statusBarVisibility": "hidden"
},
"ctest": {
"statusBarVisibility": "hidden"
}
},
"clang-format.executable": "/usr/bin/clang-format-15",
"editor.tabSize": 2,
"editor.formatOnSave": true,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"restructuredtext.preview.scrollEditorWithPreview": false,
"restructuredtext.preview.scrollPreviewWithEditor": false,
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"yaml.schemas": {
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
},
"yaml.customTags": [
"!ENV scalar",
"!ENV sequence",
"tag:yaml.org,2002:python/name:materialx.emoji.to_svg",
"tag:yaml.org,2002:python/name:materialx.emoji.twemoji",
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
],
"workbench.startupEditor": "none"
}
EOF
exit
- name: install python packages
before: |
python -m venv ${PYTHON_VENV}
source ${PYTHON_VENV}/bin/activate
pip install -Ur requirements.txt
conan profile detect
conan config install $PWD/.gitpod/conan
conan graph info .
gp sync-done python-init
exit
- name: gcc-12-20
init: |
gp sync-await python-init
source ${PYTHON_VENV}/bin/activate
conan build . -pr gcc12 -c user.build:all=True -o use_fmtlib=True -b missing
conan build . -pr gcc12 -c user.build:all=True -o use_fmtlib=True -b missing -s build_type=Debug
echo "🛠️ gcc-12 pre-build done for C++20 and libfmt! You can close this terminal and use 'Build' button in the VSCode status bar for incremental builds. 🛠️"
- name: gcc-13-20
init: |
gp sync-await python-init
source ${PYTHON_VENV}/bin/activate
conan build . -pr gcc13 -c user.build:all=True -b missing
conan build . -pr gcc13 -c user.build:all=True -b missing -s build_type=Debug
echo "🛠️ gcc-13 pre-build done for C++20 and 'std::format'! You can close this terminal and use 'Build' button in the VSCode status bar for incremental builds. 🛠️"
- name: clang-16-20
init: |
gp sync-await python-init
source ${PYTHON_VENV}/bin/activate
conan build . -pr clang16 -c user.build:all=True -o use_fmtlib=True -b missing
conan build . -pr clang16 -c user.build:all=True -o use_fmtlib=True -b missing -s build_type=Debug
echo "🛠️ clang-16 pre-build done for C++20 and libfmt! You can close this terminal and use 'Build' button in the VSCode status bar for incremental builds. 🛠️"
- name: clang-17-20
init: |
gp sync-await python-init
source ${PYTHON_VENV}/bin/activate
conan build . -pr clang17 -c user.build:all=True -o cxx_modules=True -b missing
conan build . -pr clang17 -c user.build:all=True -o cxx_modules=True -b missing -s build_type=Debug
echo "🛠️ clang-17 pre-build done for C++20, 'std::format', and C++20 modules! You can close this terminal and use 'Build' button in the VSCode status bar for incremental builds. 🛠️"
- name: documentation
init: |
gp sync-await python-init
source ${PYTHON_VENV}/bin/activate
mkdocs serve &
echo "📚 Documentation generation done! You can open it by clicking on 'Open Preview' or 'Open Browser' in the VSCode dialog window. 📚"
- name: open-contributing-guide
command: |
gp open CONTRIBUTING.md
exit