Skip to content

Commit

Permalink
[auzre-pipelines] linux build matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raffaello committed May 12, 2020
1 parent c78af53 commit 77408bd
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 3 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,33 @@
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Raffaello_sdl2-vga-terminal&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=Raffaello_sdl2-vga-terminal)


## Azure Pipelines

there are 4 pipelines, 1 for each OS and one dedicated to "Analysis".

- the CI pipelines related to each os are building multiple time based on the below matrix.
The result of the tests are publish in Azure Devops as well through `ctest -T Test` flag.
- the Analysis pipeline is analyzing the code, generating coverage and publish to codecov and SonarCloud


The build is reflecting this matrix:

| FLAGS\OS | Windows | Linux | macos |
|:--------------------:|:------------------:|:------------------:|:------------------:|
| Debug | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Release | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| BUILD_SHARED_LIBS | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| WITH_SDL2_STATIC | :heavy_check_mark: | only | only |
| BUILD_TESTING | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| BUILD_EXAMPLES | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| BUILD_SNAPSHOT | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| TEST_DUMP_SNAPSHOT | :no_entry: | :no_entry: | :no_entry: |
| ENABLE_CODE_COVERAGE | :no_entry_sign: | :no_entry_sign: | :heavy_check_mark: |

- code coverage available only with LLVM and GCC in `cmake`, on CI working only on macos
- `TEST_DUMP_SNAPSHOT` is "forbidden" to test for the build as an helper flag only.


## Synopsis

It is just a VGA font terminal using SDL2.
Expand Down
45 changes: 42 additions & 3 deletions azure-pipelines/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ variables:
- template: variables/images.yml
- template: variables/build_switches.yml

parameters:
configuration: ['Debug', 'Release']
sdl2_static: ['ON', 'OFF']
build_testing: ['ON', 'OFF']
build_shared_libs: ['ON', 'OFF']
build_examples: ['ON', 'OFF']
build_snapshot: ['ON', 'OFF']



stages:
- stage: Dep
jobs:
Expand All @@ -43,12 +53,13 @@ stages:

- stage: CI
jobs:
- job: Linux
- job: linux
displayName: Linux GCC
strategy:
matrix:
GCC Debug:
Debug:
CONFIGURATION: Debug
GCC Release:
Release:
CONFIGURATION: Release
pool:
vmImage: ${{ variables.linux_image }}
Expand All @@ -60,3 +71,31 @@ stages:
build_type: $(CONFIGURATION)
test: false
install: false
- job: build_matrix
displayName: Build Matrix
strategy:
matrix:
${{ each configuration in parameters.configuration }}:
${{ each sdl2_static in parameters.sdl2_static}}:
${{ each build_testing in parameters.build_testing }}:
${{ each build_shared_libs in parameters.build_shared_libs }}:
${{ each build_examples in parameters.build_examples }}:
${{ each build_snapshot in parameters.build_snapshot}}:
CONFIGURATION: ${{ configuration }}
SDL2_STATIC: ${{ sdl2_static }}
BUILD_TESTING: ${{ build_testing }}
BUILD_SHARED_LIBS: ${{ build_shared_libs }}
BUILD_EXAMPLES: ${{ build_examples }}
BUILD_SNAPSHOT: ${{ build_snapshot }}
pool:
vmImage: ${{ variables.linux_image }}
steps:
- template: 'templates/ci-steps.yml'
parameters:
vcpkg_key_cache: $(CACHE_VCPKG_KEY)
triplet: x64-linux
build_type: $(CONFIGURATION)
test: false
install: false
package: false

0 comments on commit 77408bd

Please sign in to comment.