-
Notifications
You must be signed in to change notification settings - Fork 16
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
Apply the latest Beman Standard #15
Merged
camio
merged 17 commits into
bemanproject:main
from
neatudarius:update-to-latest-beman-standard
Sep 10, 2024
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2b57603
Apply the latest Beman Standard
neatudarius c66fb48
cleanup in .gitignore
neatudarius b067132
Remove file prologue as it will not be mentioned in the Beman Standard
neatudarius 02f6000
Tweaks in .gitignore
neatudarius 9936acd
README.md: add build instructions ready to copy-paste
neatudarius 72100cb
Tweaks in CMakeLists.txt
neatudarius 73bdfd7
Tweaks in CI tests configuration file
neatudarius 963f20e
Apply naming convention from the Beman Standard
neatudarius 0df2d52
Tweaks for LICENSE
neatudarius b12763b
Change root README structure
neatudarius 03cbf60
Fix CI tests
neatudarius 7e879c9
Update .github/CODEOWNERS
neatudarius 84b4097
Remove whitespace
neatudarius f7d0d26
Add more relevant example
neatudarius 3268d37
Latest examples depends on range support: C++20 or later required for…
neatudarius a0381d1
Rename from CamelScase to snake_case
neatudarius 26b092e
Apply tree tweaks
neatudarius File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,35 @@ | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
FROM rockylinux:9 | ||
|
||
# Enable EPEL | ||
# Enable EPEL. | ||
RUN dnf update -y | ||
RUN dnf install -y 'dnf-command(config-manager)' | ||
RUN dnf config-manager --set-enabled crb -y | ||
RUN dnf install epel-release -y | ||
|
||
# Install dependencies | ||
# Install dependencies. | ||
RUN dnf install -y \ | ||
clang \ | ||
g++ \ | ||
ninja-build \ | ||
cmake | ||
cmake \ | ||
git | ||
RUN dnf clean all | ||
|
||
# Copy code | ||
# Copy code. | ||
WORKDIR /workarea | ||
COPY ./ ./ | ||
|
||
# Set build arguments. | ||
ARG cc=gcc | ||
ARG cxx=g++ | ||
ARG cmake_args= | ||
|
||
# Build. | ||
ENV CC="$cc" CXX="$cxx" CMAKE_GENERATOR="Ninja" CMAKE_EXPORT_COMPILE_COMMANDS=on | ||
RUN cmake -B build -S . "$cmake_args" && \ | ||
cmake --build build --verbose && \ | ||
DESTDIR=build/staging cmake --install build --prefix /opt/example --component libexample-dev && \ | ||
find build/staging -type f | ||
RUN cmake -B build -S . "$cmake_args" | ||
RUN cmake --build build --verbose | ||
RUN cmake --install build --prefix /opt/beman.example | ||
RUN find /opt/beman.example -type f | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
# Using a non-LTS Ubuntu, just until CMake 3.23 is available on Ubuntu 24.04 | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# Using a non-LTS Ubuntu, just until CMake 3.23 is available on Ubuntu 24.04. | ||
FROM ubuntu:23.10 | ||
|
||
# Install dependencies | ||
# Install dependencies, | ||
RUN apt-get update | ||
RUN apt-get install -y \ | ||
clang \ | ||
clang-tidy \ | ||
g++ \ | ||
ninja-build \ | ||
cmake | ||
cmake \ | ||
git | ||
RUN apt-get clean | ||
|
||
WORKDIR /workarea | ||
COPY ./ ./ | ||
|
||
# Set build arguments. | ||
ARG cc=gcc | ||
ARG cxx=g++ | ||
ARG cmake_args= | ||
|
||
# Workaround Ubuntu broken ASan | ||
RUN sysctl vm.mmap_rnd_bits=28 | ||
|
||
# Build. | ||
ENV CC="$cc" CXX="$cxx" CMAKE_GENERATOR="Ninja" CMAKE_EXPORT_COMPILE_COMMANDS=on | ||
RUN cmake -B build -S . "$cmake_args" && \ | ||
cmake --build build --verbose && \ | ||
DESTDIR=build/staging cmake --install build --prefix /opt/example --component libexample-dev && \ | ||
find build/staging -type f | ||
RUN ls -lR src | ||
RUN cmake -B build -S . "$cmake_args" | ||
RUN cmake --build build --verbose | ||
RUN cmake --install build --prefix /opt/beman.example | ||
RUN find /opt/beman.example -type f |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
# Codeowners for reviews on PRs | ||
|
||
* @bretbrownjr @camio @dietmarkuehl @neatudarius @steve-downey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/compile_commands.json | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
# Copyright © 2024 Bret Brown | ||
# SPDX-License-Identifier: MIT | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
# TODO Darius: Find CMake minimum required version. | ||
cmake_minimum_required(VERSION 3.23) | ||
project(example | ||
VERSION 1.0.0 | ||
DESCRIPTION "An example Beman library" | ||
LANGUAGES CXX | ||
) | ||
|
||
project( | ||
beman.example # CMake Project Name, which is also the name of the top-level | ||
# targets (e.g., library, executable, etc.). | ||
DESCRIPTION "A Beman Library Example" | ||
LANGUAGES CXX) | ||
|
||
include(CTest) | ||
include(FetchContent) | ||
|
||
if(BUILD_TESTING) | ||
enable_testing() | ||
|
||
# Fetch GoogleTest | ||
FetchContent_Declare( | ||
googletest | ||
GIT_REPOSITORY https://github.com/google/googletest.git | ||
GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 # release-1.14.0 | ||
EXCLUDE_FROM_ALL CMAKE_ARGS -DBUILD_TESTING=OFF) | ||
FetchContent_MakeAvailable(googletest) | ||
endif() | ||
|
||
add_subdirectory(src/example) | ||
add_subdirectory(src/beman/example) | ||
|
||
if (BUILD_TESTING) | ||
add_subdirectory(test/example) | ||
endif () | ||
add_subdirectory(examples) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is removing CI testing for C++98 <-> C++17 here intentional?
There's only C++20 <-> C++26 testing left.
@neatudarius