Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
abdes committed Sep 20, 2022
2 parents c325043 + 0bec238 commit a414907
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 4 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [4.6.0](http://github.com/abdes/asap/compare/v4.5.2...v4.6.0) (2022-09-20)

### Features

* option to control the use of ccache, default is OFF ([49a17a9](http://github.com/abdes/asap/commit/49a17a99026ae7e59d14297d01ed2f8d10c78762))

More robust implementation of fatser builds with `ccache`. Caching is enabled in
GitHub CI builds and can be enabled in development environments by simply
setting the cmake variable `USE_CCACHE` to 'ON'/'TRUE' or equivalent.

A precondition for the environment is of course to have `ccache` installed,
which gets done automatically in GitHub workflows, but needs to be done in
development environments. It is recommended to use brew/choco for MacOS/Windows,
but to install from the pre-built binaries for Linux as the version that comes
with most distros is quite old.

It is to be noted that `ccache` with MSVC on Windows may have some issues and if
that is the case, simply do not use it.

### [4.5.2](http://github.com/abdes/asap/compare/v4.5.1...v4.5.2) (2022-09-20)

### Bug Fixes
Expand Down
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ set(META_GITHUB_REPO "https://github.com/abdes/asap")
set(META_AUTHOR_DOMAIN "https://github.com/abdes/asap")
set(META_AUTHOR_MAINTAINER "Abdessattar Sassi")
set(META_VERSION_MAJOR "4")
set(META_VERSION_MINOR "5")
set(META_VERSION_PATCH "2")
set(META_VERSION_MINOR "6")
set(META_VERSION_PATCH "0")
set(META_VERSION_REVISION "${GIT_REV}")
set(META_VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}")
set(META_NAME_VERSION "${META_PROJECT_NAME} v${META_VERSION} (${META_VERSION_REVISION})")
Expand Down Expand Up @@ -84,6 +84,7 @@ option(ASAP_WITH_GOOGLE_ASAN "Instrument code with address sanitizer"
option(ASAP_WITH_GOOGLE_UBSAN "Instrument code with undefined behavior sanitizer" OFF)
option(ASAP_WITH_GOOGLE_TSAN "Instrument code with thread sanitizer" OFF)
option(ASAP_WITH_VALGRIND "Builds targets with valgrind profilers added" OFF)
option(USE_CCACHE "Enable caching of compiled artifacts using ccache" OFF)
# cmake-format: on

# ------------------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

# Don't waste your time!
# Don't waste your time

![Start Now!!](doc/_static/asap-banner.png "ASAP banner")

Expand Down Expand Up @@ -71,6 +71,8 @@ than days.
- code coverage with clang or g++
- zero-touch valgrind, clang-tidy, clang-format, google sanitizers, etc
- development can be done locally or in a dev container with vscode
- faster rebuilds with [`ccache`](https://ccache.dev) empowered caching
- `CMake` package management with [`CPM`](https://github.com/cpm-cmake/CPM.cmake)

## Project Documentation

Expand Down Expand Up @@ -169,6 +171,5 @@ Read the [developer guides](https://abdes.github.io/asap/asap_master/html/).
[openssf-project]: https://bestpractices.coreinfrastructure.org/projects/5917
[project-docs-thumb]: https://cdn.loom.com/sessions/thumbnails/131bd53f1a004387b09bbeeb80a41f3e-with-play.gif
[project-docs-video]: https://www.loom.com/embed/131bd53f1a004387b09bbeeb80a41f3e
[project-docs]: https://abdes.github.io/asap/asap_master/html/index.html
[release-badge]: https://img.shields.io/github/v/release/abdes/asap
[windows-badge]: https://img.shields.io/badge/OS-windows-blue
27 changes: 27 additions & 0 deletions doc/getting-started/devenv.rst
Original file line number Diff line number Diff line change
Expand Up @@ -543,3 +543,30 @@ properly configured.
As an alternative, you can use `winget` to install the Doxygen package by
executing the following command ```winget install --id
Docker.DockerDesktop```.

Compiler Cache
^^^^^^^^^^^^^^

In `asap`, compiler cache is implemented through the use of
[`ccache`](https://ccache.dev). While this is completely taken care of in CI
build on GitHub workflows, it needs some attention in development environments.

First you need to have `ccache` on your development environment. For that, we
recommend the following:

* On Mac OS, use [`brew`](https://brew.sh), which should always provide a pretty
recent if not the latest version of ccache, pre-built for Mac OS.

* On Windows, use [`choco`](https://chocolatey.org),
[`winget`](https://learn.microsoft.com/en-us/windows/package-manager/winget/)
or any other suitable means to get a pre-built binary for ccache.

* On Linux, you can of course use the distribution package manager to get a
pre-built package, but they are in general quite old.

The better alternative is to download and manually install the [latest pre-built
binaries](https://ccache.dev/download.html) from the `ccache` GitHub page.

Second, you need to enable caching in your builds by setting the CMake project
option `USE_CCACHE` to 'ON', 'TRUE' or equivalent. If you use the CMake presets,
they automatically do that for you.

0 comments on commit a414907

Please sign in to comment.