Skip to content

measure cmake run

measure cmake run #35

Workflow file for this run

---
name: build dnf5 with ccache to check for quick build errors
on:
pull_request:
workflow_dispatch:
jobs:
build-with-ccache:
runs-on: ubuntu-latest
container:
image: fedora:rawhide
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: |
dnf install -y ccache && dnf builddep -y ./dnf5.spec
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("timestamp=${current_date} >> $GITHUB_OUTPUT")
- name: ccache cache files
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
${{ runner.os }}-ccache-
- name: is ccache used?
run: which gcc
- name: Configure cmake
run: cmake -S . -B build -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build dnf5
run: cmake --build build