mirror of
https://github.com/ZmnSCPxj/clboss.git
synced 2026-08-16 13:00:59 +02:00
Add clang build configuration to catch C++20 compatibility issues early. Changes: - Add build-clang job to .github/workflows/build.yml - Add missing #include<cstdint> for std::uint* types (clang strict mode) - Add -lexecinfo for FreeBSD in configure.ac (backtrace_symbols) - Fix pessimizing-move warning in test_earningsrebalancer.cpp - Fix CHANGELOG.md formatting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
103 lines
2.5 KiB
YAML
103 lines
2.5 KiB
YAML
name: "Code Base Sanity Check"
|
|
on:
|
|
pull_request:
|
|
push:
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: cachix/install-nix-action@v31
|
|
with:
|
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
- run: nix flake check
|
|
|
|
coverage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Free disk space
|
|
run: |
|
|
df -h
|
|
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android || true
|
|
sudo apt-get clean || true
|
|
df -h
|
|
- name: Install build + coverage dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
autoconf \
|
|
autoconf-archive \
|
|
automake \
|
|
build-essential \
|
|
curl \
|
|
git \
|
|
lcov \
|
|
libcurl4-openssl-dev \
|
|
libev-dev \
|
|
libsqlite3-dev \
|
|
libtool \
|
|
libunwind-dev \
|
|
pkg-config
|
|
- name: Configure (coverage)
|
|
run: |
|
|
autoreconf -fi
|
|
./configure \
|
|
--disable-valgrind \
|
|
CFLAGS='-Og --coverage' \
|
|
CXXFLAGS='-Og --coverage' \
|
|
LDFLAGS='--coverage'
|
|
- name: Build + run unit tests
|
|
run: |
|
|
make -j2
|
|
make -j2 check-TESTS
|
|
- name: Generate HTML coverage report
|
|
run: |
|
|
make coverage-report
|
|
- name: Upload coverage reports to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: coverage.info
|
|
fail_ci_if_error: false
|
|
- name: Upload coverage (HTML)
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: coverage-html
|
|
path: coverage-html
|
|
- name: Upload coverage (lcov)
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: coverage-lcov
|
|
path: coverage.info
|
|
|
|
build-clang:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Install clang and build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
autoconf \
|
|
autoconf-archive \
|
|
automake \
|
|
build-essential \
|
|
clang \
|
|
curl \
|
|
git \
|
|
libcurl4-openssl-dev \
|
|
libev-dev \
|
|
libsqlite3-dev \
|
|
libtool \
|
|
libunwind-dev \
|
|
pkg-config
|
|
- name: Configure (clang)
|
|
run: |
|
|
autoreconf -fi
|
|
./configure CC=clang CXX=clang++
|
|
- name: Build
|
|
run: make -j2
|
|
- name: Run unit tests
|
|
run: make -j2 check-TESTS
|