Skip to content

Commit

Permalink
Added Ubuntu CI (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
c4v4 authored Apr 26, 2024
1 parent 76e9512 commit 473d689
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
- name: Install lcov
if: matrix.cpp_compiler == 'g++'
run: sudo apt-get install lcov

- name: Make coverage directory
if: matrix.cpp_compiler == 'g++'
run: mkdir -p ${{ github.workspace }}/coverage

- name: Build coverage report
if: matrix.cpp_compiler == 'g++'
Expand All @@ -54,8 +58,8 @@ jobs:
- uses: actions/upload-artifact@v4
if: matrix.cpp_compiler == 'g++'
with:
name: coverage
path: ${{ github.workspace }}/coverage/tests_*_cov.info
name: coverage_${{ matrix.build_type }}_${{ matrix.cpp_compiler }}
path: ${{ github.workspace }}/coverage/tests_${{ matrix.build_type }}_cov.info


Coverage:
Expand All @@ -64,19 +68,24 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4

- name: Make coverage directory
run: mkdir -p ${{ github.workspace }}/coverage

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: coverage
pattern: coverage_*
merge-multiple: true
path: ${{ github.workspace }}/coverage

- name: Install lcov
run: sudo apt-get install lcov

- name: Merge Release and Debug reports
run: lcov -a ${{ github.workspace }}/coverage/tests_release_cov.info -a ${{ github.workspace }}/coverage/tests_debug_cov.info -o ${{ github.workspace }}/coverage/tests_cov.info
run: lcov -a ${{ github.workspace }}/coverage/tests_Release_cov.info -a ${{ github.workspace }}/coverage/tests_Debug_cov.info -o ${{ github.workspace }}/coverage/tests_cov.info

- name: Only select CFT library files
- name: Only select YASL library files
run: lcov -e ${{ github.workspace }}/coverage/tests_cov.info yasl/include/*/ -o ${{ github.workspace }}/coverage/tests_cov.info

- name: Upload coverage reports to Codecov
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ SPDX-License-Identifier: MIT

# Yet Another Sorting Library
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Ubuntu CI](https://github.com/c4v4/yasl/actions/workflows/c-cpp.yml/badge.svg?branch=main)](https://github.com/c4v4/yasl/actions/workflows/c-cpp.yml)
[![codecov](https://codecov.io/gh/c4v4/yasl/graph/badge.svg?token=AYB5IHFSCD)](https://codecov.io/gh/c4v4/yasl)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/f82fe574441d4c26b7ed304ad519ed2a)](https://app.codacy.com/gh/c4v4/yasl/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![REUSE status](https://api.reuse.software/badge/github.com/c4v4/yasl)](https://api.reuse.software/info/github.com/c4v4/yasl)

**!!! THIS REPO IS WORK IN PROGRESS !!!**

A repo where I fool around with different sorting algorithms.
I wanted to see if I could find an algorithm faster than `std::sort` when I can make some extra assumptions.
Expand Down
4 changes: 2 additions & 2 deletions include/radix_sort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static void radix_sort_msd(C1& cont,
C2& buff,
K key = {},
uint8_t b = sizeof(sort::key_t<C1, K>) - 1) {
constexpr uint8_t n_bytes = sizeof(sort::key_t<C1, K>);
assert(b < sizeof(sort::key_t<C1, K>));
assert(cav::size(cont) <= cav::size(buff));
auto buff_span = make_span(std::begin(buff), cav::size(cont));

Expand Down Expand Up @@ -141,7 +141,7 @@ static void radix_sort_msd(C1& cont,
}
assert(ssrng.beg < ssrng.end);

if (b - 1 == 0){
if (b - 1 == 0) {
assert_sorted(sub_cont, key);
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion include/sort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct Sorter {
SorterData& operator=(SorterData const&) = delete;
SorterData& operator=(SorterData&&) noexcept = default;

SorterData(alloc_type const& alc)
explicit SorterData(alloc_type const& alc)
: alloc_type(alc) {
}

Expand Down

0 comments on commit 473d689

Please sign in to comment.