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:
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"
|
||||
|
||||
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
|
||||
# it also makes sure we can use git --describe correctly
|
||||
- name: Fancy Checkout
|
||||
|
||||
5
.github/workflows/codeql-analysis.yml
vendored
5
.github/workflows/codeql-analysis.yml
vendored
@ -38,6 +38,11 @@ jobs:
|
||||
language: ["cpp"]
|
||||
|
||||
steps:
|
||||
- name: Install container dependencies
|
||||
run: |
|
||||
apt update -qqq > /dev/null
|
||||
apt install -qqq git > /dev/null
|
||||
|
||||
- name: Fancy Checkout
|
||||
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 }}
|
||||
|
||||
steps:
|
||||
- name: Install container dependencies
|
||||
run: |
|
||||
apt update -qqq > /dev/null
|
||||
apt install -qqq git curl unzip gcovr > /dev/null
|
||||
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1.0.0
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install project dependencies
|
||||
uses: ./.github/actions/install-dependencies
|
||||
with:
|
||||
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
|
||||
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
|
||||
|
||||
steps:
|
||||
- name: Install container dependencies
|
||||
run: |
|
||||
apt update -qqq > /dev/null
|
||||
apt install -qqq git valgrind > /dev/null
|
||||
|
||||
- name: Fancy Checkout
|
||||
uses: sithlord48/fancy-checkout@v1.0.0
|
||||
|
||||
@ -19,12 +24,6 @@ jobs:
|
||||
with:
|
||||
like: "debian"
|
||||
|
||||
- name: Install valgrind
|
||||
run: apt install valgrind -y
|
||||
env:
|
||||
# Prevent apt prompting for input.
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
- name: Configure
|
||||
run: cmake -B build -G "Ninja"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user