Skip to content

Commit

Permalink
[WIP] [azure-pipelines] Ci on Win-GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
Raffaello committed May 10, 2020
1 parent ae98ca0 commit 920c1cc
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
4 changes: 4 additions & 0 deletions azure-pipelines/templates/sonarcloud-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ jobs:
parameters:
vcpkg_key_cache: ${{ parameters.vcpkg_key_cache }}
triplet: ${{ parameters.triplet }}

- task: Cache@2
inputs:
key: '"${{ parameters.sonar_wrapper_url }}" | "$(Agent.OS)"'
Expand All @@ -102,13 +103,15 @@ jobs:
unzip build-wrapper.zip
displayName: build-wrapper
condition: ne(variables.CACHED_BUILD_WRAPPER, 'true')
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'sonarCloud'
organization: 'raffaello-github'
scannerMode: 'CLI'
configMode: 'file'
displayName: Prepare sonarCloud

- template: 'cmake-gen-build-steps.yml'
parameters:
build_type: ${{ parameters.build_type }}
Expand All @@ -117,6 +120,7 @@ jobs:
cmake_ignore_path: ${{ parameters.cmake_ignore_path }}
arch: ${{ parameters.arch }}
build_wrapper: "${{ parameters.build_wrapper }} --out-dir bw-output"

- task: SonarCloudAnalyze@1
- task: SonarCloudPublish@1
inputs:
Expand Down
66 changes: 66 additions & 0 deletions azure-pipelines/win-gcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
trigger:
branches:
include:
- master
paths:
exclude:
#- .gitignore
- .github/*
- README.md
- appveyor.yml
tags:
include:
- '*'

pr:
branches:
include:
- master
paths:
exclude:
#- .gitignore
- .github/*
- README.md
- appveyor.yml
- LICENSE

variables:
- template: variables/global.yml
- template: variables/images.yml
- template: variables/build_switches.yml

stages:
- stage: Dep
jobs:
- job: vcpkg
strategy:
matrix:
Win Mingw64:
imageName: ${{ variables.windows_image }}
TRIPLET: x64-mingw
ARCH: 64
pool:
vmImage: $(imageName)
steps:
- template: templates/dep-vcpkg-steps.yml
parameters:
vcpkg_key_cache: $(CACHE_VCPKG_KEY)
triplet: $(TRIPLET)
arch: $(ARCH)

- stage: mingw
jobs:
- template: 'templates/sonarcloud-job.yml'
parameters:
imageName: ${{ variables.windows_image }}
jobName: SonarCloud_win_gcc
jobDisplayName: SonarCloud (WIN GCC)
vcpkg_key_cache: $(CACHE_VCPKG_KEY)
triplet: x64-mingw
arch: 64
build_type: Debug
sonar_wrapper_url: 'https://sonarcloud.io/static/cpp/build-wrapper-win-x86.zip'
build_wrapper: 'build-wrapper-win-x86\build-wrapper-win-x86-64.exe'
build_wrapper_path: build/build-wrapper-win-x86
cmake_ignore_path: $(CMAKE_IGNORE_PATH_WIN)

0 comments on commit 920c1cc

Please sign in to comment.