|
| 1 | +parameters: |
| 2 | +- name: minimal |
| 3 | + type: boolean |
| 4 | + displayName: Build Minimal Font (testing only) |
| 5 | + default: false |
| 6 | + |
| 7 | +resources: |
| 8 | + repositories: |
| 9 | + - repository: 1ESPipelineTemplates |
| 10 | + type: git |
| 11 | + name: 1ESPipelineTemplates/1ESPipelineTemplates |
| 12 | + ref: refs/tags/release |
| 13 | + |
| 14 | +extends: |
| 15 | + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates |
| 16 | + parameters: |
| 17 | + pool: |
| 18 | + name: Azure Pipelines |
| 19 | + image: macOS-13 |
| 20 | + os: macOS |
| 21 | + sdl: |
| 22 | + sourceAnalysisPool: |
| 23 | + name: SHINE-INT-L |
| 24 | + os: windows |
| 25 | + stages: |
| 26 | + - stage: build |
| 27 | + displayName: Build |
| 28 | + jobs: |
| 29 | + - job: build |
| 30 | + displayName: Build and Sign Cascadia |
| 31 | + templateContext: |
| 32 | + outputs: |
| 33 | + - output: pipelineArtifact |
| 34 | + targetPath: $(Build.SourcesDirectory)/out |
| 35 | + artifactName: archive |
| 36 | + steps: |
| 37 | + - task: UsePythonVersion@0 |
| 38 | + displayName: 'Use Python 3.11' |
| 39 | + inputs: |
| 40 | + versionSpec: 3.11 |
| 41 | + |
| 42 | + - task: UseDotNet@2 |
| 43 | + displayName: 'Use .NET sdk 6.x' |
| 44 | + inputs: |
| 45 | + version: 6.x |
| 46 | + |
| 47 | + - bash: |- |
| 48 | + brew install ttfautohint |
| 49 | + pip install pip-tools |
| 50 | + pip-compile -U requirements.in |
| 51 | + pip install -r requirements.txt ufolint |
| 52 | + displayName: 'Install build dependencies' |
| 53 | +
|
| 54 | + - bash: 'ufolint sources/*.ufo' |
| 55 | + displayName: 'Lint sources' |
| 56 | + |
| 57 | + - ${{ if eq(true, parameters.minimal) }}: |
| 58 | + - bash: 'python ./build.py -P -NF -M -I' |
| 59 | + displayName: 'Build font (minimal)' |
| 60 | + |
| 61 | + - ${{ else }}: |
| 62 | + - bash: 'python ./build.py -S -W' |
| 63 | + displayName: 'Build font(s)' |
| 64 | + |
| 65 | + - template: ./pipelines/templates/steps-esrp-signing.yml@self |
| 66 | + parameters: |
| 67 | + displayName: Submit Signing Request |
| 68 | + signingIdentity: |
| 69 | + serviceName: $(SigningServiceName) |
| 70 | + appId: $(SigningAppId) |
| 71 | + tenantId: $(SigningTenantId) |
| 72 | + akvName: $(SigningAKVName) |
| 73 | + authCertName: $(SigningAuthCertName) |
| 74 | + signCertName: $(SigningSignCertName) |
| 75 | + inputs: |
| 76 | + FolderPath: build |
| 77 | + Pattern: '*.ttf,*.otf' |
| 78 | + signConfigType: inlineSignParams |
| 79 | + inlineOperation: | |
| 80 | + [ |
| 81 | + { |
| 82 | + "KeyCode": "CP-230012", |
| 83 | + "OperationCode": "SigntoolSign", |
| 84 | + "Parameters": { |
| 85 | + "OpusName": "Microsoft", |
| 86 | + "OpusInfo": "http://www.microsoft.com", |
| 87 | + "FileDigest": "/fd \"SHA256\"", |
| 88 | + "PageHash": "/NPH", |
| 89 | + "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" |
| 90 | + }, |
| 91 | + "ToolName": "sign", |
| 92 | + "ToolVersion": "1.0" |
| 93 | + }, |
| 94 | + { |
| 95 | + "KeyCode": "CP-230012", |
| 96 | + "OperationCode": "SigntoolVerify", |
| 97 | + "Parameters": {}, |
| 98 | + "ToolName": "sign", |
| 99 | + "ToolVersion": "1.0" |
| 100 | + } |
| 101 | + ] |
| 102 | +
|
| 103 | + - bash: |- |
| 104 | + mkdir -p out |
| 105 | + cd build |
| 106 | + zip -r ../out/CascadiaCode.zip ttf otf woff2 |
| 107 | + displayName: 'Build Final Archive' |
0 commit comments