diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..3a1454d6bfd49e9a772acfaa722228911bbd8698 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,14 @@ +FROM mcr.microsoft.com/devcontainers/cpp:0-ubuntu-20.04 + +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends \ + ccache \ + clang-format \ + clang-tidy \ + curl \ + doxygen \ + graphviz \ + libgtest-dev \ + python3-pip + +RUN pip --no-cache-dir install cmakelang diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000000000000000000000000000000..cfa23becb1a8d744abea2c3d818a4a01c557405d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,50 @@ +{ + "name": "Yase", + "build": { + "dockerfile": "Dockerfile", + "args": { + // NOTE temp workaround for docker v23, see https://github.com/microsoft/vscode-remote-release/issues/7958 + "BUILDKIT_INLINE_CACHE": "0" + } + }, + "capAdd": [ + "SYS_PTRACE" + ], + "securityOpt": [ + "seccomp=unconfined" + ], + "features": { + "ghcr.io/balazs23/devcontainers-features/bazel:1": {} + }, + "customizations": { + "vscode": { + "extensions": [ + "cheshirekow.cmake-format", + "ms-vscode.cmake-tools", + "ms-vscode.cpptools", + "ms-vscode.live-server", + "redhat.vscode-yaml" + ], + "settings": { + "C_Cpp.codeAnalysis.clangTidy.enabled": true, + "C_Cpp.default.compileCommands": "${workspaceFolder}/build/compile_commands.json", + "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", + "cmake.exportCompileCommandsFile": true, + "cmake.generator": "Ninja", + "cmake.installPrefix": "${workspaceFolder}/build/prefix", + "editor.formatOnSave": true, + "editor.tabSize": 2, + "files.associations": { + ".clang-format": "yaml", + ".clang-tidy": "yaml", + ".clangd": "yaml", + ".cmake-format": "yaml", + "*.cmake.in": "cmake" + }, + "files.insertFinalNewline": true, + "files.trimFinalNewlines": true, + "files.trimTrailingWhitespace": true + } + } + } +}