Skip to content

Commit

Permalink
Update build system
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Jan 11, 2025
1 parent 98879ea commit 55ec73a
Show file tree
Hide file tree
Showing 10 changed files with 201 additions and 773 deletions.
102 changes: 0 additions & 102 deletions .appveyor.yml

This file was deleted.

11 changes: 9 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# the official .clang-format style for https://github.com/taocpp
# The Art of C++
# https://github.com/taocpp

# Copyright (c) 2016-2025 Dr. Colin Hirsch and Daniel Frey
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)

# This is our official .clang-format style for https://github.com/taocpp
#
# clang-format -i -style=file $(find . -name '[^.]*.[hc]pp')

Language: Cpp
Standard: Cpp11
Standard: Latest

AccessModifierOffset: -3
AlignAfterOpenBracket: Align
Expand Down
19 changes: 18 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
# The Art of C++
# https://github.com/taocpp

# Copyright (c) 2016-2025 Dr. Colin Hirsch and Daniel Frey
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)

# Note: The misc-include-cleaner is generally useful,
# but produces false positives with Oid/InvalidOid and libpq-fe.h.
# For that reason it is disabled, but it should be enabled
# manually from time to time.

Checks: >-
bugprone-*,
-bugprone-easily-swappable-parameters,
cppcoreguidelines-slicing,
cppcoreguidelines-special-member-functions,
google-build-explicit-make-pair,
google-build-namespaces,
google-default-arguments,
google-global-names-in-headers,
google-readability-casting,
llvm-*,
misc-*,
-misc-include-cleaner,
-misc-non-private-member-variables-in-classes,
-misc-unused-alias-decls,
llvm-*,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-concat-nested-namespaces,
-modernize-raw-string-literal,
performance-*,
readability-*,
-readability-avoid-const-params-in-decls,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-magic-numbers,
-readability-non-const-parameter,
CheckOptions:
- { key: readability-identifier-naming.ClassCase, value: lower_case }
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: clang-format

on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'

jobs:
clang-format:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.18
with:
extensions: 'hpp,cpp'
22 changes: 22 additions & 0 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: clang-tidy

on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'

jobs:
clang-tidy:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- run: sudo apt-get update -yq

- run: sudo apt-get install -yq clang-tidy

- run: find include/ src/ -name '*.?pp' | xargs -I '{}' clang-tidy --quiet '{}' -- -Iinclude
41 changes: 41 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Linux

on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'

jobs:
linux-next:
strategy:
fail-fast: false
matrix:
compiler:
- g++-13
- g++-14
- clang++-16
- clang++-17
- clang++-18
build_type: [Debug, Release]

runs-on: ubuntu-24.04

env:
CXX: ${{ matrix.compiler }}

steps:
- uses: actions/checkout@v4

- run: cmake -E make_directory build

- working-directory: build/
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

- working-directory: build/
run: cmake --build .

- working-directory: build/
run: ctest --output-on-failure
33 changes: 33 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: macOS

on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'

jobs:
xcode-macos-14:
strategy:
fail-fast: false
matrix:
xcode: ['15']
build_type: [Debug, Release]

runs-on: macos-14

steps:
- uses: actions/checkout@v4

- run: cmake -E make_directory build

- working-directory: build/
run: cmake $GITHUB_WORKSPACE

- working-directory: build/
run: cmake --build . --config ${{ matrix.build_type }}

- working-directory: build/
run: ctest --output-on-failure
56 changes: 56 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Windows

on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'

jobs:
vs2022:
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]

runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- run: cmake -E make_directory build

- shell: bash
working-directory: build/
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 17 2022"

- working-directory: build/
run: cmake --build . --config ${{ matrix.build_type }}

- working-directory: build/
run: ctest --output-on-failure

vs2022-clang:
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]

runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- run: cmake -E make_directory build

- shell: bash
working-directory: build/
run: cmake $GITHUB_WORKSPACE -G "Visual Studio 17 2022" -T ClangCL

- working-directory: build/
run: cmake --build . --config ${{ matrix.build_type }}

- working-directory: build/
run: ctest --output-on-failure
Loading

0 comments on commit 55ec73a

Please sign in to comment.