From 5b980e6e96fa7484c5f521f3656ae981ecd3e584 Mon Sep 17 00:00:00 2001 From: Rainer Schuetze Date: Fri, 20 Sep 2019 17:36:50 +0200 Subject: [PATCH 1/4] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..5352857707 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,23 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +jobs: + - job: Windows + timeoutInMinutes: 120 + pool: + vmImage: 'vs2017-win2016' + variables: + VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\ + HOST_DMD_VERSION: 2.084.1 + strategy: + matrix: + x64: + OS: Win_64 + MODEL: 64 + ARCH: x64 + D_COMPILER: dmd + steps: + - script: git clone --branch %BUILD_SOURCEBRANCHNAME% https://github.com/dlang/dmd.git ../dmd --quiet + - template: ../dmd/.azure-pipelines/windows.yml From 44d67ac131bcad61e40e4ed5185519f0df6eb857 Mon Sep 17 00:00:00 2001 From: Rainer Schuetze Date: Fri, 20 Sep 2019 17:54:53 +0200 Subject: [PATCH 2/4] test azure --- azure-pipelines.yml | 69 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5352857707..a417ddebe0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,6 +3,9 @@ # Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml +variables: + DMD_BRANCH: master + jobs: - job: Windows timeoutInMinutes: 120 @@ -19,5 +22,67 @@ jobs: ARCH: x64 D_COMPILER: dmd steps: - - script: git clone --branch %BUILD_SOURCEBRANCHNAME% https://github.com/dlang/dmd.git ../dmd --quiet - - template: ../dmd/.azure-pipelines/windows.yml + - script: git clone --branch $(DMD_BRANCH) https://github.com/dlang/dmd.git ../dmd + - script: | + call "%VSINSTALLDIR%\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% + cd ../dmd && sh --login .azure-pipelines/windows.sh + displayName: Build DMD + + - job: Windows_OMF + timeoutInMinutes: 120 + pool: + vmImage: 'vs2017-win2016' + variables: + VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\ + HOST_DMD_VERSION: LATEST + strategy: + matrix: + x64: + OS: Win_32 + MODEL: 32 + ARCH: x86 + D_COMPILER: dmd + steps: + - script: git clone --branch $(DMD_BRANCH) https://github.com/dlang/dmd.git ../dmd + - script: cd ../dmd && sh --login .azure-pipelines/windows.sh + + - job: Windows_VisualD + timeoutInMinutes: 120 + pool: + vmImage: 'vs2017-win2016' + variables: + VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\ + strategy: + matrix: + win32-ldc: + OS: Win_32 + MODEL: 32 + ARCH: x86 + D_COMPILER: ldc + VISUALD_VER: v0.49.0 + LDC_VERSION: 1.14.0 + steps: + - script: git clone --branch $(DMD_BRANCH) https://github.com/dlang/dmd.git ../dmd + - script: cd ../dmd && sh --login .azure-pipelines/windows-visual-studio.sh + - script: cd ../dmd && call .azure-pipelines/windows-msbuild.bat + + - job: Windows_VisualD_Debug + timeoutInMinutes: 120 + pool: + vmImage: 'vs2017-win2016' + variables: + VSINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\ + HOST_DMD_VERSION: 2.086.1 + strategy: + matrix: + x64-debug-dmd: + OS: Win_64 + MODEL: 64 + ARCH: x64 + CONFIGURATION: Debug + D_COMPILER: dmd + VISUALD_VER: v0.49.0 + steps: + - script: git clone --branch $(DMD_BRANCH) https://github.com/dlang/dmd.git ../dmd + - script: cd ../dmd && sh --login .azure-pipelines/windows-visual-studio.sh + - script: cd ../dmd && call .azure-pipelines/windows-msbuild.bat From 54d793b0763e01df57d98ac3df35a090d170368c Mon Sep 17 00:00:00 2001 From: Rainer Schuetze Date: Sat, 21 Sep 2019 18:01:45 +0200 Subject: [PATCH 3/4] azure: support stable by evaluating source branch variables --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a417ddebe0..8affee1bbe 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,7 +4,7 @@ # https://aka.ms/yaml variables: - DMD_BRANCH: master + DMD_BRANCH: $[ coalesce(variables['System.PullRequest.TargetBranch'], variables['Build.SourceBranchName'], 'master') ] jobs: - job: Windows From 4645168bdd88ef1f7070c87bb41d1b5b719c6745 Mon Sep 17 00:00:00 2001 From: Rainer Schuetze Date: Sat, 21 Sep 2019 18:24:07 +0200 Subject: [PATCH 4/4] use \ instead of / --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8affee1bbe..51dcdefdd7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -64,7 +64,7 @@ jobs: steps: - script: git clone --branch $(DMD_BRANCH) https://github.com/dlang/dmd.git ../dmd - script: cd ../dmd && sh --login .azure-pipelines/windows-visual-studio.sh - - script: cd ../dmd && call .azure-pipelines/windows-msbuild.bat + - script: cd ../dmd && call .azure-pipelines\windows-msbuild.bat - job: Windows_VisualD_Debug timeoutInMinutes: 120 @@ -85,4 +85,4 @@ jobs: steps: - script: git clone --branch $(DMD_BRANCH) https://github.com/dlang/dmd.git ../dmd - script: cd ../dmd && sh --login .azure-pipelines/windows-visual-studio.sh - - script: cd ../dmd && call .azure-pipelines/windows-msbuild.bat + - script: cd ../dmd && call .azure-pipelines\windows-msbuild.bat