Skip to content

Commit

Permalink
Merge branch 'main' into fix_minimap_slider
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Jul 26, 2023
2 parents fab0084 + 0b58930 commit d998cf1
Show file tree
Hide file tree
Showing 315 changed files with 5,742 additions and 2,647 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/install-vscode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.mi
rm -f packages.microsoft.gpg

apt update
apt install -y code-insiders libsecret-1-dev libxkbfile-dev
apt install -y code-insiders libsecret-1-dev libxkbfile-dev libkrb5-dev
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
- name: Setup Build Environment
run: |
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libkrb5-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/monaco-editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-yarnCacheDir-
- name: Install libkrb5-dev
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: sudo apt install -y libkrb5-dev
- name: Execute yarn
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
env:
Expand Down
4 changes: 2 additions & 2 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
disturl "https://electronjs.org/headers"
target "22.3.14"
ms_build_id "21893604"
target "22.3.17"
ms_build_id "22432899"
runtime "electron"
build_from_source "true"
2 changes: 1 addition & 1 deletion build/.cachesalt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-06-12T12:55:48.130Z
2023-07-20T13:31:34.746Z
6 changes: 6 additions & 0 deletions build/.moduleignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ windows-foreground-love/build/**
windows-foreground-love/src/**
!windows-foreground-love/**/*.node

kerberos/binding.gyp
kerberos/build/**
kerberos/src/**
kerberos/node_modules/**
!kerberos/**/*.node

keytar/binding.gyp
keytar/build/**
keytar/src/**
Expand Down
10 changes: 6 additions & 4 deletions build/azure-pipelines/alpine/product-build-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ steps:
inputs:
versionSpec: "16.x"

- script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
displayName: "Register Docker QEMU"
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))

- template: ../distro/download-distro.yml

- task: AzureKeyVault@1
Expand Down Expand Up @@ -67,6 +63,10 @@ steps:
displayName: "Pull image"
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))

- script: sudo apt-get update && sudo apt-get install -y libkrb5-dev
displayName: Install build dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))

- script: |
set -e
for i in {1..5}; do # try 5 times
Expand All @@ -78,10 +78,12 @@ steps:
echo "Yarn failed $i, trying again..."
done
env:
npm_config_arch: $(NPM_ARCH)
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME: vscodehub.azurecr.io/vscode-linux-build-agent:alpine-$(VSCODE_ARCH)
VSCODE_HOST_MOUNT: "/mnt/vss/_work/1/s"
displayName: Install build dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
Expand Down
1 change: 1 addition & 0 deletions build/azure-pipelines/darwin/product-build-darwin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ steps:
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Download Electron and Playwright
retryCountOnTaskFailure: 3

- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
Expand Down
40 changes: 40 additions & 0 deletions build/azure-pipelines/linux/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash

set -e

# To workaround the issue of yarn not respecting the registry value from .npmrc
yarn config set registry "$NPM_REGISTRY"

if [ -z "$CC" ] || [ -z "$CXX" ]; then
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/108.0.5359.215/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux

# Download libcxx headers and objects from upstream electron releases
DEBUG=libcxx-fetcher \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \
VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \
VSCODE_ARCH="$npm_config_arch" \
node build/linux/libcxx-fetcher.js

# Set compiler toolchain
# Flags for the client build are based on
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/108.0.5359.215:build/config/arm.gni
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/108.0.5359.215:build/config/compiler/BUILD.gn
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/108.0.5359.215:build/config/c++/BUILD.gn
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -I$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit -D_LIBCPP_ABI_NAMESPACE=Cr"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -L$PWD/.build/libcxx-objects -lc++abi -Wl,--lto-O0"
export VSCODE_REMOTE_CC=$(which gcc)
export VSCODE_REMOTE_CXX=$(which g++)
fi

for i in {1..5}; do # try 5 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
12 changes: 1 addition & 11 deletions build/azure-pipelines/linux/product-build-linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,7 @@ steps:
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Download Electron and Playwright

- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
sudo service xvfb start
displayName: Setup build environment
retryCountOnTaskFailure: 3

- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
Expand Down
177 changes: 99 additions & 78 deletions build/azure-pipelines/linux/product-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,28 @@ steps:
- script: tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
displayName: Extract compilation output

- script: |
set -e
# Start X server
/etc/init.d/xvfb start
# Start dbus session
DBUS_LAUNCH_RESULT=$(sudo dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address)
echo "##vso[task.setvariable variable=DBUS_SESSION_BUS_ADDRESS]$DBUS_LAUNCH_RESULT"
displayName: Setup system services
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))
- script: |
set -e
# Start X server
sudo apt-get update
sudo apt-get install -y pkg-config \
libxss1 \
dbus \
xvfb \
libgtk-3-0 \
libgbm1 \
libxkbfile-dev \
libsecret-1-dev \
libkrb5-dev
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
sudo service xvfb start
# Start dbus session
sudo mkdir -p /var/run/dbus
DBUS_LAUNCH_RESULT=$(sudo dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address)
echo "##vso[task.setvariable variable=DBUS_SESSION_BUS_ADDRESS]$DBUS_LAUNCH_RESULT"
displayName: Setup system services
- script: node build/setup-npm-registry.js $NPM_REGISTRY
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
Expand All @@ -72,7 +85,10 @@ steps:
- script: |
set -e
npm config set registry "$NPM_REGISTRY" --location=project
npm config set always-auth=true --location=project
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
# following is a workaround for yarn to send authorization header
# for GET requests to the registry.
echo "always-auth=true" >> .npmrc
yarn config set registry "$NPM_REGISTRY"
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM & Yarn
Expand All @@ -83,17 +99,6 @@ steps:
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication

# TODO@joaomoreno TODO@deepak1556 this should be part of the base image
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
sudo apt-get update && sudo apt-get install -y ca-certificates curl gnupg
sudo mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update && sudo apt install -y docker-ce-cli
displayName: Install Docker client
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- ${{ if and(ne(parameters.VSCODE_QUALITY, 'oss'), or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64'))) }}:
- task: Docker@1
displayName: "Pull Docker image"
Expand All @@ -105,69 +110,65 @@ steps:
containerCommand: uname
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))

- ${{ if and(ne(parameters.VSCODE_QUALITY, 'oss'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
- script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
displayName: Register Docker QEMU
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['VSCODE_ARCH'], 'arm64'))

- script: |
set -e
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
for i in {1..5}; do # try 5 times
yarn --cwd build --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
if [ -z "$CC" ] || [ -z "$CXX" ]; then
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/108.0.5359.215/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
# Download libcxx headers and objects from upstream electron releases
DEBUG=libcxx-fetcher \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \
VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \
VSCODE_ARCH="$(NPM_ARCH)" \
node build/linux/libcxx-fetcher.js
# Set compiler toolchain
# Flags for the client build are based on
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/108.0.5359.215:build/config/arm.gni
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/108.0.5359.215:build/config/compiler/BUILD.gn
# https://source.chromium.org/chromium/chromium/src/+/refs/tags/108.0.5359.215:build/config/c++/BUILD.gn
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-nostdinc++ -D__NO_INLINE__ -I$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit -D_LIBCPP_ABI_NAMESPACE=Cr"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -L$PWD/.build/libcxx-objects -lc++abi -Wl,--lto-O0"
export VSCODE_REMOTE_CC=$(which gcc)
export VSCODE_REMOTE_CXX=$(which g++)
fi
for i in {1..5}; do # try 5 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
env:
npm_config_arch: $(NPM_ARCH)
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
${{ if and(ne(parameters.VSCODE_QUALITY, 'oss'), or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64'))) }}:
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME: vscodehub.azurecr.io/vscode-linux-build-agent:centos7-devtoolset8-$(VSCODE_ARCH)
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
for i in {1..5}; do # try 5 times
yarn --cwd build --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
docker run -e GITHUB_TOKEN -e npm_config_arch -e NPM_REGISTRY \
-e VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME -e VSCODE_HOST_MOUNT \
-e ELECTRON_SKIP_BINARY_DOWNLOAD -e PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD \
-v /mnt/vss/_work/1/s:/home/builduser/vscode -v /mnt/vss/_work/1/s/.build/.netrc:/home/builduser/.netrc \
-v /var/run/docker.sock:/var/run/docker.sock \
-u 1000:1000 \
-w /home/builduser/vscode vscodehub.azurecr.io/vscode-linux-build-agent:bionic-$(VSCODE_ARCH) \
/bin/bash -c "./build/azure-pipelines/linux/install.sh"
sudo chown -R $USER:$USER /mnt/vss/_work/1/s
env:
npm_config_arch: $(NPM_ARCH)
NPM_REGISTRY: "$(NPM_REGISTRY)"
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
VSCODE_HOST_MOUNT: "/mnt/vss/_work/1/s"
${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME: vscodehub.azurecr.io/vscode-linux-build-agent:centos7-devtoolset8-$(VSCODE_ARCH)
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: node build/azure-pipelines/distro/mixin-npm
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Mixin distro node modules

- ${{ else }}:
- script: |
set -e
for i in {1..5}; do # try 5 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
env:
npm_config_arch: $(NPM_ARCH)
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- script: |
set -e
node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
Expand Down Expand Up @@ -248,12 +249,32 @@ steps:
mv $(Build.ArtifactStagingDirectory)/cli/$APP_NAME $(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)/bin/$CLI_APP_NAME
displayName: Make CLI executable
- script: |
set -e
docker run -v /mnt/vss/_work/1/s:/home/builduser/vscode \
-v /mnt/vss/_work/1/s/.build/.netrc:/home/builduser/.netrc \
-v /mnt/vss/_work/1/VSCode-linux-$(VSCODE_ARCH):/home/builduser/VSCode-linux-$(VSCODE_ARCH) \
-u 1000:1000 \
-w /home/builduser/vscode vscodehub.azurecr.io/vscode-linux-build-agent:bionic-$(VSCODE_ARCH) \
yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-deb"
displayName: Prepare deb package
- script: |
set -e
yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-deb"
echo "##vso[task.setvariable variable=DEB_PATH]$(ls .build/linux/deb/*/deb/*.deb)"
displayName: Build deb package
- script: |
set -e
docker run -v /mnt/vss/_work/1/s:/home/builduser/vscode \
-v /mnt/vss/_work/1/s/.build/.netrc:/home/builduser/.netrc \
-v /mnt/vss/_work/1/VSCode-linux-$(VSCODE_ARCH):/home/builduser/VSCode-linux-$(VSCODE_ARCH) \
-u 1000:1000 \
-w /home/builduser/vscode vscodehub.azurecr.io/vscode-linux-build-agent:bionic-$(VSCODE_ARCH) \
yarn gulp "vscode-linux-$(VSCODE_ARCH)-prepare-rpm"
displayName: Prepare rpm package
- script: |
set -e
yarn gulp "vscode-linux-$(VSCODE_ARCH)-build-rpm"
Expand Down
4 changes: 4 additions & 0 deletions build/azure-pipelines/oss/product-build-pr-cache-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ steps:
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication

- script: sudo apt-get update && sudo apt-get install -y libkrb5-dev
displayName: Install build dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))

- script: |
set -e
for i in {1..5}; do # try 5 times
Expand Down
Loading

0 comments on commit d998cf1

Please sign in to comment.