mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
chore: update glibc version checker for remote (#215599)
This commit is contained in:
parent
eb4092a6de
commit
d550ede2c3
|
@ -133,14 +133,6 @@ steps:
|
|||
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME: vscodehub.azurecr.io/vscode-linux-build-agent:bionic-arm32v7
|
||||
displayName: Install dependencies
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
|
||||
- script: |
|
||||
set -e
|
||||
EXPECTED_GLIBC_VERSION="2.17" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.19" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in remote/node_modules
|
||||
|
||||
- script: node build/azure-pipelines/distro/mixin-npm
|
||||
displayName: Mixin distro node modules
|
||||
|
||||
|
@ -172,9 +164,11 @@ steps:
|
|||
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-legacy-$(VSCODE_ARCH).tar.gz"
|
||||
UNARCHIVE_PATH="`pwd`/../vscode-server-linux-$(VSCODE_ARCH)"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
|
||||
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
|
||||
echo "##vso[task.setvariable variable=SERVER_UNARCHIVE_PATH]$UNARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server
|
||||
|
@ -192,6 +186,26 @@ steps:
|
|||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server (web)
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
|
||||
- script: |
|
||||
set -e
|
||||
EXPECTED_GLIBC_VERSION="2.17" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.19" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
env:
|
||||
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in server archive
|
||||
|
||||
- ${{ else }}:
|
||||
- script: |
|
||||
set -e
|
||||
EXPECTED_GLIBC_VERSION="2.28" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.22" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
env:
|
||||
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in server archive
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
|
||||
- template: product-build-linux-test.yml
|
||||
parameters:
|
||||
|
|
|
@ -131,16 +131,6 @@ steps:
|
|||
displayName: Install dependencies
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
EXPECTED_GLIBC_VERSION="2.28" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.25" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in remote/node_modules
|
||||
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- script: node build/azure-pipelines/distro/mixin-npm
|
||||
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
|
||||
|
@ -213,9 +203,11 @@ steps:
|
|||
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
|
||||
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
|
||||
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-$(VSCODE_ARCH).tar.gz"
|
||||
UNARCHIVE_PATH="`pwd`/../vscode-server-linux-$(VSCODE_ARCH)"
|
||||
mkdir -p $(dirname $ARCHIVE_PATH)
|
||||
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
|
||||
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
|
||||
echo "##vso[task.setvariable variable=SERVER_UNARCHIVE_PATH]$UNARCHIVE_PATH"
|
||||
env:
|
||||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server
|
||||
|
@ -232,6 +224,36 @@ steps:
|
|||
GITHUB_TOKEN: "$(github-distro-mixin-password)"
|
||||
displayName: Build server (web)
|
||||
|
||||
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
source ./build/azure-pipelines/linux/setup-env.sh
|
||||
|
||||
EXPECTED_GLIBC_VERSION="2.28" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.25" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
env:
|
||||
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
VSCODE_ARCH: $(VSCODE_ARCH)
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in server archive
|
||||
|
||||
- ${{ else }}:
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
source ./build/azure-pipelines/linux/setup-env.sh
|
||||
|
||||
EXPECTED_GLIBC_VERSION="2.28" \
|
||||
EXPECTED_GLIBCXX_VERSION="3.4.26" \
|
||||
./build/azure-pipelines/linux/verify-glibc-requirements.sh
|
||||
env:
|
||||
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
|
||||
npm_config_arch: $(NPM_ARCH)
|
||||
VSCODE_ARCH: $(VSCODE_ARCH)
|
||||
displayName: Check GLIBC and GLIBCXX dependencies in server archive
|
||||
|
||||
- ${{ else }}:
|
||||
- script: yarn gulp "transpile-client-swc" "transpile-extensions"
|
||||
env:
|
||||
|
|
|
@ -9,8 +9,8 @@ elif [ "$VSCODE_ARCH" == "armhf" ]; then
|
|||
TRIPLE="arm-rpi-linux-gnueabihf"
|
||||
fi
|
||||
|
||||
# Get all files with .node extension from remote/node_modules folder
|
||||
files=$(find remote/node_modules -name "*.node" -not -path "*prebuilds*")
|
||||
# Get all files with .node extension from server folder
|
||||
files=$(find $SEARCH_PATH -name "*.node" -not -path "*prebuilds*" -o -type f -executable -name "node")
|
||||
|
||||
echo "Verifying requirements for files: $files"
|
||||
|
||||
|
@ -19,13 +19,13 @@ for file in $files; do
|
|||
glibcxx_version="$EXPECTED_GLIBCXX_VERSION"
|
||||
while IFS= read -r line; do
|
||||
if [[ $line == *"GLIBC_"* ]]; then
|
||||
version=$(echo "$line" | awk '{print $5}' | tr -d '()')
|
||||
version=$(echo "$line" | awk '{if ($5 ~ /^[0-9a-fA-F]+$/) print $6; else print $5}' | tr -d '()')
|
||||
version=${version#*_}
|
||||
if [[ $(printf "%s\n%s" "$version" "$glibc_version" | sort -V | tail -n1) == "$version" ]]; then
|
||||
glibc_version=$version
|
||||
fi
|
||||
elif [[ $line == *"GLIBCXX_"* ]]; then
|
||||
version=$(echo "$line" | awk '{print $5}' | tr -d '()')
|
||||
version=$(echo "$line" | awk '{if ($5 ~ /^[0-9a-fA-F]+$/) print $6; else print $5}' | tr -d '()')
|
||||
version=${version#*_}
|
||||
if [[ $(printf "%s\n%s" "$version" "$glibcxx_version" | sort -V | tail -n1) == "$version" ]]; then
|
||||
glibcxx_version=$version
|
||||
|
@ -34,11 +34,11 @@ for file in $files; do
|
|||
done < <("$PWD/.build/sysroots/$TRIPLE/$TRIPLE/bin/objdump" -T "$file")
|
||||
|
||||
if [[ "$glibc_version" != "$EXPECTED_GLIBC_VERSION" ]]; then
|
||||
echo "Error: File $file has dependency on GLIBC > $EXPECTED_GLIBC_VERSION"
|
||||
echo "Error: File $file has dependency on GLIBC > $EXPECTED_GLIBC_VERSION, found $glibc_version"
|
||||
exit 1
|
||||
fi
|
||||
if [[ "$glibcxx_version" != "$EXPECTED_GLIBCXX_VERSION" ]]; then
|
||||
echo "Error: File $file has dependency on GLIBCXX > $EXPECTED_GLIBCXX_VERSION"
|
||||
echo "Error: File $file has dependency on GLIBCXX > $EXPECTED_GLIBCXX_VERSION, found $glibcxx_version"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue