Created
March 2, 2022 11:23
-
-
Save OmerRaviv/ee25d23d5cd5ac960c21f14167e66eb3 to your computer and use it in GitHub Desktop.
Creates a WSL Ubuntu environment in which we can build, test, and debug code in dd-trace-dotnet
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
apt-get update && apt-get -y upgrade \ | |
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing \ | |
git \ | |
procps \ | |
wget \ | |
curl \ | |
cmake \ | |
make \ | |
llvm \ | |
clang \ | |
gcc \ | |
build-essential \ | |
rpm \ | |
ruby \ | |
ruby-dev \ | |
rubygems \ | |
&& gem install --no-document fpm \ | |
&& rm -rf /var/lib/apt/lists/* | |
export CXX=clang++ | |
export CC=clang | |
# Install the latest .NET SDK | |
curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh | |
chmod +x ./dotnet-install.sh | |
./dotnet-install.sh --install-dir /usr/share/dotnet | |
rm ./dotnet-install.sh | |
ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet | |
dotnet help | |
# Install ASP.NET Core runtimes using install script | |
# There is no arm64 runtime available for .NET Core 2.1, so just install the .NET Core runtime in that case | |
if [ "$(uname -m)" = "x86_64" ]; | |
then export NETCORERUNTIME2_1=aspnetcore; | |
else export NETCORERUNTIME2_1=dotnet; | |
fi | |
curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh | |
chmod +x ./dotnet-install.sh | |
./dotnet-install.sh --runtime $NETCORERUNTIME2_1 --channel 2.1 --install-dir /usr/share/dotnet --no-path | |
./dotnet-install.sh --runtime aspnetcore --channel 3.0 --install-dir /usr/share/dotnet --no-path | |
./dotnet-install.sh --runtime aspnetcore --channel 3.1 --install-dir /usr/share/dotnet --no-path | |
./dotnet-install.sh --runtime aspnetcore --channel 5.0 --install-dir /usr/share/dotnet --no-path | |
rm dotnet-install.sh | |
# Grab GDB to enable C++ debugging via CLion | |
apt-get install gdb | |
# Grab JetBrains Rider and run it for the first time. This requires WSLG (which comes with Windows 11). | |
curl https://download-cf.jetbrains.com/rider/JetBrains.Rider-2021.3.3.tar.gz -o /tmp/rider.tar.gz | |
sudo tar -xzf /tmp/rider.tar.gz -C /opt | |
cd /opt/JetBrains\ Rider-2021.3.3/bin | |
bash ./rider.sh | |
# Grab JetBrains CLion and run it for the first time This requires WSLG (which comes with Windows 11). | |
curl https://download.jetbrains.com/cpp/CLion-2021.3.3.tar.gz -L -o /tmp/clion.tar.gz | |
sudo tar -xzf /tmp/clion.tar.gz -C /opt | |
cd /opt/clion-2021.3.3/bin | |
bash ./clion.sh | |
# Build for the first time (this assumes dd-trace-dotnet is cloned to C:\dev\dd-trace-dotnet on Windows) | |
cd /mnt/c/dev/dd-trace-dotnet/tracer | |
bash ./build.sh | |
bash ./build.sh BuildAndRunLinuxIntegrationTests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment