From a9e70ff92e72bdb543d935083c47db811bbf2da5 Mon Sep 17 00:00:00 2001
From: Daniel Chappuis <chappuis.daniel@gmail.com>
Date: Wed, 4 Aug 2021 16:14:19 +0200
Subject: [PATCH] Working on Github Actions

---
 .github/workflows/build-and-test.yml | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index 6f0470fb..1d83aad4 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -164,15 +164,22 @@ jobs:
         shell: bash
         run: cmake --build build/ --config ${{ matrix.config.build_type }}
 
-      - name: Install
+      - name: Install Library on Linux/MacOS
+        if: !(startsWith(matrix.config.os, 'windows'))
         shell: bash
         run: sudo cmake --install build/ 
 
+      - name: Install Library on Windows
+        if: startsWith(matrix.config.os, 'windows')
+        shell: bash
+        run: cmake --install build/ 
+
       - name: Unit Tests
         shell: bash
         run: ./build/test/tests
         
       - name: Build and Run Hello World
+        if: !(${{ matrix.config.coverage }})
         shell: bash
         env:
           CC: ${{ matrix.config.cc }}
@@ -190,7 +197,7 @@ jobs:
           ./build_hello_world/helloworld
 
       - name: Upload coverage to Codecov
-        if: startsWith(matrix.config.name, 'Code Coverage')
+        if: ${{ matrix.config.coverage }}
         uses: codecov/codecov-action@v2
         with:
           path_to_write_report: ./coverage/codecov_report.txt