chore: onboard onto unified pipeline (#13)

* chore: update CI version

* chore: onboard onto unified pipeline

* fix: use GitHub workflow for CI tests

* chore: update .npmignore

* chore: update CI

* chore: add more flags for Binskim

* chore: trim trailing whitespace

* Apply PR feedback

* Remove .github directory from .npmignore

* fix: use SpectreMitigation attribute
This commit is contained in:
Raymond Zhao 2023-03-06 09:00:43 -08:00 коммит произвёл GitHub
Родитель ce26e8f533
Коммит 992725790b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 106 добавлений и 40 удалений

Просмотреть файл

@ -1,2 +1,3 @@
test test
build build
pipelines

Просмотреть файл

@ -1,26 +0,0 @@
trigger:
branches:
include: ['*']
tags:
include: ['*']
pool:
vmImage: windows-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@3
displayName: 'Use Yarn 1.x'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2
displayName: 'Install dependencies'
- task: Npm@1
displayName: 'Publish to NPM'
inputs:
command: publish
verbose: false
publishEndpoint: 'NPM joaomoreno.ms'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))

Просмотреть файл

@ -9,11 +9,16 @@
"include_dirs" : [ "include_dirs" : [
"<!(node -e \"require('nan')\")" "<!(node -e \"require('nan')\")"
], ],
'msvs_configuration_attributes': {
'SpectreMitigation': 'Spectre'
},
'msvs_settings': { 'msvs_settings': {
'VCCLCompilerTool': { 'VCCLCompilerTool': {
'AdditionalOptions': [ 'AdditionalOptions': [
'/Qspectre', '/guard:cf',
'/guard:cf' '/ZH:SHA_256',
'/we4244',
'/we4267'
] ]
}, },
'VCLinkerTool': { 'VCLinkerTool': {

20
pipelines/main.yml Normal file
Просмотреть файл

@ -0,0 +1,20 @@
stages:
- stage: Windows
pool:
vmImage: windows-latest
jobs:
- job: win_x64
variables:
VSCODE_ARCH: x64
steps:
- template: templates/windows.yml
- job: win_ia32
variables:
VSCODE_ARCH: ia32
steps:
- template: templates/windows.yml
trigger:
branches:
include:
- main

47
pipelines/publish.yml Normal file
Просмотреть файл

@ -0,0 +1,47 @@
name: $(Date:yyyyMMdd)$(Rev:.r)
trigger:
branches:
include:
- main
pr: none
resources:
repositories:
- repository: templates
type: github
name: microsoft/vscode-engineering
ref: main
endpoint: Monaco
parameters:
- name: publishPackage
displayName: 🚀 Publish windows-mutex
type: boolean
default: false
extends:
template: azure-pipelines/npm-package/pipeline.yml@templates
parameters:
npmPackages:
- name: windows-mutex
buildSteps:
- script: yarn --frozen-lockfile
displayName: Install dependencies
# the rest of the build steps are part of the 'prepack' script, automatically run when the pipeline invokes 'yarn pack'
testPlatforms:
- name: Windows
nodeVersions:
- 16.x
testSteps:
- script: yarn --frozen-lockfile
displayName: Install dependencies
- script: yarn test
displayName: Compile & test npm package
publishPackage: ${{ parameters.publishPackage }}

Просмотреть файл

@ -0,0 +1,19 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: '16.x'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
addToPath: true
- powershell: |
$env:npm_config_arch="$(VSCODE_ARCH)"
yarn install --frozen-lockfile
displayName: Install Dependencies
- powershell: |
yarn test
displayName: Run Tests
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'))