-
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
1,451 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
BasedOnStyle: Google | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.224.3/containers/cpp/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Debian / Ubuntu version (use Debian 11, Ubuntu 18.04/21.04 on local arm64/Apple Silicon): debian-11, debian-10, ubuntu-21.04, ubuntu-20.04, ubuntu-18.04 | ||
ARG VARIANT="bullseye" | ||
FROM mcr.microsoft.com/vscode/devcontainers/cpp:0-${VARIANT} | ||
|
||
ARG USERNAME=vscode | ||
|
||
# [Optional] Install CMake version different from what base image has already installed. | ||
# CMake reinstall choices: none, 3.21.5, 3.22.2, or versions from https://cmake.org/download/ | ||
ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="3.23.1" | ||
|
||
# Use installed binaries from the system. | ||
# Do not download latest version of CMake and Ninja during vcpkg bootstrap! | ||
ENV VCPKG_FORCE_SYSTEM_BINARIES=1 | ||
ENV VCPKG_USE_SYSTEM_BINARIES=1 | ||
|
||
# Optionally install the cmake for vcpkg | ||
COPY ./reinstall-cmake.sh /tmp/ | ||
RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \ | ||
chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \ | ||
fi \ | ||
&& rm -f /tmp/reinstall-cmake.sh | ||
|
||
# Install dependencies. | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends \ | ||
libboost-dev \ | ||
libsodium-dev \ | ||
libncurses5-dev \ | ||
libprotobuf-dev \ | ||
protobuf-compiler \ | ||
libgflags-dev \ | ||
libutempter-dev \ | ||
build-essential \ | ||
ninja-build \ | ||
# Note that in Ubuntu 21.04, there is no libcurl-dev, use libcurl4-openssl-dev | ||
libcurl4-openssl-dev | ||
|
||
# | ||
# Set up command history volume | ||
# See https://code.visualstudio.com/remote/advancedcontainers/persist-bash-history | ||
# | ||
RUN mkdir /commandhistory \ | ||
&& chown -R $USERNAME /commandhistory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.224.3/containers/cpp | ||
{ | ||
"name": "C++", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
// Update 'VARIANT' to pick an Debian / Ubuntu OS version: debian-11, debian-10, debian-9, ubuntu-21.04, ubuntu-20.04, ubuntu-18.04 | ||
// Use Debian 11, Debian 9, Ubuntu 18.04 or Ubuntu 21.04 on local arm64/Apple Silicon | ||
"args": { "VARIANT": "ubuntu-21.04" } | ||
}, | ||
"runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], | ||
|
||
// Set *default* container specific settings.json values on container create. | ||
"settings": {}, | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cmake-tools" | ||
], | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "git submodule update --init --recursive", | ||
|
||
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. | ||
"remoteUser": "vscode", | ||
|
||
// For sharing shell history out of the container. | ||
"mounts": [ | ||
"source=eternalterminal-history,target=/commandhistory,type=volume" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env bash | ||
#------------------------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. | ||
#------------------------------------------------------------------------------------------------------------- | ||
# | ||
set -e | ||
|
||
CMAKE_VERSION=${1:-"none"} | ||
|
||
if [ "${CMAKE_VERSION}" = "none" ]; then | ||
echo "No CMake version specified, skipping CMake reinstallation" | ||
exit 0 | ||
fi | ||
|
||
# Cleanup temporary directory and associated files when exiting the script. | ||
cleanup() { | ||
EXIT_CODE=$? | ||
set +e | ||
if [[ -n "${TMP_DIR}" ]]; then | ||
echo "Executing cleanup of tmp files" | ||
rm -Rf "${TMP_DIR}" | ||
fi | ||
exit $EXIT_CODE | ||
} | ||
trap cleanup EXIT | ||
|
||
|
||
echo "Installing CMake..." | ||
apt-get -y purge --auto-remove cmake | ||
mkdir -p /opt/cmake | ||
|
||
architecture=$(dpkg --print-architecture) | ||
case "${architecture}" in | ||
arm64) | ||
ARCH=aarch64 ;; | ||
amd64) | ||
ARCH=x86_64 ;; | ||
*) | ||
echo "Unsupported architecture ${architecture}." | ||
exit 1 | ||
;; | ||
esac | ||
|
||
CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh" | ||
CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt" | ||
TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX) | ||
|
||
echo "${TMP_DIR}" | ||
cd "${TMP_DIR}" | ||
|
||
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_BINARY_NAME}" -O | ||
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_CHECKSUM_NAME}" -O | ||
|
||
sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_NAME}" | ||
sh "${TMP_DIR}/${CMAKE_BINARY_NAME}" --prefix=/opt/cmake --skip-license | ||
|
||
ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ port = 2022 | |
verbose = 0 | ||
silent = 0 | ||
logsize = 20971520 | ||
telemetry = 1 |
Submodule sentry-native
updated
79 files
Submodule vcpkg
updated
2942 files
Oops, something went wrong.