ci: make sure git is installed before calling fancy-checkout
When we want to use the base runners they do not have git Install devscripts for debian images that will make packages
This commit is contained in:
parent
32b84f0a4b
commit
01565ba9a9
4 changed files with 33 additions and 13 deletions
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
|
|
@ -163,6 +163,23 @@ jobs:
|
||||||
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
config-args: "-G Ninja -DCMAKE_INSTALL_PREFIX=/usr"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# Make sure the container has git before we do anything else
|
||||||
|
- name: Install Git on Container
|
||||||
|
if: ${{ matrix.target.container }}
|
||||||
|
shell: bash
|
||||||
|
run : |
|
||||||
|
if [ "${{matrix.target.like}}" == "debian" ]; then
|
||||||
|
apt update -qqq > /dev/null && apt install -qqq git devscripts > /dev/null
|
||||||
|
elif [ "${{matrix.target.like}}" == "fedora" ]; then
|
||||||
|
dnf install -y git
|
||||||
|
elif [ "${{matrix.target.like}}" == "suse" ]; then
|
||||||
|
zypper refresh
|
||||||
|
zypper install -y --force-resolution git
|
||||||
|
elif [ "${{matrix.target.like}}" == "arch" ]; then
|
||||||
|
pacman -Syu --noconfirm git
|
||||||
|
else
|
||||||
|
echo "Unknown: ${{matrix.target.like}}"
|
||||||
|
fi
|
||||||
# Fancy checkout gets all the tags
|
# Fancy checkout gets all the tags
|
||||||
# it also makes sure we can use git --describe correctly
|
# it also makes sure we can use git --describe correctly
|
||||||
- name: Fancy Checkout
|
- name: Fancy Checkout
|
||||||
|
|
|
||||||
5
.github/workflows/codeql-analysis.yml
vendored
5
.github/workflows/codeql-analysis.yml
vendored
|
|
@ -38,6 +38,11 @@ jobs:
|
||||||
language: ["cpp"]
|
language: ["cpp"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install container dependencies
|
||||||
|
run: |
|
||||||
|
apt update -qqq > /dev/null
|
||||||
|
apt install -qqq git > /dev/null
|
||||||
|
|
||||||
- name: Fancy Checkout
|
- name: Fancy Checkout
|
||||||
uses: sithlord48/fancy-checkout@v1.0.0
|
uses: sithlord48/fancy-checkout@v1.0.0
|
||||||
|
|
||||||
|
|
|
||||||
13
.github/workflows/sonarcloud-analysis.yml
vendored
13
.github/workflows/sonarcloud-analysis.yml
vendored
|
|
@ -22,20 +22,19 @@ jobs:
|
||||||
CPU_CORE_COUNT: ${{ vars.SONAR_SCANNER_CPU_COUNT || 4 }}
|
CPU_CORE_COUNT: ${{ vars.SONAR_SCANNER_CPU_COUNT || 4 }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install container dependencies
|
||||||
|
run: |
|
||||||
|
apt update -qqq > /dev/null
|
||||||
|
apt install -qqq git curl unzip gcovr > /dev/null
|
||||||
|
|
||||||
- name: Fancy Checkout
|
- name: Fancy Checkout
|
||||||
uses: sithlord48/fancy-checkout@v1.0.0
|
uses: sithlord48/fancy-checkout@v1.0.0
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install project dependencies
|
||||||
uses: ./.github/actions/install-dependencies
|
uses: ./.github/actions/install-dependencies
|
||||||
with:
|
with:
|
||||||
like: "debian"
|
like: "debian"
|
||||||
|
|
||||||
- name: Install dependencies (extra)
|
|
||||||
run: apt install curl unzip gcovr -y
|
|
||||||
env:
|
|
||||||
# Prevent apt prompting for input.
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
|
|
||||||
- name: Install sonar-scanner and build-wrapper
|
- name: Install sonar-scanner and build-wrapper
|
||||||
uses: sonarsource/sonarcloud-github-c-cpp@v3
|
uses: sonarsource/sonarcloud-github-c-cpp@v3
|
||||||
|
|
||||||
|
|
|
||||||
11
.github/workflows/valgrind-analysis.yml
vendored
11
.github/workflows/valgrind-analysis.yml
vendored
|
|
@ -11,6 +11,11 @@ jobs:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install container dependencies
|
||||||
|
run: |
|
||||||
|
apt update -qqq > /dev/null
|
||||||
|
apt install -qqq git valgrind > /dev/null
|
||||||
|
|
||||||
- name: Fancy Checkout
|
- name: Fancy Checkout
|
||||||
uses: sithlord48/fancy-checkout@v1.0.0
|
uses: sithlord48/fancy-checkout@v1.0.0
|
||||||
|
|
||||||
|
|
@ -19,12 +24,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
like: "debian"
|
like: "debian"
|
||||||
|
|
||||||
- name: Install valgrind
|
|
||||||
run: apt install valgrind -y
|
|
||||||
env:
|
|
||||||
# Prevent apt prompting for input.
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
run: cmake -B build -G "Ninja"
|
run: cmake -B build -G "Ninja"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue