mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
61e3f6108c
Bumps the github-actions group with 3 updates: [github/codeql-action/init](https://github.com/github/codeql-action), [github/codeql-action/analyze](https://github.com/github/codeql-action) and [vmactions/solaris-vm](https://github.com/vmactions/solaris-vm). Updates `github/codeql-action/init` from 4.37.8 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28...cdf488f595d80d6e07e03d4674febd5ab45fa938) Updates `github/codeql-action/analyze` from 4.37.8 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28...cdf488f595d80d6e07e03d4674febd5ab45fa938) Updates `vmactions/solaris-vm` from 1.3.8 to 1.3.9 - [Release notes](https://github.com/vmactions/solaris-vm/releases) - [Commits](https://github.com/vmactions/solaris-vm/compare/315163f088b66e55bbcc45928bd224d4973b2312...96d8d976f9e67d82ec6c7e8ce9c1060731f9e21c) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.37.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: github/codeql-action/analyze dependency-version: 4.37.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: vmactions/solaris-vm dependency-version: 1.3.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
136 lines
5.1 KiB
YAML
136 lines
5.1 KiB
YAML
name: Reusable Linux Hosts
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
arch:
|
|
required: true
|
|
type: string
|
|
runs-on:
|
|
required: true
|
|
type: string
|
|
outputs:
|
|
ffversion:
|
|
description: fastfetch version from linux host build
|
|
value: ${{ jobs.build.outputs.ffversion }}
|
|
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
|
|
env:
|
|
CMAKE_BUILD_TYPE: ${{ vars.CMAKE_BUILD_TYPE || 'RelWithDebInfo' }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ inputs.runs-on }}
|
|
outputs:
|
|
ffversion: ${{ steps.ffversion.outputs.ffversion }}
|
|
steps:
|
|
- name: checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: uname -a
|
|
run: uname -a
|
|
|
|
- name: cat /etc/os-release
|
|
run: cat /etc/os-release
|
|
|
|
- name: cat /proc/cpuinfo
|
|
run: cat /proc/cpuinfo
|
|
|
|
- name: add gcc-13 repo
|
|
run: sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
|
|
|
- name: install required packages
|
|
run: sudo apt-get update && sudo apt-get install -y gcc-13 jq libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev ocl-icd-opencl-dev libpulse-dev libdrm-dev libelf-dev libddcutil-dev libefl-all-dev libunwind-dev liblua5.4-dev libvdpau-dev libva-dev rpm ninja-build
|
|
|
|
- name: install linuxbrew packages
|
|
run: |
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
/home/linuxbrew/.linuxbrew/bin/brew install imagemagick chafa quickjs-ng --ignore-dependencies
|
|
|
|
- name: Initialize CodeQL
|
|
if: inputs.arch == 'amd64'
|
|
uses: github/codeql-action/init@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
|
|
with:
|
|
languages: c
|
|
|
|
- name: configure project
|
|
run: CC=gcc-13 CMAKE_PREFIX_PATH=/home/linuxbrew/.linuxbrew PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/lib/pkgconfig:$PKG_CONFIG_PATH cmake -GNinja -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On -DCMAKE_INSTALL_PREFIX=/usr .
|
|
|
|
- name: build project
|
|
run: cmake --build . --target package --verbose -j4
|
|
|
|
- name: perform CodeQL analysis
|
|
if: inputs.arch == 'amd64'
|
|
uses: github/codeql-action/analyze@cdf488f595d80d6e07e03d4674febd5ab45fa938 # v4.37.9
|
|
|
|
- name: list features
|
|
run: ./fastfetch --list-features
|
|
|
|
- name: run fastfetch
|
|
run: time ./fastfetch -c presets/ci.jsonc --stat false
|
|
|
|
- name: run fastfetch --format json
|
|
run: |
|
|
{ time -p ./fastfetch -c presets/ci.jsonc --format json > fastfetch.raw.json 2> fastfetch.error; } 2> fastfetch.time
|
|
sed -n '/^[[:space:]]*\[/,$p' fastfetch.raw.json > fastfetch.json
|
|
cat fastfetch.json
|
|
cat fastfetch.error >&2
|
|
cat fastfetch.time >&2
|
|
|
|
- name: prepare benchmark data
|
|
run: |
|
|
real_seconds=$(awk '$1 == "real" { print $2 }' fastfetch.time)
|
|
jq -e 'type == "array"' fastfetch.json > /dev/null
|
|
jq --arg platform "linux" --arg arch "${{ inputs.arch }}" --argjson real_seconds "$real_seconds" '
|
|
map(select(.stat | type == "number") | {
|
|
name: ("fastfetch " + $platform + " " + $arch + " module " + .type),
|
|
unit: "ms",
|
|
value: .stat
|
|
}) + [{
|
|
name: ("fastfetch " + $platform + " " + $arch + " total process time"),
|
|
unit: "ms",
|
|
value: ($real_seconds * 1000)
|
|
}]
|
|
' fastfetch.json > benchmark.json
|
|
cat benchmark.json
|
|
|
|
- name: run flashfetch
|
|
run: time ./flashfetch
|
|
|
|
- name: print dependencies
|
|
run: ldd fastfetch
|
|
|
|
- name: run tests
|
|
run: ctest --output-on-failure
|
|
|
|
- name: get fastfetch version
|
|
id: ffversion
|
|
run: echo "ffversion=$(./fastfetch --version-raw)" >> $GITHUB_OUTPUT
|
|
|
|
- name: polyfill glibc
|
|
run: |
|
|
wget https://github.com/CarterLi/polyfill-glibc/releases/download/v0.0.1/polyfill-glibc-${{ inputs.arch }} -O polyfill-glibc
|
|
chmod +x polyfill-glibc
|
|
strip fastfetch && ./polyfill-glibc fastfetch --target-glibc=2.17
|
|
strip flashfetch && ./polyfill-glibc flashfetch --target-glibc=2.17
|
|
echo 'set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-polyfilled")' >> CPackConfig.cmake
|
|
echo 'set(CPACK_PACKAGE_RELOCATABLE OFF)' >> CPackConfig.cmake
|
|
echo 'set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.17)")' >> CPackConfig.cmake
|
|
echo 'set(CPACK_RPM_SPEC_MORE_DEFINE "%global __os_install_post %{nil}")' >> CPackConfig.cmake
|
|
cpack -V
|
|
|
|
- name: upload artifacts
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: fastfetch-linux-${{ inputs.arch }}
|
|
path: ./fastfetch-*.*
|
|
|
|
- name: upload benchmark data
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: benchmark-linux-${{ inputs.arch }}
|
|
path: benchmark.json
|