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 all 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

30 changes: 30 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// 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

// If you are behind a proxy, set the http_proxy and https_proxy environment variables
// in the container environment. For example:
///
// "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/"
// },

{
"name": "Verible Dev",
"build": {
"dockerfile": "Dockerfile",
},

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