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

Add GitHub codespaces #1849

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ARG VARIANT=6.0
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install apt-transport-https dirmngr gnupg ca-certificates \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
&& echo "deb https://download.mono-project.com/repo/debian stable-buster main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list \
&& apt-get update \
&& apt-get -y install --no-install-recommends \
libfontconfig1 mono-complete
24 changes: 24 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "SkiaSharp",
"runArgs": ["--init"],
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "6.0",
}
},

"extensions": [
"ms-azuretools.vscode-docker",
"ms-dotnettools.csharp",
"ms-dotnettools.dotnet-interactive-vscode",
"ms-vscode.cpptools",
"ms-vscode.powershell",
"cake-build.cake-vscode",
"jeff-hykin.better-cpp-syntax"
],

"postCreateCommand": "bash .devcontainer/setup-container.sh",

"remoteUser": "vscode"
}
10 changes: 10 additions & 0 deletions .devcontainer/setup-container.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e

echo "Restoring developer tools..."
dotnet tool restore

echo "Downloading latest native assets..."
dotnet cake --target=externals-download

echo "Setup complete."