Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: JPenuchot/ctbench
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.0
Choose a base ref
...
head repository: JPenuchot/ctbench
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
1 change: 1 addition & 0 deletions .github/actions/run-tests-archlinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ RUN pacman -S --noconfirm \
curl \
fmt \
git \
gnuplot \
llvm \
llvm-libs \
ninja \
8 changes: 7 additions & 1 deletion .github/actions/run-tests-archlinux/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -16,6 +16,12 @@ cmake --build --preset release --target test-all

cmake --build --preset release --target install

cd example || exit
cd example

cmake --preset release
cmake --preset release-clang
cmake --preset release-clang-tt

cmake --build --preset release
cmake --build --preset release-clang
cmake --build --preset release-clang-tt
1 change: 1 addition & 0 deletions .github/actions/run-tests-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ RUN apt install -y \
cmake \
curl \
git \
gnuplot-nox \
libboost-all-dev \
libclang-dev \
libfmt-dev \
8 changes: 7 additions & 1 deletion .github/actions/run-tests-ubuntu/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -16,6 +16,12 @@ cmake --build --preset release --target test-all

cmake --build --preset release --target install

cd example || exit
cd example

cmake --preset release
cmake --preset release-clang
cmake --preset release-clang-tt

cmake --build --preset release
cmake --build --preset release-clang
cmake --build --preset release-clang-tt
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,11 @@ jobs:
uses: actions/checkout@v3
- name: Compiling and running ctbench tests on Archlinux
uses: ./.github/actions/run-tests-archlinux
- uses: actions/upload-artifact@v3
with:
name: archlinux-build-result
path: example/build/

ubuntu-testing:
runs-on: self-hosted
container:
@@ -22,3 +27,7 @@ jobs:
uses: actions/checkout@v3
- name: Compiling and running ctbench tests on Ubuntu
uses: ./.github/actions/run-tests-ubuntu
- uses: actions/upload-artifact@v3
with:
name: ubuntu-build-result
path: example/build/
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changelog

## 1.3.4

- Added changelog

### compiler-launcher

- Added `-h/-help/help` flag to display help in CLI
- Fixed compiler execution time measurement for measurements without time-trace

### Example project

- Added new presets, the available ones are now:
- `release-gcc`
- `release-clang`
- `release-clang-tt`
- `debug-gcc`
- `debug-clang`
- `debug-clang-tt`

### CI/CD

- Now compiling all presets
- Results are uploaded as artifacts
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25)
project(ctbench VERSION 1.3.0)
project(ctbench VERSION 1.3.4)

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

133 changes: 133 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
`jules [a] penuchot [d] com`.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

152 changes: 152 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Welcome to ctbench contributing guide

Thank you for investing your time in contributing to our project!

Read our [Code of Conduct](./CODE_OF_CONDUCT.md) to keep our community
approachable and respectable.

In this guide you will get an overview of the contribution workflow from opening
an issue, creating a PR, reviewing, and merging the PR.

## New contributor guide

To get an overview of the project, read the [README](README.md). Here are some
resources to help you get started with open source contributions:

- [Finding ways to contribute to open source on GitHub](
https://docs.github.com/en/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github) - [Set up
Git](https://docs.github.com/en/get-started/quickstart/set-up-git) - [GitHub
flow](https://docs.github.com/en/get-started/quickstart/github-flow) -
[Collaborating with pull
requests](https://docs.github.com/en/github/collaborating-with-pull-requests)

## Getting started

To navigate the codebase using tools based on ClangD,
`compile_commands.json` can be generated in the `build/` folder
by running `cmake --preset dev`.

### Issues

#### Create a new issue

*All issues are welcome.*

If you feel like you need support after reading the docs,
then the docs were not clear enough and *we need to hear about it*.
Do not censor yourself, and please raise the issue.

If you think you found a bug,
please make sure your issue contains the following:

- A short descrpition of the bug
- A short description of your system (OS, distro, etc.)
- Steps to reproduce
- Expected behavior
- Actual behavior

Feature requests are welcome.

#### Solve an issue

Scan through our [existing issues](https://github.com/github/docs/issues) to
find one that interests you. You can narrow down the search using `labels` as
filters. See [Labels](/contributing/how-to-use-labels.md) for more information.
As a general rule, we don’t assign issues to anyone. If you find an issue to
work on, you are welcome to open a PR with a fix.

### Make Changes

### Checklist for C++ code contributions

- Every C++ function must have a Doxygen explainer that helps
understand its purpose without looking at the implementation.

- C++ code must be formatted using `clang-format` using the default settings
(ie. LLVM style).
`// clang-format off` and `// clang-format on` may be used in cases where
it can improve readability.

- Names are stylized in `snake_case`.

- Avoid use of `auto` variable types to make types visible in the code.

- Variables names are long and clear enough.

- Code is largely commented.

- Core type aliases are defined in `grapher/include/grapher/core.cpp`
for things like JSON objects, maps, and multimaps.
Please make sure you use them.

- Functions for JSON value or reference access are declared in
`grapher/include/grapher/utils/json.hpp`.
Please make sure you use them too.

### Checklist for CMake API code contributions

- Every CMake function must have a Markdown explainer that helps
understand its purpose without looking at the implementation.

- Public API functions must begin with `ctbench_`.

- Internal API functions must begin with `_ctbench_`.

#### CMake API documentation explainer

A preprocessor is used to generate a Markdown file (see `cmake-doc-extractor/`).
Lines beginning with `#!` will be part of the public API documentation, whereas
lines beginning with `#@` will be part of the internal API documentation.

- Public CMake API documentation looks like the following:

```cmake
#!
#! ### some_public_api_function(name foo bar)
#!
#! A paragraph describing my superb function.
#!
#! - `foo`: Description of parameter foo
#! - `bar`: Description of parameter bar
#!
```

- Internal CMake API documentation looks like the following:

```cmake
#@
#@ ### _some_internal_api_function(name foo bar)
#@
#@ A paragraph describing my superb function.
#@
#@ - `foo`: Description of parameter foo
#@ - `bar`: Description of parameter bar
#@
```

#### Adding a new plotter

For plotter implementation please look at
`grapher/include/grapher/plotters/debug.hpp` as a reference.
Every plotter must satisfy the virtual interface defined in
`grapher/include/grapher/plotters/plotter_base.hpp`.

Take a look at `grapher/include/grapher/plotters/plotters.hpp`
and make sure your plotter appears in all following definitions:

- `plotter_config`: plotter documentation page
- `plotter_type_t`: plotter type enumeration
- `plotter_name_map`: string to plotter type map
- `plotter_cl_values`: CLI parsing options
- `plotter_type_to_plotter`: plotter type to `plotter_t` value map function

### Pull Request

*Pull requests are always welcome.*

Feel free to open draft pull requests at any time to trigger the CI
and test your code on the supported platforms.
You may remove the draft status if you feel like your PR is ready
or needs to be reviewed or discussed.

Thanks in advance for your time, and thank you for reading these guidelines!
Loading