Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FreeBSD CI build #690

Merged
merged 37 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
830470a
Add FreeBSD CI build
odygrd Feb 26, 2025
74bc69b
Add FreeBSD CI build
odygrd Feb 27, 2025
7ea37d9
Add FreeBSD CI build
odygrd Feb 27, 2025
e6caf49
Add FreeBSD CI build
odygrd Feb 27, 2025
a95838a
Add FreeBSD CI build
odygrd Feb 27, 2025
d405c6c
Add FreeBSD CI build
odygrd Feb 27, 2025
66c32b0
Add FreeBSD CI build
odygrd Feb 27, 2025
d77c0fd
Add FreeBSD CI build
odygrd Feb 27, 2025
59a736b
Add FreeBSD CI build
odygrd Feb 27, 2025
a866bd6
Add FreeBSD CI build
odygrd Feb 27, 2025
75d38f8
Add FreeBSD CI build
odygrd Feb 27, 2025
144cc91
Add FreeBSD CI build
odygrd Feb 27, 2025
6bf3cc7
Add FreeBSD CI build
odygrd Feb 27, 2025
24d9a92
Add FreeBSD CI build
odygrd Feb 27, 2025
2bcd239
Add FreeBSD CI build
odygrd Feb 27, 2025
2c064a6
Add FreeBSD CI build
odygrd Feb 27, 2025
89d0e52
Add FreeBSD CI build
odygrd Feb 27, 2025
8f887fb
Add FreeBSD CI build
odygrd Feb 27, 2025
d97a1d4
Add FreeBSD CI build
odygrd Feb 27, 2025
79cd7fb
Add FreeBSD CI build
odygrd Feb 27, 2025
009901f
Add FreeBSD CI build
odygrd Feb 27, 2025
0a17c67
Add FreeBSD CI build
odygrd Feb 27, 2025
c44d4da
Add FreeBSD CI build
odygrd Feb 27, 2025
9c160ed
Add FreeBSD CI build
odygrd Feb 27, 2025
1dffc9e
Add FreeBSD CI build
odygrd Feb 27, 2025
9eea694
Add FreeBSD CI build
odygrd Feb 27, 2025
01fee98
Add FreeBSD CI build
odygrd Feb 27, 2025
5a0c54e
Fix builds
odygrd Feb 27, 2025
d895778
Fix builds
odygrd Feb 27, 2025
51cb618
Fix builds
odygrd Feb 27, 2025
5dc2cb3
Revert "Fix builds"
odygrd Feb 27, 2025
f019429
Fix builds
odygrd Feb 27, 2025
6c19e82
Fix builds
odygrd Feb 27, 2025
e63438f
Fix builds
odygrd Feb 27, 2025
c92b917
Fix builds
odygrd Feb 27, 2025
d72c792
Fix builds
odygrd Feb 27, 2025
9ce1c40
Update bsd.yml
odygrd Feb 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: BSD

on:
push:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
- 'scripts/**'
pull_request:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
- 'scripts/**'

jobs:
FreeBSD:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [ Release ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: FreeBSD Build and Test (${{ matrix.build_type }})
uses: vmactions/freebsd-vm@v1
with:
release: '14.2'
arch: 'x86_64'
mem: 16384
cpu: 4
usesh: true
prepare: |
pkg install -y cmake
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_STANDARD=17 -DQUILL_VERBOSE_MAKEFILE=ON -DQUILL_BUILD_TESTS=ON -DQUILL_BUILD_EXAMPLES=ON "$GITHUB_WORKSPACE"
cmake --build . --config ${{ matrix.build_type }} --parallel 4
ctest --build-config ${{ matrix.build_type }} --output-on-failure -R "^multi_frontend_threads$"

NetBSD:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [ Release ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: NetBSD Build and Test (${{ matrix.build_type }})
uses: vmactions/netbsd-vm@v1
with:
release: '10.0'
arch: 'x86_64'
mem: 16384
cpu: 4
usesh: true
prepare: |
/usr/sbin/pkg_add cmake
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_STANDARD=17 -DQUILL_VERBOSE_MAKEFILE=ON -DQUILL_BUILD_TESTS=ON -DQUILL_BUILD_EXAMPLES=ON "$GITHUB_WORKSPACE"
cmake --build . --config ${{ matrix.build_type }} --parallel 4
ctest --build-config ${{ matrix.build_type }} --output-on-failure -R "^multi_frontend_threads$"

OpenBSD:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [ Release ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: OpenBSD Build and Test (${{ matrix.build_type }})
uses: vmactions/openbsd-vm@v1
with:
release: '7.5'
arch: 'x86_64'
mem: 16384
cpu: 4
usesh: true
prepare: |
pkg_add cmake
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_STANDARD=17 -DQUILL_VERBOSE_MAKEFILE=ON -DQUILL_BUILD_TESTS=ON -DQUILL_BUILD_EXAMPLES=ON "$GITHUB_WORKSPACE"
cmake --build . --config ${{ matrix.build_type }} --parallel 4
ctest --build-config ${{ matrix.build_type }} --output-on-failure -R "^multi_frontend_threads$"

DragonFlyBSD:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [ Release ]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: DragonFly Build and Test (${{ matrix.build_type }})
uses: vmactions/dragonflybsd-vm@v1
with:
release: '6.4.0'
mem: 16384
cpu: 4
usesh: true
prepare: |
pkg install -y cmake gcc10
run: |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_C_COMPILER=$(which gcc10) -DCMAKE_CXX_COMPILER=$(which g++10) -DCMAKE_CXX_STANDARD=17 -DQUILL_VERBOSE_MAKEFILE=ON -DQUILL_BUILD_TESTS=ON -DQUILL_BUILD_EXAMPLES=ON "$GITHUB_WORKSPACE"
cmake --build . --config ${{ matrix.build_type }} --parallel 4
ctest --build-config ${{ matrix.build_type }} --output-on-failure -R "^multi_frontend_threads$"
3 changes: 2 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: coverage
name: Coverage

on:
push:
Expand All @@ -7,6 +7,7 @@ on:
paths-ignore:
- '**.md'
- 'docs/**'
- 'scripts/**'

jobs:
build:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: macos
name: macOS

on:
push:
Expand All @@ -7,13 +7,15 @@ on:
paths-ignore:
- '**.md'
- 'docs/**'
- 'scripts/**'

pull_request:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
- 'scripts/**'

jobs:
build:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/linux.yml → .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: linux
name: Ubuntu

on:
push:
Expand All @@ -7,13 +7,15 @@ on:
paths-ignore:
- '**.md'
- 'docs/**'
- 'scripts/**'

pull_request:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
- 'scripts/**'

jobs:
build:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

name: windows
name: Windows

on:
push:
Expand All @@ -8,13 +7,15 @@ on:
paths-ignore:
- '**.md'
- 'docs/**'
- 'scripts/**'

pull_request:
branches:
- master
paths-ignore:
- '**.md'
- 'docs/**'
- 'scripts/**'

jobs:
msvc:
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ set(HEADER_FILES

include/quill/core/Attributes.h
include/quill/core/BoundedSPSCQueue.h
include/quill/core/ChronoTimeUtils.h
include/quill/core/Common.h
include/quill/core/DynamicFormatArgStore.h
include/quill/core/Codec.h
Expand Down
53 changes: 38 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
<div align="center">
<!--
<meta name="description" content="C++ logging library. High-performance, asynchronous logging for low-latency real-time applications.">
<meta name="keywords" content="C++, logging library, asynchronous logging, high performance, low latency">
-->

<br>
<img src="docs/logo.png" alt="logo" width="200" height="auto" />
<img src="docs/logo.png" alt="Quill C++ Logging Library" width="200" height="auto" />
<h1>Quill</h1>

<p><b>Asynchronous Low Latency C++ Logging Library</b></p>

<div>
<a href="https://github.com/odygrd/quill/actions?query=workflow%3Alinux">
<img src="https://img.shields.io/github/actions/workflow/status/odygrd/quill/linux.yml?branch=master&label=linux&logo=linux&style=flat-square" alt="linux-ci" />
<a href="https://github.com/odygrd/quill/actions?query=workflow%3Aubuntu">
<img src="https://img.shields.io/github/actions/workflow/status/odygrd/quill/ubuntu.yml?branch=master&label=Linux&style=flat-square&logo=linux" alt="linux-ci" />
</a>
<a href="https://github.com/odygrd/quill/actions?query=workflow%3Absd">
<img src="https://img.shields.io/github/actions/workflow/status/odygrd/quill/bsd.yml?branch=master&label=BSD&style=flat-square&logo=openbsd" alt="bsd-ci" />
</a>
<a href="https://github.com/odygrd/quill/actions?query=workflow%3Amacos">
<img src="https://img.shields.io/github/actions/workflow/status/odygrd/quill/macos.yml?branch=master&label=macos&logo=apple&logoColor=white&style=flat-square" alt="macos-ci" />
<img src="https://img.shields.io/github/actions/workflow/status/odygrd/quill/macos.yml?branch=master&label=macOS&logoColor=white&style=flat-square&logo=apple" alt="macos-ci" />
</a>
<a href="https://github.com/odygrd/quill/actions?query=workflow%3Awindows">
<img src="https://img.shields.io/github/actions/workflow/status/odygrd/quill/windows.yml?branch=master&label=windows&logo=windows&logoColor=blue&style=flat-square" alt="windows-ci" />
<img src="https://img.shields.io/github/actions/workflow/status/odygrd/quill/windows.yml?branch=master&label=Windows&logoColor=blue&style=flat-square&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iODgiIHdpZHRoPSI4OCIgeG1sbnM6dj0iaHR0cHM6Ly92ZWN0YS5pby9uYW5vIj48cGF0aCBkPSJNMCAxMi40MDJsMzUuNjg3LTQuODYuMDE2IDM0LjQyMy0zNS42Ny4yMDN6bTM1LjY3IDMzLjUyOWwuMDI4IDM0LjQ1M0wuMDI4IDc1LjQ4LjAyNiA0NS43em00LjMyNi0zOS4wMjVMODcuMzE0IDB2NDEuNTI3bC00Ny4zMTguMzc2em00Ny4zMjkgMzkuMzQ5bC0uMDExIDQxLjM0LTQ3LjMxOC02LjY3OC0uMDY2LTM0LjczOXoiIGZpbGw9IiMwMGFkZWYiLz48L3N2Zz4=" alt="windows-ci" />
</a>
</div>

Expand All @@ -26,7 +33,7 @@
</a>
<a href="https://www.codefactor.io/repository/github/odygrd/quill">
<img src="https://img.shields.io/codefactor/grade/github/odygrd/quill?logo=codefactor&style=flat-square" alt="CodeFactor" />
</a>
</a>
</div>

<div>
Expand All @@ -38,20 +45,21 @@
</a>
</div>

<h4>
<h4>
<a href="https://quillcpp.readthedocs.io" title="Explore the full documentation">📚 Documentation</a>
<span> · </span>
<span> · </span>
<a href="https://quillcpp.readthedocs.io/en/latest/cheat_sheet.html" title="Quick reference for common tasks">⚡ Cheat Sheet</a>
<span> · </span>
<span> · </span>
<a href="https://github.com/odygrd/quill/issues/new?assignees=&labels=&projects=&template=bug-report.md&title=" title="Report a bug or issue">🐛 Report Bug</a>
<span> · </span>
<span> · </span>
<a href="https://github.com/odygrd/quill/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=">💡 Request Feature</a>
</h4>

<div align="center"><img src="docs/quill_demo.gif" width="75%" ></div>

<div align="center"><img src="docs/quill_demo.gif" alt="Logging Demo" width="75%" /></div>
</div>

---

## 🧭 Table of Contents

- [Introduction](#-introduction)
Expand All @@ -63,10 +71,11 @@
- [Caveats](#-caveats)
- [License](#-license)

---

## ✨ Introduction

Quill is a high-performance asynchronous logging library. It is particularly suited for performance-critical
applications where every microsecond counts.
**Quill** is a **high-performance asynchronous logging library** written in **C++**. It is designed for low-latency, performance-critical applications where every microsecond counts.

- **Performance-Focused**: Quill consistently outperforms many popular logging libraries.
- **Feature-Rich**: Packed with advanced features to meet diverse logging needs.
Expand All @@ -76,6 +85,8 @@ applications where every microsecond counts.

Try it on [Compiler Explorer](https://godbolt.org/z/szncr8c8d)

---

## ⏩ Quick Start

Getting started is easy and straightforward. Follow these steps to integrate the library into your project:
Expand Down Expand Up @@ -118,6 +129,8 @@ int main()
}
```

---

## 🎯 Features

- **High-Performance**: Ultra-low latency performance. View [Benchmarks](http://github.com/odygrd/quill#performance)
Expand Down Expand Up @@ -147,6 +160,8 @@ int main()
- **Clean Codebase**: Maintained to high standards, warning-free even at strict levels.
- **Type-Safe API**: Built on [{fmt}](http://github.com/fmtlib/fmt) library.

---

## 🚀 Performance

### System Configuration
Expand Down Expand Up @@ -374,6 +389,8 @@ If Quill were not available, MS BinLog would be a strong alternative. It deliver
generates smaller binary log files. However, the binary logs necessitate offline processing with additional tools, which
can be less convenient.

---

## 🧩 Usage

Also, see the [Quick Start Guide](https://quillcpp.readthedocs.io/en/latest/quick_start.html) for a brief introduction.
Expand Down Expand Up @@ -563,6 +580,8 @@ For manual setup, add Quill to your `BUILD.bazel` file like this:
cc_binary(name = "app", srcs = ["main.cpp"], deps = ["//quill_path:quill"])
```

---

## 📐 Design

### Frontend (caller-thread)
Expand All @@ -588,6 +607,8 @@ Subsequently, forwards the log message to all Sinks associated with the Logger.

![design.jpg](docs%2Fdesign.jpg)

---

## 🚨 Caveats

Quill may not work well with `fork()` since it spawns a background thread and `fork()` doesn't work well with
Expand Down Expand Up @@ -638,6 +659,8 @@ int main()
}
```

---

## 📝 License

Quill is licensed under the [MIT License](http://opensource.org/licenses/MIT)
Expand Down
5 changes: 2 additions & 3 deletions include/quill/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "quill/UserClockSource.h"
#include "quill/core/Attributes.h"
#include "quill/core/ChronoTimeUtils.h"
#include "quill/core/Codec.h"
#include "quill/core/Common.h"
#include "quill/core/FrontendOptions.h"
Expand Down Expand Up @@ -108,9 +109,7 @@ class LoggerImpl : public detail::LoggerBase
}
else if (clock_source == ClockSourceType::System)
{
current_timestamp = static_cast<uint64_t>(std::chrono::duration_cast<std::chrono::nanoseconds>(
std::chrono::system_clock::now().time_since_epoch())
.count());
current_timestamp = detail::get_timestamp_ns<std::chrono::system_clock>();
}
else
{
Expand Down
Loading