Files
jwt-cpp/.github/actions/install/cmake/action.yml
Chris Mc 0ab9469c7d Update workflows for new GitHub Action Runner Images (#382)
* use ubuntu-latest + update actions/cache

* performance-avoid-endl

https://clang.llvm.org/extra/clang-tidy/checks/performance/avoid-endl.html

* misc-const-correctness

https://clang.llvm.org/extra/clang-tidy/checks/misc/const-correctness.html

* misc-const-correctness

https://clang.llvm.org/extra/clang-tidy/checks/misc/const-correctness.html

* formatting

* clang format and tidy and already installed

https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#language-and-runtime

* explict clang-format-14

* disable include cleaner

* format

* format

* install lcov to get patching geninfo for gcc 13

* revert "install lcov to get patching geninfo for gcc 13"
2025-05-13 17:35:46 -04:00

40 lines
1.2 KiB
YAML

name: Install CMake
description: Download, Build and Cache CMake
inputs:
version:
description: The desired CMake version to install
required: true
url:
description: "The corresponding URL to download the source code from"
required: true
runs:
using: composite
steps:
- name: Cache CMake
id: cache-cmake
uses: actions/cache@v4
with:
path: cmake-${{ inputs.version }}
key: ${{ runner.name }}-${{ runner.os }}-${{ runner.arch }}-${{ job.container.id }}-cmake-${{ inputs.version }}
- name: Build cmake
if: steps.cache-cmake.outputs.cache-hit != 'true'
run: |
wget ${{ inputs.url }}
tar -zxf cmake-${{ inputs.version }}.tar.gz
cd cmake-${{ inputs.version }}
./bootstrap
make -j $(nproc)
shell: bash
- name: Install cmake
run: |
cd cmake-${{ inputs.version }}
# Depending if we run in on a GitHub Actions or from within a Docker image we have different permissions
if [[ $EUID > 0 ]]; then
# If we are not root then we need to sudo
sudo make install
else
# Default docker image does not have users setup so we are only root and can not sudo
make install
fi
shell: bash