2024-01-15 22:27:42 +03:00
|
|
|
# Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2022-08-16 08:54:58 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
- name: name
|
|
|
|
- name: assignment
|
2022-08-19 14:09:03 +03:00
|
|
|
- name: job_name
|
2023-12-04 12:52:33 +03:00
|
|
|
- name: test_mode
|
2022-08-16 08:54:58 +03:00
|
|
|
|
|
|
|
jobs:
|
2022-08-19 14:09:03 +03:00
|
|
|
- job: ${{parameters.job_name}}
|
2022-08-16 08:54:58 +03:00
|
|
|
dependsOn:
|
|
|
|
- check_for_release
|
2023-09-01 16:15:36 +03:00
|
|
|
timeoutInMinutes: 240
|
2022-08-16 08:54:58 +03:00
|
|
|
pool:
|
|
|
|
name: macOS-pool
|
|
|
|
demands: assignment -equals ${{parameters.assignment}}
|
2024-01-10 14:39:55 +03:00
|
|
|
condition: and(succeeded(),
|
|
|
|
or(eq('${{parameters.name}}', 'macos'),
|
2024-01-12 23:05:47 +03:00
|
|
|
or(eq(variables['Build.SourceBranchName'], 'main'),
|
|
|
|
eq(variables['Build.SourceBranchName'], 'main-2.x'))))
|
2022-08-16 08:54:58 +03:00
|
|
|
variables:
|
|
|
|
- name: release_sha
|
|
|
|
value: $[ dependencies.check_for_release.outputs['out.release_sha'] ]
|
|
|
|
- name: release_tag
|
|
|
|
value: $[ coalesce(dependencies.check_for_release.outputs['out.release_tag'], '0.0.0') ]
|
|
|
|
- name: trigger_sha
|
|
|
|
value: $[ dependencies.check_for_release.outputs['out.trigger_sha'] ]
|
|
|
|
- name: is_release
|
|
|
|
value: $[ dependencies.check_for_release.outputs['out.is_release'] ]
|
|
|
|
- template: job-variables.yml
|
|
|
|
steps:
|
2023-07-06 17:55:39 +03:00
|
|
|
# Do not record start/end times for m1
|
|
|
|
- ${{ if eq(parameters.name, 'macos') }}:
|
|
|
|
- template: report-start.yml
|
2022-08-16 08:54:58 +03:00
|
|
|
- template: clear-shared-segments-macos.yml
|
|
|
|
- checkout: self
|
|
|
|
- bash: |
|
|
|
|
set -euo pipefail
|
|
|
|
git checkout $(release_sha)
|
|
|
|
name: checkout_release
|
|
|
|
condition: and(succeeded(), eq(variables.is_release, 'true'))
|
|
|
|
- template: clean-up.yml
|
2023-07-12 12:31:38 +03:00
|
|
|
- template: build-unix.yml
|
|
|
|
parameters:
|
|
|
|
release_tag: $(release_tag)
|
|
|
|
name: ${{parameters.name}}
|
|
|
|
is_release: variables.is_release
|
2023-12-04 12:52:33 +03:00
|
|
|
test_mode: ${{parameters.test_mode}}
|
2023-07-06 17:55:39 +03:00
|
|
|
# Do not upload metrics for m1
|
|
|
|
- ${{ if eq(parameters.name, 'macos') }}:
|
|
|
|
- template: upload-bazel-metrics.yml
|
2022-08-16 08:54:58 +03:00
|
|
|
- template: tell-slack-failed.yml
|
|
|
|
parameters:
|
|
|
|
trigger_sha: '$(trigger_sha)'
|
2023-07-06 17:55:39 +03:00
|
|
|
# Do not record start/end times for m1
|
|
|
|
- ${{ if eq(parameters.name, 'macos') }}:
|
|
|
|
- template: report-end.yml
|