From 760ce81453c748e9cb38e8f337630616a7f3a89a Mon Sep 17 00:00:00 2001 From: Stefan Profanter Date: Thu, 26 Sep 2019 10:28:25 +0200 Subject: [PATCH] ci: Better structure azure pipelines into multiple files --- .azure-pipelines/azure-pipelines-win.yml | 96 +++++++++++++++++++++++ azure-pipelines.yml | 99 +----------------------- tools/azure-devops/{ => win}/build.ps1 | 0 tools/azure-devops/{ => win}/install.ps1 | 0 4 files changed, 97 insertions(+), 98 deletions(-) create mode 100644 .azure-pipelines/azure-pipelines-win.yml rename tools/azure-devops/{ => win}/build.ps1 (100%) rename tools/azure-devops/{ => win}/install.ps1 (100%) diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100644 index 000000000..bf71b962d --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,96 @@ +# Docs see here: +# https://aka.ms/yaml + +jobs: +- job: 'win_vs2017' + displayName: 'Windows (VS2017)' + pool: + vmImage: 'vs2017-win2016' + variables: + CC_NAME: Visual Studio 15 2017 + CC_SHORTNAME: VS2017 + GENERATOR: Visual Studio 15 2017 + FORCE_CXX: OFF + vcpkg_cache: C:/vcpkg/installed + steps: + - checkout: self + submodules: recursive + + - task: CacheBeta@0 + inputs: + key: $(Build.SourcesDirectory)/tools/azure-devops/win/install.ps1 + path: $(vcpkg_cache) + displayName: Cache vcpkg + + - powershell: ./tools/azure-devops/win/install.ps1 + displayName: Install Requirements + - powershell: ./tools/azure-devops/win/build.ps1 + displayName: "Build: $(CC_NAME)" + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: open62541-$(CC_SHORTNAME) + # publishing artifacts from PRs from a fork is currently blocked + condition: succeeded() + displayName: "Publish Artifact: open62541-$(CC_SHORTNAME)" + + +- job: 'win_msys64' + displayName: 'Windows (msys64)' + pool: + vmImage: 'windows-latest' + variables: + CC_NAME: MinGW Makefiles + CC_SHORTNAME: mingw + GENERATOR: MinGW Makefiles + FORCE_CXX: OFF + MSYS2_ROOT: C:/msys64 + steps: + - checkout: self + submodules: recursive + + - powershell: ./tools/azure-devops/win/install.ps1 + displayName: Install Requirements + - powershell: ./tools/azure-devops/win/build.ps1 + displayName: "Build: $(CC_NAME)" + errorActionPreference: continue # If set to Stop, we only get a truncated exception message. Error is handled by checking exit code + + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: open62541-$(CC_SHORTNAME) + # publishing artifacts from PRs from a fork is currently blocked + condition: succeeded() + displayName: "Publish Artifact: open62541-$(CC_SHORTNAME)" + + + +- job: 'win_clang' + displayName: 'Windows (clang)' + pool: + vmImage: 'windows-latest' + variables: + CC_NAME: Clang + CC_SHORTNAME: clang-mingw + GENERATOR: MinGW Makefiles + FORCE_CXX: OFF + MSYS2_ROOT: C:/msys64 + steps: + - checkout: self + submodules: recursive + + - powershell: ./tools/azure-devops/win/install.ps1 + displayName: Install Requirements + - powershell: ./tools/azure-devops/win/build.ps1 + displayName: "Build: $(CC_NAME)" + errorActionPreference: continue # If set to Stop, we only get a truncated exception message. Error is handled by checking exit code + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: open62541-$(CC_SHORTNAME) + # publishing artifacts from PRs from a fork is currently blocked + condition: succeeded() + displayName: "Publish Artifact: open62541-$(CC_SHORTNAME)" diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 079f69a7b..79dfc5f53 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,99 +1,2 @@ -# Docs see here: -# https://aka.ms/yaml - - -variables: - vcpkg_cache: C:/vcpkg/installed - jobs: -- job: 'win_vs2017' - displayName: 'Windows (VS2017)' - pool: - vmImage: 'vs2017-win2016' - variables: - CC_NAME: Visual Studio 15 2017 - CC_SHORTNAME: VS2017 - GENERATOR: Visual Studio 15 2017 - FORCE_CXX: OFF - steps: - - checkout: self - submodules: recursive - - - task: CacheBeta@0 - inputs: - key: $(Build.SourcesDirectory)/tools/azure-devops/install.ps1 - path: $(vcpkg_cache) - displayName: Cache vcpkg - - - powershell: ./tools/azure-devops/install.ps1 - displayName: Install Requirements - - powershell: ./tools/azure-devops/build.ps1 - displayName: "Build: $(CC_NAME)" - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: open62541-$(CC_SHORTNAME) - # publishing artifacts from PRs from a fork is currently blocked - condition: succeeded() - displayName: "Publish Artifact: open62541-$(CC_SHORTNAME)" - - -- job: 'win_msys64' - displayName: 'Windows (msys64)' - pool: - vmImage: 'windows-latest' - variables: - CC_NAME: MinGW Makefiles - CC_SHORTNAME: mingw - GENERATOR: MinGW Makefiles - FORCE_CXX: OFF - MSYS2_ROOT: C:/msys64 - steps: - - checkout: self - submodules: recursive - - - powershell: ./tools/azure-devops/install.ps1 - displayName: Install Requirements - - powershell: ./tools/azure-devops/build.ps1 - displayName: "Build: $(CC_NAME)" - errorActionPreference: continue # If set to Stop, we only get a truncated exception message. Error is handled by checking exit code - - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: open62541-$(CC_SHORTNAME) - # publishing artifacts from PRs from a fork is currently blocked - condition: succeeded() - displayName: "Publish Artifact: open62541-$(CC_SHORTNAME)" - - - -- job: 'win_clang' - displayName: 'Windows (clang)' - pool: - vmImage: 'windows-latest' - variables: - CC_NAME: Clang - CC_SHORTNAME: clang-mingw - GENERATOR: MinGW Makefiles - FORCE_CXX: OFF - MSYS2_ROOT: C:/msys64 - steps: - - checkout: self - submodules: recursive - - - powershell: ./tools/azure-devops/install.ps1 - displayName: Install Requirements - - powershell: ./tools/azure-devops/build.ps1 - displayName: "Build: $(CC_NAME)" - errorActionPreference: continue # If set to Stop, we only get a truncated exception message. Error is handled by checking exit code - - - task: PublishBuildArtifacts@1 - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: open62541-$(CC_SHORTNAME) - # publishing artifacts from PRs from a fork is currently blocked - condition: succeeded() - displayName: "Publish Artifact: open62541-$(CC_SHORTNAME)" + - template: ./.azure-pipelines/azure-pipelines-win.yml diff --git a/tools/azure-devops/build.ps1 b/tools/azure-devops/win/build.ps1 similarity index 100% rename from tools/azure-devops/build.ps1 rename to tools/azure-devops/win/build.ps1 diff --git a/tools/azure-devops/install.ps1 b/tools/azure-devops/win/install.ps1 similarity index 100% rename from tools/azure-devops/install.ps1 rename to tools/azure-devops/win/install.ps1