File: action.yml

package info (click to toggle)
scitokens-cpp 1.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,172 kB
  • sloc: cpp: 11,717; ansic: 596; sh: 161; python: 132; makefile: 22
file content (39 lines) | stat: -rw-r--r-- 1,229 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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@v3
    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