Skip to content

Commit

Permalink
udpate comments with more postcreate scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
wusatosi committed Oct 22, 2024
1 parent a9ff00b commit fce7581
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 49 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ RUN sudo apt-get update && sudo apt-get install -y cmake
RUN sudo apt-get install -y python3-pip && pip3 install pre-commit

# Avoid ASAN Stalling
# Alternative is to update to clang-18 and
RUN sudo sysctl -w vm.mmap_rnd_bits=28
# Alternative is to update to clang-18 and gcc-13.2
# Maybe crashing codespace???
RUN sudo sysctl -w vm.mmap_rnd_bits=28
24 changes: 0 additions & 24 deletions .devcontainer/Dockerfile_raw

This file was deleted.

34 changes: 11 additions & 23 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp

// TODO: update gcc and clang to avoid address randomziation problem.

{
"name": "C++",
// "image": "mcr.microsoft.com/devcontainers/cpp:ubuntu",
"name": "Beman Project Generic Devcontainer",
"build": {
"dockerfile": "Dockerfile"
},
// "features": {
// // "ghcr.io/devcontainers/features/github-cli:1": {},
// // "ghcr.io/gvatsal60/dev-container-features/pre-commit:1": {}
// }

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "cmake --workflow --preset gcc-debug"

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
// TODO: these commands are failing
"postCreateCommand": ["bash postcreate.sh"],
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools"
]
}
}
}
7 changes: 7 additions & 0 deletions .devcontainer/postcreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cd ..

# Setup cmake build directory
cmake --workflow --preset gcc-debug
# Setup pre-commit
pre-commit
pre-commit install

0 comments on commit fce7581

Please sign in to comment.