Skip to content

Commit

Permalink
CI: rework jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Olivier <[email protected]>
  • Loading branch information
martin-olivier committed Jan 9, 2025
1 parent 43d245e commit 1c19f43
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,20 @@ defaults:
shell: bash

jobs:
unit_tests:
unit_tests_windows:
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
cxx-std: [11, 14, 17, 20]
include:
- os: windows-latest
compiler: MSVC
generator: Visual Studio 17
- os: macos-latest
compiler: clang
generator: Unix Makefiles
- os: ubuntu-latest
compiler: gcc
generator: Unix Makefiles

name: ${{ matrix.os }} (C++${{ matrix.cxx-std }} - ${{ matrix.compiler }})
runs-on: ${{ matrix.os }}

name: windows / C++${{ matrix.cxx-std }} / MSVC
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Generate project files
run: cmake . -B build -G "${{ matrix.generator }}" -DCMAKE_CXX_STANDARD=${{ matrix.cxx-std }} -DDYLIB_BUILD_TESTS=ON -DDYLIB_WARNING_AS_ERRORS=ON
run: cmake . -B build -DCMAKE_CXX_STANDARD=${{ matrix.cxx-std }} -DDYLIB_BUILD_TESTS=ON -DDYLIB_WARNING_AS_ERRORS=ON

- name: Build dynamic library and unit tests
run: cmake --build build
Expand All @@ -55,16 +44,6 @@ jobs:
working-directory: build
run: ctest --verbose

- name: Generate code coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.cxx-std == 20 }}
run: gcov -abcfu build/CMakeFiles/unit_tests.dir/tests/tests.cpp.gcda

- name: Send coverage to codecov.io
if: ${{ matrix.os == 'ubuntu-latest' && matrix.cxx-std == 20 }}
uses: codecov/codecov-action@v3
with:
files: dylib.hpp.gcov

unit_tests_msys2:
defaults:
run:
Expand All @@ -75,7 +54,7 @@ jobs:
sys: [mingw32, mingw64, ucrt64, clang64]
cxx-std: [11, 14, 17, 20]

name: windows-latest (C++${{ matrix.cxx-std }} - ${{matrix.sys}})
name: windows / C++${{ matrix.cxx-std }} / ${{matrix.sys}})
runs-on: windows-latest

steps:
Expand Down Expand Up @@ -111,7 +90,7 @@ jobs:
docker_arch: i386

name: linux ${{ matrix.arch }} ${{ matrix.action }} / C++${{ matrix.cxx-std }} / gcc)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container:
image: ${{ matrix.docker_arch }}/debian:latest
options: --user root
Expand Down

0 comments on commit 1c19f43

Please sign in to comment.