image: file: .gitpod/Dockerfile # -------------------------------------------------------- # some useful extensions to have vscode: extensions: - vivaxy.vscode-conventional-commits - streetsidesoftware.code-spell-checker - ms-python.python - ms-python.black-formatter - twxs.cmake - ms-vscode.cmake-tools - xaver.clang-format - hbenl.vscode-test-explorer - matepek.vscode-catch2-test-adapter - bierner.markdown-mermaid - DavidAnson.vscode-markdownlint - darkriszty.markdown-table-prettify # -------------------------------------------------------- # 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" { "workbench.startupEditor": "none", "editor.tabSize": 2, "editor.formatOnSave": true, "editor.bracketPairColorization.enabled": true, "editor.guides.bracketPairs": "active", "cmake.generator": "Ninja Multi-Config", "cmake.configureOnOpen": true, "cmake.useCMakePresets": "always", "cmake.options.statusBarVisibility": "visible", "cmake.options.advanced": { "testPreset": { "statusBarVisibility": "hidden" }, "ctest": { "statusBarVisibility": "hidden" } }, "clang-format.executable": "/usr/bin/clang-format-17", "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" ] } EOF exit - name: install python packages init: | python -m venv ${PYTHON_VENV} source ${PYTHON_VENV}/bin/activate pip install -Ur requirements.txt gp sync-done python-init - name: configure conan and install dependencies init: | gp sync-await python-init conan profile detect conan config install $PWD/.gitpod/conan conan install . -pr gcc12 -o '&:std_format=False' -b missing conan install . -pr gcc12 -o '&:std_format=False' -b missing -s build_type=Debug gp sync-done conan-gcc12-20 conan install . -pr gcc13 -o '&:std_format=True' -b missing conan install . -pr gcc13 -o '&:std_format=True' -b missing -s build_type=Debug gp sync-done conan-gcc13-20 conan install . -pr clang16 -o '&:std_format=False' -b missing conan install . -pr clang16 -o '&:std_format=False' -b missing -s build_type=Debug gp sync-done conan-clang16-20 conan install . -pr clang17 -o '&:std_format=True' -o '&:cxx_modules=True' -b missing conan install . -pr clang17 -o '&:std_format=True' -o '&:cxx_modules=True' -b missing -s build_type=Debug gp sync-done conan-clang17-20 conan remote login -p $ARTIFACTORY_TOKEN conan-gitpod-mp-units $ARTIFACTORY_USER conan upload "*" -r conan-gitpod-mp-units -c - name: gcc-12-20 init: | gp sync-await conan-gcc12-20 source ${PYTHON_VENV}/bin/activate conan build . -pr gcc12 -o '&:std_format=False' conan build . -pr gcc12 -o '&:std_format=False' -s build_type=Debug echo "🛠️ gcc-12 pre-build done for C++20, header files, 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 conan-gcc13-20 source ${PYTHON_VENV}/bin/activate conan build . -pr gcc13 -o '&:std_format=True' conan build . -pr gcc13 -o '&:std_format=True' -s build_type=Debug echo "🛠️ gcc-13 pre-build done for C++20 and header files! 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 conan-clang16-20 source ${PYTHON_VENV}/bin/activate conan build . -pr clang16 -o '&:std_format=False' conan build . -pr clang16 -o '&:std_format=False' -s build_type=Debug echo "🛠️ clang-16 pre-build done for C++20, header files, 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 conan-clang17-20 source ${PYTHON_VENV}/bin/activate conan build . -pr clang17 -o '&:std_format=True' -o '&:cxx_modules=True' conan build . -pr clang17 -o '&:std_format=True' -o '&:cxx_modules=True' -s build_type=Debug echo "🛠️ clang-17 pre-build done for C++20! 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 init: | gp open CONTRIBUTING.md exit