Skip to content

Commit

Permalink
Clean up build pipelines (#4995)
Browse files Browse the repository at this point in the history
* Update template path

* fix use of template

* clean up variables

* Regression test updates

* Fix node version of integration tests

* Fix regression testing machine pool

* Fix uses of fs.rmSync for Node 12 compatibility

* Do not limit the max parallel runs

* rush change

* Fix regression integration test on Mac and Windows

* fix issues with the params passed to removeSync

* fix lint rules

* Only run regression on 12.x as 12.22 is the latest minor version

* set timeout to an hr, run appui tests in node12, ?? not added til node14

* hacky fix for https://github.com/nodejs/node/issues/45171\#issuecomment-1290833591 until patched in node 18

* rush change

* fix more tests

* rush change

* use || because ?? not supported til node14. again

---------

Co-authored-by: Arun George <aruniverse@users.noreply.github.com>
  • Loading branch information
calebmshafer and aruniverse authored Jan 31, 2023
1 parent e140fd0 commit f17bf71
Show file tree
Hide file tree
Showing 23 changed files with 139 additions and 133 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Each package has its own **node_modules** directory that contains symbolic links
## Prerequisites

- [Git](https://git-scm.com/)
- [Node](https://nodejs.org/en/):an installation of the latest security patch of Node 18. The Node installation also includes the **npm** package manager.
- [Node](https://nodejs.org/en/): an installation of the latest security patch of Node 18. The Node installation also includes the **npm** package manager.
- [Rush](https://github.com/Microsoft/web-build-tools/wiki/Rush): to install `npm install -g @microsoft/rush`
- [TypeScript](https://www.typescriptlang.org/): this is listed as a devDependency, so if you're building it from source, you will get it with `rush install`.
- [Visual Studio Code](https://code.visualstudio.com/): an optional dependency, but the repository structure is optimized for its use
Expand Down Expand Up @@ -49,7 +49,7 @@ For incremental builds, the `rush build` command can be used to only build packa
3. Ensure linting passes when run locally: `rush lint`
4. Locally commit changes: `git commit` (or use the Visual Studio Code user interface)
5. Repeat steps 1-4 until ready to push changes
6. Check for API signature changes: `rush extract-api`. This will update the signature files, located in `common/api`. __Note:__ before doing this, first do the following:
6. Check for API signature changes: `rush extract-api`. This will update the signature files, located in `common/api`. **Note:** before doing this, first do the following:
- Be sure that your branch is up to date with the target branch (i.e. `git merge origin/master`)
- Cleanup your build output: `rush clean`
- Rebuild the project: `rush build`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/components-react",
"comment": "",
"type": "none"
}
],
"packageName": "@itwin/components-react"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-backend",
"comment": "",
"type": "none"
}
],
"packageName": "@itwin/core-backend"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/imodel-components-react",
"comment": "",
"type": "none"
}
],
"packageName": "@itwin/imodel-components-react"
}
21 changes: 2 additions & 19 deletions common/config/azure-pipelines/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,14 @@ schedules:

jobs:
- job:
variables:
- name: linuxPool
value: "iModeljs Linux"
- name: mac_pool
value: iModelTechCI
- name: win_pool
value: iModelTechCI

strategy:
matrix:
"Windows_Node_18":
OS: windows-latest
platform: Windows_NT
name: $(win_pool)
"Linux_Node_18":
OS: ubuntu-latest
platform: Linux
name: $(linux_pool)
"MacOS_Node_18":
OS: macOS-latest
platform: Darwin
name: $(mac_pool)

pool:
vmImage: $(OS)
Expand All @@ -58,9 +44,6 @@ jobs:

steps:
- checkout: self
- template: ../templates/core-build.yaml
- template: ./templates/core-build.yaml
parameters:
name: Node_18
nodeVersion: 18.12.x
pool:
vmImage: $(OS)
nodeVersion: 18.x
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ variables:
- group: iModel.js Integration Test Users

jobs:
- job: Node_14_x
- job: Node_18_x
condition: succeeded()
pool:
vmImage: ubuntu-latest
steps:
- template: templates/integration-test-steps.yaml
parameters:
Node_Version: 14.x
nodeVersion: 18.x
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
steps:
- template: templates/integration-test-steps.yaml
parameters:
Node_Version: 18.x
nodeVersion: 18.x
22 changes: 6 additions & 16 deletions common/config/azure-pipelines/integration-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ trigger: none
pr: none

schedules:
- cron: "0 0 * * Sun"
displayName: Weekly Sunday build
branches:
include:
- master
- cron: "0 0 * * Sun"
displayName: Weekly Sunday build
branches:
include:
- master

variables:
- group: iTwin.js non-secret config variables
Expand All @@ -20,11 +20,7 @@ variables:
jobs:
- job: Integration_Tests_Full
strategy:
maxParallel: 3
matrix:
Linux_node_12_7:
imageName: ubuntu-latest
nodeVersion: 12.17.0
Linux_node_12_x:
imageName: ubuntu-latest
nodeVersion: 12.x
Expand All @@ -34,9 +30,6 @@ jobs:
linux_node_16_x:
imageName: ubuntu-latest
nodeVersion: 16.x
Windows_node_12_7:
imageName: windows-latest
nodeVersion: 12.17.0
Windows_node_12_x:
imageName: windows-latest
nodeVersion: 12.x
Expand All @@ -46,9 +39,6 @@ jobs:
Windows_node_16_x:
imageName: windows-latest
nodeVersion: 16.x
MacOS_node_12_7:
imageName: macos-latest
nodeVersion: 12.17.0
MacOS_node_12_x:
imageName: macos-latest
nodeVersion: 12.x
Expand All @@ -63,4 +53,4 @@ jobs:
steps:
- template: templates/integration-test-steps.yaml
parameters:
Node_Version: $(nodeVersion)
nodeVersion: $(nodeVersion)
7 changes: 2 additions & 5 deletions common/config/azure-pipelines/jobs/fast-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,12 @@ jobs:
strategy:
matrix:
"Windows_Node_18":
OS: windows-latest
platform: Windows_NT
name: $(win_pool)
"Linux_Node_18":
OS: ubuntu-latest
platform: Linux
name: $(linux_pool)
"MacOS_Node_18":
OS: macOS-latest
platform: Darwin
name: $(mac_pool)

Expand All @@ -59,11 +56,11 @@ jobs:
clean: true
- template: ../templates/core-build.yaml
parameters:
nodeVersion: 18.12.x
nodeVersion: 18.x
buildIos: ${{ eq(variables['Agent.OS'], 'Darwin') }}
# Will run if even there is a failure somewhere else in the pipeline.
- template: ../templates/publish-test-results.yaml
parameters:
NodeVersion: 18.12.x
nodeVersion: 18.x
# The publish script identifies any new packages not previously published and tags the build
- template: ../templates/publish.yaml
37 changes: 11 additions & 26 deletions common/config/azure-pipelines/jobs/regression-testing.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# iTwin.js Core Regression Testing Build
#
# Tests all supported versions of iTwin.js on 3 main supported platforms; Windows 10, Ubuntu 20.04, and MacOS .
# Tests all supported versions of iTwin.js on 3 main supported platforms; Windows 10, Ubuntu 20.04, and MacOS.
#
# Starts with the minimum version (currently 12.20.0) and then follows the tip of each subsequent minor version.
# Starts with the minimum version (currently 12.20.0) and then follows the tip of each subsequent major LTS (even-numbered) version.
#
# The current LTS is tested in all normal CI/PR builds so no need to test it here.

Expand All @@ -19,7 +19,7 @@ schedules:
jobs:
- job:
variables:
- name: linuxPool
- name: linux_pool
value: "iModeljs Linux"
- name: mac_pool
value: iModelTechCI
Expand All @@ -28,21 +28,21 @@ jobs:

strategy:
matrix:
"Windows_Node_18":
"Windows_Node_18_12_0":
OS: windows-latest
platform: Windows_NT
name: $(win_pool)
node_version: 18.x
"Linux_Node_18":
node_version: 18.12.0
"Linux_Node_18_12_0":
OS: ubuntu-latest
platform: Linux
name: $(linux_pool)
node_version: 18.x
"MacOS_Node_18":
node_version: 18.12.0
"MacOS_Node_18_12_0":
OS: macOS-latest
platform: Darwin
name: $(mac_pool)
node_version: 18.x
node_version: 18.12.0

"Windows_Node_16":
OS: windows-latest
Expand Down Expand Up @@ -91,29 +91,14 @@ jobs:
platform: Darwin
name: $(mac_pool)
node_version: 12.x

"Windows_Node_12_22":
OS: windows-latest
platform: Windows_NT
name: $(win_pool)
node_version: 12.22.0
"Linux_Node_12_22":
OS: ubuntu-latest
platform: Linux
name: $(linux_pool)
node_version: 12.22.0
"MacOS_Node_12_22":
OS: macOS-latest
platform: Darwin
name: $(mac_pool)
node_version: 12.22.0
maxParallel: 3

pool:
name: $(name)
demands:
- Agent.OS -equals $(platform)

timeoutInMinutes: 120
timeoutInMinutes: 60

workspace:
clean: all
Expand Down
4 changes: 2 additions & 2 deletions common/config/azure-pipelines/jobs/version-bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
- checkout: self

- task: NodeTool@0
displayName: Use Node 12.x
displayName: Use Node 18.x
inputs:
versionSpec: 12.x
versionSpec: 18.x
checkLatest: true

- bash: |
Expand Down
5 changes: 3 additions & 2 deletions common/config/azure-pipelines/templates/core-build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This defines the core steps for building and validating iTwin.js Core

parameters:
- name: nodeVersion # name of the parameter; required
type: string # data type of the parameter; required

- name: workingDir
type: string
default: $(System.DefaultWorkingDirectory)
Expand All @@ -10,8 +13,6 @@ parameters:
- name: buildIos
type: boolean
default: false
- name: nodeVersion
default: ""
- name: currentBranch
default: $(Build.SourceBranch)
- name: targetBranch
Expand Down
Loading

0 comments on commit f17bf71

Please sign in to comment.