ci: Normalize CI step names, descriptions, etc

Also:
- Surfaced the comment about the Kitware repo so it's more visible
- Remove the hard-coded CMake version in comment which is likely to get out of sync and confuse someone
This commit is contained in:
Nick Bolton 2024-10-19 08:16:49 +01:00
parent f7ca548ee2
commit 1b904e7c02
3 changed files with 23 additions and 17 deletions

View file

@ -1,30 +1,32 @@
# Add Kitware repo action
# SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com> # SPDX-FileCopyrightText: 2024 Chris Rizzitello <sithlord48@gmail.com>
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
name: "Add Kitware repo" name: "Add Kitware repo"
description: "Add kitware repo for debian like distros" description: "Add Kitware repo for Debian-like distros"
inputs: inputs:
distro: distro:
description: "The Distro codename, kitware uses ubuntu code names [noble, jammy, focal] " description: "Ubuntu codename, Kitware uses: noble, jammy, focal"
required: true required: true
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Cmake-3.24
# This mirrors instructions at https://apt.kitware.com
- name: Add repo
run: | run: |
apt update -y -qqq apt update -y -qqq
apt install ca-certificates gpg wget -y -qqq apt install ca-certificates gpg wget -y -qqq
# Deskflow requires at least CMake 3.24
# This mirrors instructions at https://apt.kitware.com
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \ wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null \
| gpg --dearmor - \ | gpg --dearmor - \
> /usr/share/keyrings/kitware-archive-keyring.gpg > /usr/share/keyrings/kitware-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${{ inputs.distro }} main' \ echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${{ inputs.distro }} main' \
> /etc/apt/sources.list.d/kitware.list > /etc/apt/sources.list.d/kitware.list
apt update -y -qqq apt update -y -qqq
env: env:
# Prevent apt prompting for input. # Prevent apt prompting for input.

View file

@ -110,8 +110,10 @@ jobs:
name: ${{ matrix.target.name }} name: ${{ matrix.target.name }}
runs-on: ${{ matrix.target.runs-on }} runs-on: ${{ matrix.target.runs-on }}
container: ${{ matrix.target.container }} container: ${{ matrix.target.container }}
# CI should normally takes less than 10 mins to run,
# but if vcpkg has to rebuild the cache (should be rare), it takes about 90 mins.
timeout-minutes: 120 timeout-minutes: 120
# If vcpkg has to rebuild the cache it takes a while
strategy: strategy:
# Normally, we want to fail fast, but in this case we shouldn't since one target may # Normally, we want to fail fast, but in this case we shouldn't since one target may
@ -129,7 +131,7 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
# the fetch-tags option for checkout does not work correctly so we need todo this # The fetch-tags option for checkout does not work correctly so we need to do this.
- name: Fetch tags - name: Fetch tags
run: | run: |
git config --global --add safe.directory $GITHUB_WORKSPACE git config --global --add safe.directory $GITHUB_WORKSPACE
@ -146,7 +148,7 @@ jobs:
- name: Install Ninja - name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master uses: seanmiddleditch/gha-setup-ninja@master
- name: vcpkg build - name: Dependencies (vcpkg)
id: vcpkg id: vcpkg
uses: johnwason/vcpkg-action@v6 uses: johnwason/vcpkg-action@v6
with: with:
@ -155,7 +157,7 @@ jobs:
token: ${{ github.token }} token: ${{ github.token }}
github-binarycache: true github-binarycache: true
- name: setup env - name: Setup Python venv
run: python ./scripts/setup_venv.py run: python ./scripts/setup_venv.py
- name: Configure - name: Configure
@ -224,7 +226,7 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
# the fetch-tags option for checkout does not work correctly so we need todo this # The fetch-tags option for checkout does not work correctly so we need to do this.
- name: Fetch tags - name: Fetch tags
run: | run: |
git config --global --add safe.directory $GITHUB_WORKSPACE git config --global --add safe.directory $GITHUB_WORKSPACE
@ -308,7 +310,7 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
# the fetch-tags option for checkout does not work correctly so we need todo this # The fetch-tags option for checkout does not work correctly so we need to do this.
- name: Fetch tags - name: Fetch tags
run: | run: |
git config --global --add safe.directory $GITHUB_WORKSPACE git config --global --add safe.directory $GITHUB_WORKSPACE
@ -320,7 +322,7 @@ jobs:
with: with:
distro: jammy distro: jammy
- name: Update Cmake - name: Update CMake
if: ${{ matrix.distro.name == 'ubuntu-22.04-amd64' }} if: ${{ matrix.distro.name == 'ubuntu-22.04-amd64' }}
run: apt install cmake -y run: apt install cmake -y
@ -338,11 +340,11 @@ jobs:
${{ env.CMAKE_ARGS }} \ ${{ env.CMAKE_ARGS }} \
${{ matrix.distro.extra-cmake-args }} ${{ matrix.distro.extra-cmake-args }}
- name: Build Package - name: Build package
if: ${{ matrix.distro.arch-like != 'true'}} if: ${{ matrix.distro.arch-like != 'true'}}
run: cmake --build build -j8 --target package run: cmake --build build -j8 --target package
- name: Build Package (Arch-like) - name: Build package (Arch-like)
if: ${{ matrix.distro.arch-like == 'true' }} if: ${{ matrix.distro.arch-like == 'true' }}
run: | run: |
cmake --build build -j8 cmake --build build -j8
@ -354,7 +356,6 @@ jobs:
mv *.pkg.* $(ls *.pkg.* | sed "s/$ARCH/$OSNAME-$ARCH/g") mv *.pkg.* $(ls *.pkg.* | sed "s/$ARCH/$OSNAME-$ARCH/g")
cd .. cd ..
- name: Tests - name: Tests
uses: ./.github/actions/run-tests uses: ./.github/actions/run-tests
timeout-minutes: 2 timeout-minutes: 2
@ -387,7 +388,7 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
# the fetch-tags option for checkout does not work correctly so we need todo this # The fetch-tags option for checkout does not work correctly so we need to do this.
- name: Fetch tags - name: Fetch tags
run: | run: |
git config --global --add safe.directory $GITHUB_WORKSPACE git config --global --add safe.directory $GITHUB_WORKSPACE

View file

@ -13,6 +13,7 @@
"contribs", "contribs",
"Daun", "Daun",
"Deskflow", "Deskflow",
"distro",
"distros", "distros",
"dmgbuild", "dmgbuild",
"dotenv", "dotenv",
@ -30,6 +31,7 @@
"Kanapickas", "Kanapickas",
"keychain", "keychain",
"Keychains", "Keychains",
"Kitware",
"Kutytska", "Kutytska",
"Lanz", "Lanz",
"libei", "libei",
@ -58,6 +60,7 @@
"readf", "readf",
"Regen", "Regen",
"Repology", "Repology",
"Rizzitello",
"runas", "runas",
"Sbârnea", "Sbârnea",
"Schoeneman", "Schoeneman",