Skip to content

Commit ffb0763

Browse files
authored
Merge pull request libgit2#5508 from libgit2/ethomson/devcontainer
WIP: .devcontainer: settings for a codespace workflow
2 parents af97166 + e43cfb6 commit ffb0763

File tree

4 files changed

+66
-0
lines changed

4 files changed

+66
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"postCreateCommand": "bash .devcontainer/setup.sh"
3+
}

.devcontainer/setup.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
set -e
3+
4+
sudo apt-get update
5+
sudo apt-get -y --no-install-recommends install cmake
6+
7+
mkdir build
8+
cd build
9+
cmake ..

.vscode/launch.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "(gdb) Launch",
9+
"type": "cppdbg",
10+
"request": "launch",
11+
"program": "${workspaceFolder}/build/libgit2_clar",
12+
"args": [],
13+
"stopAtEntry": false,
14+
"cwd": "${fileDirname}",
15+
"environment": [],
16+
"externalConsole": false,
17+
"MIMode": "gdb",
18+
"setupCommands": [
19+
{
20+
"description": "Enable pretty-printing for gdb",
21+
"text": "-enable-pretty-printing",
22+
"ignoreFailures": true
23+
}
24+
]
25+
}
26+
]
27+
}

.vscode/tasks.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Build",
8+
"type": "shell",
9+
"command": "cd build && cmake --build . --parallel",
10+
"group": "build",
11+
"presentation": {
12+
"reveal": "always",
13+
"panel": "new"
14+
}
15+
},
16+
{
17+
"label": "Run Tests",
18+
"type": "shell",
19+
"command": "build/libgit2_clar -v",
20+
"group": "test",
21+
"presentation": {
22+
"reveal": "always",
23+
"panel": "new"
24+
}
25+
}
26+
]
27+
}

0 commit comments

Comments
 (0)