Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Engineering - update Code OSS pipeline #155610

Merged
merged 49 commits into from Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
f0bc09b
Add basic job
lszomoru Jun 15, 2022
8ce641a
Update Windows stage
lszomoru Jun 15, 2022
ec77725
Add more tasks
lszomoru Jun 15, 2022
1488b11
Remove --build
lszomoru Jun 15, 2022
39ac5ae
Shallow checkout
lszomoru Jun 15, 2022
4ca767b
Add unit test tasks
lszomoru Jun 15, 2022
387074e
Add conditions to some of the steps in the compile stage
lszomoru Jun 16, 2022
198a137
Trying to surface test failures
lszomoru Jun 16, 2022
76aa658
Introduce test failure
lszomoru Jun 16, 2022
d29534c
Add continueOnError
lszomoru Jun 16, 2022
475832e
Introduce a different test failure
lszomoru Jun 16, 2022
9b1a6a8
Revert explicit test failure
lszomoru Jun 16, 2022
b2a41da
Merge branch 'main' into lszomoru/product-build-oss-parallel
lszomoru Jun 16, 2022
80e79a2
Remove continueOnError
lszomoru Jun 16, 2022
093c235
Add job for integration tests
lszomoru Jun 16, 2022
9168b92
Add integration test tasks
lszomoru Jun 16, 2022
7334c07
Add missing script
lszomoru Jun 16, 2022
1b0bc5e
Add job for smoke tests
lszomoru Jun 16, 2022
a3a8fd9
Fix task and reorganize jobs
lszomoru Jun 16, 2022
aa0cb5b
Add publishing tasks
lszomoru Jun 16, 2022
b805095
Add Linux jobs
lszomoru Jun 16, 2022
cf92806
Comment out Linux task
lszomoru Jun 16, 2022
a8f9c8b
Do not run the task in a container
lszomoru Jun 16, 2022
dc226c7
Remove --build argument
lszomoru Jun 16, 2022
0e9a353
Comment out task
lszomoru Jun 16, 2022
e825855
Add DISPLAY environment variables
lszomoru Jun 16, 2022
f0654c8
Try to fix build environment
lszomoru Jun 16, 2022
dc867a5
Add remaining Linux tasks
lszomoru Jun 16, 2022
9f00d0d
Refactor windows jobs
lszomoru Jun 17, 2022
6f2bcef
Add command to create the .build folder
lszomoru Jun 17, 2022
c3a005b
Refactor Linux jobs
lszomoru Jun 17, 2022
3ac6883
Add missing condition
lszomoru Jun 17, 2022
2ecd79e
Add transpile task
lszomoru Jun 17, 2022
cf0a0e4
Refactor macOS jobs
lszomoru Jun 17, 2022
08ee629
Add macOS test tasks
lszomoru Jun 17, 2022
0bcbdd9
Add task to compile smoke tests
lszomoru Jun 17, 2022
3dfa071
Merge branch 'main' into lszomoru/product-build-oss-parallel
lszomoru Jun 17, 2022
86c671f
Merge branch 'main' into lszomoru/product-build-oss-parallel
lszomoru Jun 26, 2022
ae963e2
Merge branch 'main' into lszomoru/product-build-oss-parallel
lszomoru Jun 27, 2022
2926dcf
Merge branch 'main' into lszomoru/product-build-oss-parallel
lszomoru Jul 7, 2022
1e54acc
Update linux pool
lszomoru Jul 7, 2022
3ac7b54
Linux - add more test suites
lszomoru Jul 7, 2022
dc6c08d
Linux - add more test suites
lszomoru Jul 7, 2022
b0d3be9
Windows - add more test suites
lszomoru Jul 7, 2022
a35d3ed
Windows - add test suite
lszomoru Jul 7, 2022
85740ee
Windows - remove browser smoke tests
lszomoru Jul 7, 2022
8b5dae5
Merge branch 'main' into lszomoru/product-build-oss-parallel
lszomoru Jul 19, 2022
0f5bbc6
Comment out Windows and macOS
lszomoru Jul 19, 2022
8893d20
Remove change that is not needed
lszomoru Jul 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
193 changes: 112 additions & 81 deletions build/azure-pipelines/darwin/product-build-darwin-test.yml
@@ -1,4 +1,6 @@
parameters:
- name: VSCODE_QUALITY
type: string
- name: VSCODE_RUN_UNIT_TESTS
type: boolean
- name: VSCODE_RUN_INTEGRATION_TESTS
Expand All @@ -14,25 +16,43 @@ steps:
displayName: Download Electron and Playwright

- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- script: |
set -e
./scripts/test.sh --build --tfs "Unit Tests"
displayName: Run unit tests (Electron)
timeoutInMinutes: 15

- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- script: |
set -e
yarn test-node --build
displayName: Run unit tests (node.js)
timeoutInMinutes: 15

- ${{ if eq(parameters.VSCODE_RUN_UNIT_TESTS, true) }}:
- script: |
set -e
DEBUG=*browser* yarn test-browser-no-install --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
displayName: Run unit tests (Browser, Chromium & Webkit)
timeoutInMinutes: 30
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
./scripts/test.sh --tfs "Unit Tests"
displayName: Run unit tests (Electron)
timeoutInMinutes: 15

- script: |
set -e
yarn test-node
displayName: Run unit tests (node.js)
timeoutInMinutes: 15

- script: |
set -e
DEBUG=*browser* yarn test-browser-no-install --sequential --browser chromium --browser webkit --tfs "Browser Unit Tests"
displayName: Run unit tests (Browser, Chromium & Webkit)
timeoutInMinutes: 30

- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
./scripts/test.sh --build --tfs "Unit Tests"
displayName: Run unit tests (Electron)
timeoutInMinutes: 15

- script: |
set -e
yarn test-node --build
displayName: Run unit tests (node.js)
timeoutInMinutes: 15

- script: |
set -e
DEBUG=*browser* yarn test-browser-no-install --sequential --build --browser chromium --browser webkit --tfs "Browser Unit Tests"
displayName: Run unit tests (Browser, Chromium & Webkit)
timeoutInMinutes: 30

- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- script: |
Expand All @@ -57,38 +77,42 @@ steps:
compile-extension:vscode-test-resolver
displayName: Build integration tests

- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- 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-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
./scripts/test-integration.sh --build --tfs "Integration Tests"
displayName: Run integration tests (Electron)
timeoutInMinutes: 20

- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- script: |
set -e
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)" \
./scripts/test-web-integration.sh --browser webkit
displayName: Run integration tests (Browser, Webkit)
timeoutInMinutes: 20

- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
./scripts/test-remote-integration.sh
displayName: Run integration tests (Remote)
timeoutInMinutes: 20
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
./scripts/test-integration.sh --tfs "Integration Tests"
displayName: Run integration tests (Electron)
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-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
./scripts/test-integration.sh --build --tfs "Integration Tests"
displayName: Run integration tests (Electron)
timeoutInMinutes: 20

- script: |
set -e
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)" \
./scripts/test-web-integration.sh --browser webkit
displayName: Run integration tests (Browser, Webkit)
timeoutInMinutes: 20

- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
./scripts/test-remote-integration.sh
displayName: Run integration tests (Remote)
timeoutInMinutes: 20

- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
Expand All @@ -98,35 +122,44 @@ steps:
continueOnError: true
condition: succeededOrFailed()

- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
set -e
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --web --tracing --headless
timeoutInMinutes: 20
displayName: Run smoke tests (Browser, Chromium)
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
yarn --cwd test/smoke compile
displayName: Compile smoke tests

- script: |
set -e
yarn smoketest-no-compile --tracing
timeoutInMinutes: 20
displayName: Run smoke tests (Electron)

- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
yarn smoketest-no-compile --tracing --build "$APP_ROOT/$APP_NAME"
timeoutInMinutes: 20
displayName: Run smoke tests (Electron)

- script: |
set -e
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --web --tracing --headless
timeoutInMinutes: 20
displayName: Run smoke tests (Browser, Chromium)

- script: |
set -e
yarn gulp compile-extension:vscode-test-resolver
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --tracing --remote --build "$APP_ROOT/$APP_NAME"
timeoutInMinutes: 20
displayName: Run smoke tests (Remote)

- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
set -e
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
yarn smoketest-no-compile --tracing --build "$APP_ROOT/$APP_NAME"
timeoutInMinutes: 20
displayName: Run smoke tests (Electron)

- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
set -e
yarn gulp compile-extension:vscode-test-resolver
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --tracing --remote --build "$APP_ROOT/$APP_NAME"
timeoutInMinutes: 20
displayName: Run smoke tests (Remote)

- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- script: |
set -e
ps -ef
Expand All @@ -148,7 +181,6 @@ steps:
continueOnError: true
condition: failed()

- ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
# In order to properly symbolify above crash reports
# (if any), we need the compiled native modules too
- task: PublishPipelineArtifact@0
Expand All @@ -164,7 +196,6 @@ steps:
continueOnError: true
condition: failed()

- ${{ if or(eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
- task: PublishPipelineArtifact@0
inputs:
targetPath: .build/logs
Expand Down
59 changes: 38 additions & 21 deletions build/azure-pipelines/darwin/product-build-darwin.yml
Expand Up @@ -11,6 +11,11 @@ parameters:
type: boolean

steps:
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- checkout: self
fetchDepth: 1
retryCountOnTaskFailure: 3

- task: NodeTool@0
inputs:
versionSpec: "16.x"
Expand All @@ -23,16 +28,18 @@ steps:
KeyVaultName: vscode
SecretsFilter: "github-distro-mixin-password,macos-developer-certificate,macos-developer-certificate-key"

- task: DownloadPipelineArtifact@2
inputs:
artifact: Compilation
path: $(Build.ArtifactStagingDirectory)
displayName: Download compilation output
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- task: DownloadPipelineArtifact@2
inputs:
artifact: Compilation
path: $(Build.ArtifactStagingDirectory)
displayName: Download compilation output

- script: |
set -e
tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
displayName: Extract compilation output
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
tar -xzf $(Build.ArtifactStagingDirectory)/compilation.tar.gz
displayName: Extract compilation output

- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
Expand Down Expand Up @@ -123,29 +130,39 @@ steps:
node build/azure-pipelines/mixin
displayName: Mix in quality

- script: |
set -e
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
yarn gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
displayName: Build client
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
yarn gulp vscode-darwin-$(VSCODE_ARCH)-min-ci
displayName: Build client

- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
node build/azure-pipelines/mixin --server
displayName: Mix in server quality

- script: |
set -e
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
yarn gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
yarn gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
displayName: Build Server
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
yarn gulp vscode-reh-darwin-$(VSCODE_ARCH)-min-ci
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
yarn gulp vscode-reh-web-darwin-$(VSCODE_ARCH)-min-ci
displayName: Build Server

- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- script: |
set -e
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
yarn gulp "transpile-client" "transpile-extensions"
displayName: Transpile

- ${{ if or(eq(parameters.VSCODE_RUN_UNIT_TESTS, true), eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true), eq(parameters.VSCODE_RUN_SMOKE_TESTS, true)) }}:
- template: product-build-darwin-test.yml
parameters:
VSCODE_QUALITY: ${{ parameters.VSCODE_QUALITY }}
VSCODE_RUN_UNIT_TESTS: ${{ parameters.VSCODE_RUN_UNIT_TESTS }}
VSCODE_RUN_INTEGRATION_TESTS: ${{ parameters.VSCODE_RUN_INTEGRATION_TESTS }}
VSCODE_RUN_SMOKE_TESTS: ${{ parameters.VSCODE_RUN_SMOKE_TESTS }}
Expand Down