Skip to content

Commit

Permalink
Use Azure Pipelines for building
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed May 4, 2020
1 parent 4a24d0b commit f9c0464
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 99 deletions.
41 changes: 0 additions & 41 deletions .appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
url = https://chromium.googlesource.com/chromium/src/third_party/tcmalloc/chromium
[submodule "base"]
path = base
url = https://chromium.googlesource.com/chromium/src/base
url = https://github.com/yue/base
[submodule "third_party/ced/src"]
path = third_party/ced/src
url = https://github.com/google/compact_enc_det.git
Expand Down
55 changes: 0 additions & 55 deletions .travis.yml

This file was deleted.

45 changes: 45 additions & 0 deletions azure-pipelines-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: 12.x

- task: UsePythonVersion@0
inputs:
versionSpec: '2.7'
architecture: 'x64'

- bash: |
node scripts/bootstrap.js --target-cpu=$TARGET_CPU
node scripts/build.js out/Release
displayName: Build

- script: node scripts/create_dist.js
displayName: Create distribution

- script: node scripts/test.js
displayName: Run tests

- bash: |
BRANCH=$(Build.SourceBranch)
TAG=${BRANCH:10}
echo "##vso[task.setvariable variable=Name;isOutput=true]$TAG"
displayName: Get Tag Name
name: Tag
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')

- task: GithubRelease@0
displayName: Create GitHub Release
condition: startsWith(variables['Tag.Name'], 'v')
inputs:
gitHubConnection: GitHub Yue
repositoryName: yue/build-gn
action: Edit
tagSource: auto
tag: $(Tag.Name)
title: GN $(Tag.name)
releaseNotesSource: input
releaseNotes: (placeholder)
assets: 'out/Release/*.zip'
assetUploadMode: replace
isDraft: true
addChangelog: false
38 changes: 38 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
trigger:
- refs/heads/*
- refs/pull/*/merge
- refs/tags/*

jobs:
- job: windows_build
displayName: 'Build for Windows'
pool:
vmImage: 'VS2017-Win2016'
strategy:
matrix:
x64:
TARGET_CPU: x64
steps:
- template: azure-pipelines-template.yml

- job: macos_build
displayName: 'Build for macOS'
pool:
vmImage: 'macOS-10.14'
strategy:
matrix:
x64:
TARGET_CPU: x64
steps:
- template: azure-pipelines-template.yml

- job: linux_build
displayName: 'Build for Linux'
pool:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
x64:
TARGET_CPU: x64
steps:
- template: azure-pipelines-template.yml
2 changes: 1 addition & 1 deletion scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function runTests(error) {

function runEachTest(project, projectPath) {
console.log(`Generating ninja bulid for project "${project}"...`)
const outdir = path.join(tmppath, project, 'out')
const outdir = path.resolve('out', 'Test')
const gn = path.join(tmppath, 'gn', 'gn')
execSync(`${gn} gen ${outdir}`, {cwd: projectPath})

Expand Down

0 comments on commit f9c0464

Please sign in to comment.