Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial version of a devcontainer for Verible #2068

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Available versions: https://github.com/devcontainers/images/tree/main/src/cpp
FROM mcr.microsoft.com/devcontainers/cpp:ubuntu-22.04
RUN apt update && apt install -y clang-format clang-tidy
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64 -O /usr/local/bin/bazel && chmod a+rx /usr/local/bin/bazel && /usr/local/bin/bazel --version
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fix bazel version to 5.x.x?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This specific code uses bazelisk to install the latest version of bazel. I didn't see the GitHub workflow for the repo doing something to obtain a 5.x.x. version, but may have missed it. Does the workflow do something specific?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, using a .bazelversion file seems to be the way to go, I'll do that in a separate PR. FYI, the devcontainer will not work today without it since verible is not yet compatible with bazel 7.0.0

48 changes: 48 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node
{
"name": "Verible Dev",
"build": {
"dockerfile": "Dockerfile",
// Add any proxy settings if the build of the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove commented JSON about proxy settings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved the details to the top of the file. Please comment if this meets the crux of your feedback.

// container is behind a proxy
//
// "args" : {
// "HTTP_PROXY": "http://proxy-dmz.intel.com:912/",
// "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/",
// "http_proxy": "http://proxy-dmz.intel.com:912/",
// "https_proxy": "http://proxy-dmz.intel.com:912/"
// }
},

// Add any proxy settings if connecting to a container on
// a remote machine
//
// "remoteEnv": {
// "HTTP_PROXY": "http://proxy-dmz.intel.com:912/",
// "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/",
// "http_proxy": "http://proxy-dmz.intel.com:912/",
// "https_proxy": "http://proxy-dmz.intel.com:912/",
// },

// Add any proxy settings if the container is behind
// a proxy
///
// "containerEnv": {
// "HTTP_PROXY": "http://proxy-dmz.intel.com:912/",
// "HTTPS_PROXY": "http://proxy-dmz.intel.com:912/",
// "http_proxy": "http://proxy-dmz.intel.com:912/",
// "https_proxy": "http://proxy-dmz.intel.com:912/"
// },

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {},
"extensions": [
"ms-vscode.cpptools-extension-pack"
]
}
}
}
Loading