Skip to content

Commit 99f1d65

Browse files
committed
misc: Bring devcontainer and vscode in line with latest
Signed-off-by: Jason Lowe-Power <[email protected]>
1 parent da98c8f commit 99f1d65

File tree

5 files changed

+61
-24
lines changed

5 files changed

+61
-24
lines changed

.devcontainer/Dockerfile

-5
This file was deleted.

.devcontainer/devcontainer.json

+31-19
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
{
2-
"build": {
3-
"dockerfile": "Dockerfile"
2+
"name": "gem5 Development Container",
3+
"image": "ghcr.io/gem5/devcontainer:v24-1",
4+
"hostRequirements": {
5+
"cpus": 4,
6+
"memory": "16gb",
7+
"storage": "64gb"
8+
},
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"ms-python.debugpy",
13+
"ms-python.python",
14+
"ms-python.vscode-pylance",
15+
"ms-vscode.cpptools",
16+
"ms-vscode.cpptools-extension-pack",
17+
"ms-vscode.cpptools-themes",
18+
"ms-vscode.makefile-tools",
19+
"Tsinghua-Hexin-Joint-Institute.gem5-slicc",
20+
"ms-python.black-formatter",
21+
"DavidAnson.vscode-markdownlint"
22+
]
23+
}
424
},
5-
"customizations": {
6-
"vscode": {
7-
"extensions": [
8-
"ms-vscode.cpptools",
9-
"streetsidesoftware.code-spell-checker",
10-
"eamodio.gitlens",
11-
"ms-python.vscode-pylance",
12-
"ms-python.python",
13-
"ms-toolsai.jupyter"
14-
]
15-
}
16-
},
17-
"postCreateCommand": {
18-
"python-deps": "pip install -r requirements.txt",
19-
"fetch-gem5": "git submodule update --init"
20-
}
21-
}
25+
"features": {
26+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
27+
"ghcr.io/devcontainers/features/github-cli:1": {},
28+
"ghcr.io/devcontainers-contrib/features/actionlint:1": {},
29+
"ghcr.io/devcontainers-contrib/features/vscode-cli:1": {}
30+
},
31+
"onCreateCommand": "./.devcontainer/on_create.sh",
32+
"postStartCommand": "./.devcontainer/post_start.sh"
33+
}

.devcontainer/on_create.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Update the submodules
4+
git submodule update --init --recursive
5+
6+
# Setups the gem5 source directory
7+
pushd gem5
8+
9+
## We cleanup git's 'blame' feature by ignoring certain commits (typically
10+
## commits that have reformatted files)
11+
git config --global blame.ignoreRevsFile .git-blame-ignore-revs
12+
13+
./util/pre-commit-install.sh
14+
15+
popd # gem5

.devcontainer/post_start.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#!/bin/bash

.vscode/settings.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"python.analysis.extraPaths": [
3+
"gem5/src/python"
4+
],
5+
"editor.rulers": [
6+
79
7+
],
8+
"files.trimTrailingWhitespace": true,
9+
"files.insertFinalNewline": true,
10+
"markdownlint.config": {
11+
"default": true,
12+
"MD026": false
13+
}
14+
}

0 commit comments

Comments
 (0)