Skip to content

Commit

Permalink
Merge pull request fastfetch-cli#801 from fastfetch-cli/dev
Browse files Browse the repository at this point in the history
Release: v2.10.0
  • Loading branch information
CarterLi authored Apr 22, 2024
2 parents 6769410 + a1c9b24 commit 510a1f5
Show file tree
Hide file tree
Showing 45 changed files with 3,643 additions and 658 deletions.
132 changes: 80 additions & 52 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,58 +19,6 @@ jobs:
- name: Run Spellchecker
run: codespell

linux-buildtest:
name: Linux build test
permissions:
contents: read
strategy:
fail-fast: false
matrix:
compiler: [
{ cc: gcc, cxx: "g++" },
{ cc: clang, cxx: "clang++" },
{ cc: "musl-gcc", cxx: "musl-g++" }
]
enableFeatures: [ON, OFF]
exclude:
# The feature libraries are all build against glibc, so they can't be used with musl
- compiler: { cc: "musl-gcc", cxx: "musl-g++" }
enableFeatures: ON
runs-on: ubuntu-22.04
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: uname -a
run: uname -a

- name: install required packages
run: sudo apt-get update && sudo apt-get install -y musl-dev musl-tools linux-headers-generic libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libnm-dev libpulse-dev libddcutil-dev libchafa-dev libdrm-dev directx-headers-dev

- name: configure project
env:
CC: ${{ matrix.compiler.cc }}
CXX: ${{ matrix.compiler.cxx }}
run: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_VULKAN=${{ matrix.enableFeatures }} -DENABLE_WAYLAND=${{ matrix.enableFeatures }} -DENABLE_XCB_RANDR=${{ matrix.enableFeatures }} -DENABLE_XCB=${{ matrix.enableFeatures }} -DENABLE_XRANDR=${{ matrix.enableFeatures }} -DENABLE_X11=${{ matrix.enableFeatures }} -DENABLE_GIO=${{ matrix.enableFeatures }} -DENABLE_DCONF=${{ matrix.enableFeatures }} -DENABLE_DBUS=${{ matrix.enableFeatures }} -DENABLE_XFCONF=${{ matrix.enableFeatures }} -DENABLE_SQLITE3=${{ matrix.enableFeatures }} -DENABLE_RPM=${{ matrix.enableFeatures }} -DENABLE_IMAGEMAGICK7=${{ matrix.enableFeatures }} -DENABLE_IMAGEMAGICK6=${{ matrix.enableFeatures }} -DENABLE_CHAFA=${{ matrix.enableFeatures }} -DENABLE_ZLIB=${{ matrix.enableFeatures }} -DENABLE_EGL=${{ matrix.enableFeatures }} -DENABLE_GLX=${{ matrix.enableFeatures }} -DENABLE_OSMESA=${{ matrix.enableFeatures }} -DENABLE_OPENCL=${{ matrix.enableFeatures }} -DENABLE_LIBNM=${{ matrix.enableFeatures }} -DENABLE_PULSE=${{ matrix.enableFeatures }} -DENABLE_DIRECTX_HEADERS=${{ matrix.enableFeatures }} -DENABLE_DRM=${{ matrix.enableFeatures }} -DENABLE_DDCUTIL=${{ matrix.enableFeatures }} -DENABLE_CHAFA=${{ matrix.enableFeatures }} .

- name: build project
run: cmake --build . --verbose -j4

- name: run tests
run: ctest

- name: run fastfetch --list-features
run: ./fastfetch --list-features

- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc

- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json

- name: run flashfetch
run: time ./flashfetch

Linux-old-amd64:
name: Linux-old-amd64
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -230,6 +178,84 @@ jobs:
name: fastfetch-linux-aarch64
path: ./fastfetch-*.*

musl-amd64:
name: Musl-amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: setup alpine linux
uses: jirutka/setup-alpine@master

- name: install dependencies
run: |
cat /etc/alpine-release
uname -a
apk add cmake samurai vulkan-loader-dev libxcb-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev gcc g++
shell: alpine.sh --root {0}

- name: build
run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr -DIS_MUSL=ON -GNinja .
cmake --build . --target package --verbose -j4
shell: alpine.sh {0}

- name: run
run: |
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
shell: alpine.sh {0}

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-musl-amd64
path: ./fastfetch-*.*

musl-aarch64:
name: Musl-aarch64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: setup alpine linux
uses: jirutka/setup-alpine@master
with:
arch: aarch64

- name: install dependencies
run: |
cat /etc/alpine-release
uname -a
apk add cmake samurai vulkan-loader-dev libxcb-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev gcc g++
shell: alpine.sh --root {0}

- name: build
run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr -DIS_MUSL=ON -GNinja .
cmake --build . --target package --verbose -j4
shell: alpine.sh {0}

- name: run
run: |
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
shell: alpine.sh {0}

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-musl-aarch64
path: ./fastfetch-*.*

macos-universal:
name: macOS-universal
runs-on: macos-latest
Expand Down Expand Up @@ -495,6 +521,8 @@ jobs:
needs:
- linux-amd64
- linux-aarch64
- musl-amd64
- musl-aarch64
- macos-universal
- freebsd-amd64
- freebsd-aarch64
Expand Down
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# 2.10.0

Changes:
* We now always detect max frequency of GPUs for consistent, instead of current frequency

Features:
* Improve display detection for wlroots based WMs. Fastfetch now correctly reports fractional scale factors in hyprland (Display, Linux)
* Improve GPU detection on Linux (GPU, Linux)
* Support GPU memory usage detection for AMD GPUs
* Support GPU frequency detection for Intel GPUs
* Improve performance of Gnome version detection (DE, Linux)
* Improve performance of kitty version detection (Terminal, Linux)
* Detect refresh rate when using `--ds-force-drm sysfs-only` (Display, Linux)
* Add option `--ts-version` to disable terminal and shell version detection. Mainly for benchmarking purposes
* Improve performance of detecting WSL version (Host, Linux)

Bugfixes:
* Correctly detect `/bin/sh` as current shell if it's used as default shell (#798, Shell, Linux)
* Work around an issue which CPU module reports incorrect CPU frequency that is too high (#800, CPU, Linux)
* Don't print ANSI escape codes in `--pipe` mode

# 2.9.2

Changes:
Expand Down
25 changes: 20 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.9.2
VERSION 2.10.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -75,6 +75,7 @@ option(ENABLE_ASAN "Build fastfetch with ASAN (address sanitizer)" OFF)
option(ENABLE_PROPRIETARY_GPU_DRIVER_API "Enable proprietary GPU driver API (NVML, IGCL and AGS)" ON)
option(BUILD_TESTS "Build tests" OFF) # Also create test executables
option(SET_TWEAK "Add tweak to project version" ON) # This is set to off by github actions for release builds
option(IS_MUSL "Build with musl libc" OFF) # Used by Github Actions

if (LINUX)
set(CUSTOM_PCI_IDS_PATH "" CACHE STRING "Custom path to file pci.ids, defaults to `/usr/share/hwdata/pci.ids`")
Expand Down Expand Up @@ -399,7 +400,10 @@ if(LINUX)
src/detection/diskio/diskio_linux.c
src/detection/displayserver/linux/displayserver_linux.c
src/detection/displayserver/linux/drm.c
src/detection/displayserver/linux/wayland.c
src/detection/displayserver/linux/wayland/wayland.c
src/detection/displayserver/linux/wayland/global-output.c
src/detection/displayserver/linux/wayland/zwlr-output.c
src/detection/displayserver/linux/wayland/wlr-output-management-unstable-v1-protocol.c
src/detection/displayserver/linux/wmde.c
src/detection/displayserver/linux/xcb.c
src/detection/displayserver/linux/xlib.c
Expand Down Expand Up @@ -517,7 +521,10 @@ elseif(BSD)
src/detection/diskio/diskio_bsd.c
src/detection/displayserver/linux/displayserver_linux.c
src/detection/displayserver/linux/drm.c
src/detection/displayserver/linux/wayland.c
src/detection/displayserver/linux/wayland/wayland.c
src/detection/displayserver/linux/wayland/global-output.c
src/detection/displayserver/linux/wayland/zwlr-output.c
src/detection/displayserver/linux/wayland/wlr-output-management-unstable-v1-protocol.c
src/detection/displayserver/linux/wmde.c
src/detection/displayserver/linux/xcb.c
src/detection/displayserver/linux/xlib.c
Expand Down Expand Up @@ -1131,11 +1138,19 @@ else() # We don't use this in Windows
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(CMAKE_SYSTEM_PROCESSOR "amd64")
endif()
string(TOLOWER "${CMAKE_PROJECT_NAME}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" CPACK_PACKAGE_FILE_NAME)
if(IS_MUSL)
string(TOLOWER "${CMAKE_PROJECT_NAME}-musl-${CMAKE_SYSTEM_PROCESSOR}" CPACK_PACKAGE_FILE_NAME)
else()
string(TOLOWER "${CMAKE_PROJECT_NAME}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" CPACK_PACKAGE_FILE_NAME)
endif()
endif()

if(LINUX)
set(CPACK_GENERATOR "${CPACK_GENERATOR};DEB;RPM")
find_program(HAVE_DPKG "dpkg")
find_program(HAVE_RPMBUILD "rpmbuild")
if(HAVE_DPKG AND HAVE_RPMBUILD)
set(CPACK_GENERATOR "${CPACK_GENERATOR};DEB;RPM")
endif()

set(CPACK_DEBIAN_PACKAGE_SECTION, "utils")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ There are [screenshots on different platforms](https://github.com/fastfetch-cli/

### Linux

Some distros packaged a outdated fastfetch version. Older version is not supported, please always ensure that the latest version is used.
Some distros packaged an outdated fastfetch version. Older version is not supported, please always ensure that the latest version is used.

* Ubuntu: [`ppa:zhangsongcui3371/fastfetch`](https://launchpad.net/~zhangsongcui3371/+archive/ubuntu/fastfetch) (for Ubuntu 22.04 or above)
* Debian / Ubuntu: Download `fastfetch-<version>-Linux.deb` from [Github release page](https://github.com/fastfetch-cli/fastfetch/releases/latest) and `dpkg -i fastfetch-<version>-Linux.deb` (for Ubuntu 22.04 or above and Debian 12 or above).
* Arch Linux: `sudo pacman -S fastfetch`. You can also find fastfetch [on the AUR](https://aur.archlinux.org/packages/fastfetch-git).
* Arch Linux: `sudo pacman -S fastfetch`
* Fedora: `sudo dnf install fastfetch`
* Gentoo: `sudo emerge --ask app-misc/fastfetch`
* Alpine: `apk add --upgrade fastfetch`
Expand All @@ -41,7 +41,9 @@ Some distros packaged a outdated fastfetch version. Older version is not support

Replace sudo with doas depending on what you use.

[See also if fastfetch has been packaged for your favorite Linux distro](#Packaging)
[See also if fastfetch has been packaged for your favorite Linux distro](#Packaging).

If fastfetch is not packaged for your distro or an outdated version is packaged, [linuxbrew](https://brew.sh/) is a good alternate: `brew install fastfetch`

### macOS

Expand Down
12 changes: 12 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
fastfetch (2.9.2) jammy; urgency=medium

* Update to 2.9.2

-- Carter Li <[email protected]> Tue, 16 Apr 2024 16:32:40 +0800

fastfetch (2.9.1) jammy; urgency=medium

* Update to 2.9.1

-- Carter Li <[email protected]> Mon, 08 Apr 2024 09:34:30 +0800

fastfetch (2.8.10) jammy; urgency=medium

* Update to 2.8.10
Expand Down
2 changes: 1 addition & 1 deletion debian/files
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fastfetch_2.8.10_source.buildinfo universe/utils optional
fastfetch_2.9.2_source.buildinfo universe/utils optional
5 changes: 5 additions & 0 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,11 @@
"type": "boolean",
"description": "Whether to disable the stdout application buffer",
"default": false
},
"tsVersion": {
"type": "boolean",
"description": "Whether to detect and display the version of terminal and shell. Mainly for benchmarking",
"default": true
}
}
},
Expand Down
Loading

0 comments on commit 510a1f5

Please sign in to comment.