Files
vscode/build/azure-pipelines/linux/product-build-linux-test.yml
Robo 5216c04428 chore: update to electron 29 (#209818)
* chore: update electron@29.1.0

* chore: update typings to 20.x

* chore: bump electron@29.1.5

* ci: fix crash in compiling extensions-ci

* chore: disable .d.ts check for build/

$ ../node_modules/.bin/tsc -p tsconfig.build.json
node_modules/@types/chokidar/index.d.ts:21:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/@types/chokidar/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

21 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
                ~~~~~~~~~

node_modules/chokidar/types/index.d.ts:8:14 - error TS2420: Class 'import("/Users/demohan/github/vscode/build/node_modules/chokidar/types/index").FSWatcher' incorrectly implements interface 'import("fs").FSWatcher'.
  Type 'FSWatcher' is missing the following properties from type 'FSWatcher': ref, unref

8 export class FSWatcher extends EventEmitter implements fs.FSWatcher {
               ~~~~~~~~~

Found 2 errors in 2 files.

Errors  Files
     1  node_modules/@types/chokidar/index.d.ts:21
     1  node_modules/chokidar/types/index.d.ts:8

Refs a0f9e09f64

* chore: update core types

* temp: fix layer validation

* chore: update nodejs checksums

* ci: use latest v20 LTS for missing node-gyp

Refs eacec5f490

* ci: define LIBCPP_HARDENING_MODE

* ci: fix crash in vscode-web-min-ci

* chore: update rpm deps-list

* chore: bump tree-sitter-typescript@0.20.5

* chore: bump electron@29.3.0

* chore: bump electron@29.3.1

* chore: update rpm deps-list for x86_64

* ci: disable io_uring UV backend on linux

* ci: disable io_uring backend for oss as well

* chore: update typings to 20.x

* ci: add TODO for io_uring workaround

* chore: bump distro

* chore: update preinstall node version checks

* chore: update @types/gulp

Refs https://github.com/microsoft/vscode/issues/212442

* ci: disable io_uring in more test suites
2024-05-11 01:20:28 +09:00

289 lines
12 KiB
YAML

parameters:
- name: VSCODE_QUALITY
type: string
- name: VSCODE_RUN_UNIT_TESTS
type: boolean
- name: VSCODE_RUN_INTEGRATION_TESTS
type: boolean
- name: VSCODE_RUN_SMOKE_TESTS
type: boolean
- name: PUBLISH_TASK_NAME
type: string
default: PublishPipelineArtifact@0
steps:
- script: yarn npm-run-all -lp "electron $(VSCODE_ARCH)" "playwright-install"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Download Electron and Playwright
retryCountOnTaskFailure: 3
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
ELECTRON_ROOT=.build/electron
sudo chown root $APP_ROOT/chrome-sandbox
sudo chown root $ELECTRON_ROOT/chrome-sandbox
sudo chmod 4755 $APP_ROOT/chrome-sandbox
sudo chmod 4755 $ELECTRON_ROOT/chrome-sandbox
stat $APP_ROOT/chrome-sandbox
stat $ELECTRON_ROOT/chrome-sandbox
displayName: Change setuid helper binary permission
- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: ./scripts/test.sh --tfs "Unit Tests"
env:
DISPLAY: ":10"
displayName: Run unit tests (Electron)
timeoutInMinutes: 15
- script: yarn test-node
displayName: Run unit tests (node.js)
timeoutInMinutes: 15
- script: yarn test-browser-no-install --browser chromium --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: Run unit tests (Browser, Chromium)
timeoutInMinutes: 15
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: ./scripts/test.sh --build --tfs "Unit Tests"
displayName: Run unit tests (Electron)
timeoutInMinutes: 15
- script: yarn test-node --build
displayName: Run unit tests (node.js)
timeoutInMinutes: 15
- script: yarn test-browser-no-install --build --browser chromium --tfs "Browser Unit Tests"
env:
DEBUG: "*browser*"
displayName: Run unit tests (Browser, Chromium)
timeoutInMinutes: 15
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- script: |
set -e
yarn gulp \
compile-extension:configuration-editing \
compile-extension:css-language-features-server \
compile-extension:emmet \
compile-extension:git \
compile-extension:github-authentication \
compile-extension:html-language-features-server \
compile-extension:ipynb \
compile-extension:notebook-renderers \
compile-extension:json-language-features-server \
compile-extension:markdown-language-features-server \
compile-extension:markdown-language-features \
compile-extension-media \
compile-extension:microsoft-authentication \
compile-extension:typescript-language-features \
compile-extension:vscode-api-tests \
compile-extension:vscode-colorize-tests \
compile-extension:vscode-test-resolver
displayName: Build integration tests
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: ./scripts/test-integration.sh --tfs "Integration Tests"
env:
DISPLAY: ":10"
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Electron)
timeoutInMinutes: 20
- script: ./scripts/test-web-integration.sh --browser chromium
displayName: Run integration tests (Browser, Chromium)
timeoutInMinutes: 20
- script: ./scripts/test-remote-integration.sh
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Remote)
timeoutInMinutes: 20
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
# Figure out the full absolute path of the product we just built
# including the remote server and configure the integration tests
# to run with these builds instead of running out of sources.
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
./scripts/test-integration.sh --build --tfs "Integration Tests"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Electron)
timeoutInMinutes: 20
- script: ./scripts/test-web-integration.sh --browser chromium
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
displayName: Run integration tests (Browser, Chromium)
timeoutInMinutes: 20
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
APP_NAME=$(node -p "require(\"$APP_ROOT/resources/app/product.json\").applicationName")
INTEGRATION_TEST_APP_NAME="$APP_NAME" \
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME" \
./scripts/test-remote-integration.sh
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run integration tests (Remote)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
set -e
ps -ef
cat /proc/sys/fs/inotify/max_user_watches
lsof | wc -l
displayName: Diagnostics before smoke test run (processes, max_user_watches, number of opened file handles)
continueOnError: true
condition: succeededOrFailed()
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: yarn --cwd test/smoke compile
displayName: Compile smoke tests
- script: yarn gulp compile-extension:markdown-language-features compile-extension-media compile-extension:vscode-test-resolver
displayName: Build extensions for smoke tests
- script: yarn gulp node
displayName: Download node.js for remote smoke tests
retryCountOnTaskFailure: 3
- script: yarn smoketest-no-compile --tracing
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Electron)
- script: yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Browser, Chromium)
- script: yarn smoketest-no-compile --remote --tracing
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Remote)
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: yarn smoketest-no-compile --tracing --build "$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)"
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Electron)
- script: yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
env:
VSCODE_REMOTE_SERVER_PATH: $(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)-web
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
timeoutInMinutes: 20
displayName: Run smoke tests (Browser, Chromium)
- script: |
set -e
yarn gulp compile-extension:vscode-test-resolver
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-server-linux-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --tracing --remote --build "$APP_PATH"
timeoutInMinutes: 20
env:
# TODO(deepak1556): Remove this once runtime is updated for
# https://github.com/microsoft/vscode/issues/210467#issuecomment-2104566724
UV_USE_IO_URING: 0
displayName: Run smoke tests (Remote)
- script: |
set -e
ps -ef
cat /proc/sys/fs/inotify/max_user_watches
lsof | wc -l
displayName: Diagnostics after smoke test run (processes, max_user_watches, number of opened file handles)
continueOnError: true
condition: succeededOrFailed()
- ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
- task: ${{ parameters.PUBLISH_TASK_NAME }}
inputs:
targetPath: .build/crashes
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
artifactName: crash-dump-linux-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
artifactName: crash-dump-linux-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
${{ else }}:
artifactName: crash-dump-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
sbomEnabled: false
displayName: "Publish Crash Reports"
continueOnError: true
condition: failed()
# In order to properly symbolify above crash reports
# (if any), we need the compiled native modules too
- task: ${{ parameters.PUBLISH_TASK_NAME }}
inputs:
targetPath: node_modules
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
artifactName: node-modules-linux-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
artifactName: node-modules-linux-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
${{ else }}:
artifactName: node-modules-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
sbomEnabled: false
displayName: "Publish Node Modules"
continueOnError: true
condition: failed()
- task: ${{ parameters.PUBLISH_TASK_NAME }}
inputs:
targetPath: .build/logs
${{ if and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, false)) }}:
artifactName: logs-linux-$(VSCODE_ARCH)-integration-$(System.JobAttempt)
${{ elseif and(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, false), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
artifactName: logs-linux-$(VSCODE_ARCH)-smoke-$(System.JobAttempt)
${{ else }}:
artifactName: logs-linux-$(VSCODE_ARCH)-$(System.JobAttempt)
sbomEnabled: false
displayName: "Publish Log Files"
continueOnError: true
condition: succeededOrFailed()
- task: PublishTestResults@2
displayName: Publish Tests Results
inputs:
testResultsFiles: "*-results.xml"
searchFolder: "$(Build.ArtifactStagingDirectory)/test-results"
condition: succeededOrFailed()