Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Golden output is byte-for-byte UTF-8/LF on every platform.
tests/fixtures/logging-format.txt text eol=lf
91 changes: 89 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,35 @@ jobs:

- name: Install
if: matrix.kind != 'msvc'
run: cmake --install cmake-build-ci --prefix cmake-build-ci/install
run: |
cmake -S . -B cmake-build-install -G Ninja -DBUILD_DOCS=OFF -DBUILD_TESTS=OFF \
-DLIZARDBYTE_COMMON_INSTALL=ON -DCMAKE_BUILD_TYPE=Release
cmake --build cmake-build-install --parallel 2
cmake --install cmake-build-install --prefix cmake-build-install/install

- name: Install MSVC
if: matrix.kind == 'msvc'
run: cmake --install cmake-build-ci --config Debug --prefix cmake-build-ci/install
run: |
cmake -S . -B cmake-build-install -A x64 -DBUILD_DOCS=OFF -DBUILD_TESTS=OFF `
-DLIZARDBYTE_COMMON_INSTALL=ON
cmake --build cmake-build-install --config Release --parallel 2
cmake --install cmake-build-install --config Release --prefix cmake-build-install/install

- name: Test installed consumer
if: matrix.kind != 'msvc'
run: |
cmake -S tests/consumer -B cmake-build-consumer -G Ninja \
-DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/cmake-build-install/install"
cmake --build cmake-build-consumer
./cmake-build-consumer/logging_consumer

- name: Test installed consumer MSVC
if: matrix.kind == 'msvc'
run: |
cmake -S tests/consumer -B cmake-build-consumer -A x64 `
-DCMAKE_PREFIX_PATH="$env:GITHUB_WORKSPACE/cmake-build-install/install"
cmake --build cmake-build-consumer --config Release
./cmake-build-consumer/Release/logging_consumer.exe

- name: Upload report artifact
if: >-
Expand All @@ -372,6 +396,68 @@ jobs:
path: cmake-build-ci/reports
if-no-files-found: error

rust:
name: Rust (${{ matrix.os }})
needs:
- release-setup
permissions:
contents: read
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Rust
run: |
rustup toolchain install stable --profile minimal \
--component clippy,rustfmt,llvm-tools-preview --no-self-update
rustup default stable

- name: Check formatting
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy --locked --all-targets -- -D warnings

- name: Test
run: cargo test --locked --all-targets

- name: Documentation
run: cargo doc --locked --no-deps

- name: Install coverage tool
if: runner.os == 'Linux'
run: cargo install cargo-llvm-cov --locked

- name: Rust coverage
if: runner.os == 'Linux'
run: |
mkdir -p coverage
cargo llvm-cov --locked --all-targets --cobertura --output-path coverage/rust-coverage.xml

- name: Upload Rust coverage
if: runner.os == 'Linux'
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
disable_search: true
fail_ci_if_error: true
files: ./coverage/rust-coverage.xml
flags: Linux-rust
report_type: coverage
token: ${{ secrets.CODECOV_TOKEN }}

codecov:
name: Codecov (${{ matrix.flag }})
if: >-
Expand Down Expand Up @@ -441,6 +527,7 @@ jobs:
- build
- release-setup
- pytest
- rust
permissions: {}
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ __marimo__/
# Project specific
#

# Rust
/target/

# Dockle
/.dockle/
/_site/
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
[submodule "third-party/googletest"]
path = third-party/googletest
url = https://github.com/google/googletest.git
[submodule "third-party/spdlog"]
path = third-party/spdlog
url = https://github.com/gabime/spdlog.git
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ build:
tools:
nodejs: "26"
python: "miniforge3-26.3"
rust: latest
jobs:
build:
html:
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ endif()
# Library code is located here When building tests this must be after the
# coverage flags are set
#
include(cmake/logging.cmake)
add_subdirectory(src)

#
Expand Down
Loading
Loading