mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
c9bc1f8306
... so cmake can find it
303 lines
8.7 KiB
YAML
303 lines
8.7 KiB
YAML
name: manage pushes
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
linux:
|
|
name: Linux
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
outputs:
|
|
ffversion: ${{ steps.ffversion.outputs.ffversion }}
|
|
steps:
|
|
- name: checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install required packages
|
|
run: sudo apt-get update && sudo apt-get install -y libpci-dev libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev rpm librpm-dev libzstd-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libcjson-dev
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v2
|
|
with:
|
|
languages: c
|
|
|
|
- name: configure project
|
|
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
|
|
|
|
- name: build project
|
|
run: cmake --build . --target package
|
|
|
|
- name: perform CodeQL analysis
|
|
uses: github/codeql-action/analyze@v2
|
|
|
|
- name: run fastfetch
|
|
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all --unbuffered
|
|
|
|
- name: run flashfetch
|
|
run: ./flashfetch
|
|
|
|
- name: run tests
|
|
run: ctest
|
|
|
|
- name: get fastfetch version
|
|
id: ffversion
|
|
run: echo "ffversion=$(./fastfetch --version-raw)" >> $GITHUB_OUTPUT
|
|
|
|
- name: upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: fastfetch-linux
|
|
path: ./fastfetch-*.*
|
|
|
|
macos:
|
|
name: MacOS
|
|
runs-on: macos-latest
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
steps:
|
|
- name: checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install required packages
|
|
run: brew install vulkan-loader molten-vk
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v2
|
|
with:
|
|
languages: c
|
|
|
|
- name: configure project
|
|
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
|
|
|
|
- name: build project
|
|
run: cmake --build . --target package
|
|
|
|
- name: perform CodeQL analysis
|
|
uses: github/codeql-action/analyze@v2
|
|
|
|
- name: run fastfetch
|
|
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all --unbuffered
|
|
|
|
- name: run flashfetch
|
|
run: ./flashfetch
|
|
|
|
- name: run tests
|
|
run: ctest
|
|
|
|
- name: upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: fastfetch-macos
|
|
path: ./fastfetch-*.*
|
|
|
|
freebsd:
|
|
name: FreeBSD
|
|
runs-on: macos-12
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
steps:
|
|
- name: checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: run VM
|
|
uses: vmactions/freebsd-vm@v0
|
|
with:
|
|
prepare: |
|
|
pkg install -y cmake git pkgconf pciutils wayland vulkan-headers vulkan-loader libxcb libXrandr libX11 glib dconf dbus sqlite3-tcl xfce4-conf ImageMagick6 ImageMagick7 chafa egl libosmesa opencl ocl-icd
|
|
run: |
|
|
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
|
|
cmake --build . --target package
|
|
./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all --unbuffered
|
|
./flashfetch
|
|
ctest
|
|
|
|
- name: upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: fastfetch-freebsd
|
|
path: ./fastfetch-*.*
|
|
|
|
windows:
|
|
name: Windows
|
|
runs-on: windows-latest
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- name: checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: setup-msys2
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: CLANG64
|
|
update: true
|
|
install: git mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-cjson mingw-w64-clang-x86_64-vulkan-loader mingw-w64-clang-x86_64-opencl-icd
|
|
|
|
- name: print msys version
|
|
run: uname -a
|
|
|
|
# https://github.com/msys2/MINGW-packages/issues/13524#event-7555720785
|
|
- name: create OpenCL.pc
|
|
run: |
|
|
cat > /clang64/lib/pkgconfig/OpenCL.pc << EOF
|
|
prefix=/clang64
|
|
exec_prefix=${prefix}
|
|
libdir=${exec_prefix}/lib
|
|
includedir=${prefix}/include
|
|
|
|
Name: OpenCL
|
|
Description: Open Computing Language generic Installable Client Driver Loader
|
|
Version: 2022.09.30-1
|
|
Libs: -L${libdir} -lOpenCL.dll
|
|
Cflags: -I${includedir}
|
|
EOF
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v2
|
|
with:
|
|
languages: c, cpp
|
|
|
|
- name: configure project
|
|
run: env PKG_CONFIG_PATH=/clang64/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
|
|
|
|
- name: build project
|
|
run: cmake --build .
|
|
|
|
- name: perform CodeQL analysis
|
|
uses: github/codeql-action/analyze@v2
|
|
|
|
- name: copy necessary dlls
|
|
run: cp /clang64/bin/{libcjson,libOpenCL,vulkan-1}.dll .
|
|
|
|
- name: run fastfetch
|
|
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all --unbuffered
|
|
|
|
- name: run flashfetch
|
|
run: ./flashfetch
|
|
|
|
- name: run tests
|
|
run: ctest
|
|
|
|
- name: upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: fastfetch-windows
|
|
path: |
|
|
./*.dll
|
|
./fastfetch.exe
|
|
./flashfetch.exe
|
|
|
|
windows-old:
|
|
name: Windows-old
|
|
runs-on: windows-latest
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- name: checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: setup-msys2
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: MINGW64
|
|
update: true
|
|
install: git mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-cjson mingw-w64-x86_64-vulkan-loader mingw-w64-x86_64-opencl-icd
|
|
|
|
- name: print msys version
|
|
run: uname -a
|
|
|
|
# https://github.com/msys2/MINGW-packages/issues/13524#event-7555720785
|
|
- name: create OpenCL.pc
|
|
run: |
|
|
cat > /mingw64/lib/pkgconfig/OpenCL.pc << EOF
|
|
prefix=/mingw64
|
|
exec_prefix=${prefix}
|
|
libdir=${exec_prefix}/lib
|
|
includedir=${prefix}/include
|
|
|
|
Name: OpenCL
|
|
Description: Open Computing Language generic Installable Client Driver Loader
|
|
Version: 2022.09.30-1
|
|
Libs: -L${libdir} -lOpenCL.dll
|
|
Cflags: -I${includedir}
|
|
EOF
|
|
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v2
|
|
with:
|
|
languages: c, cpp
|
|
|
|
- name: configure project
|
|
run: env PKG_CONFIG_PATH=/mingw64/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
|
|
|
|
- name: build project
|
|
run: cmake --build .
|
|
|
|
- name: perform CodeQL analysis
|
|
uses: github/codeql-action/analyze@v2
|
|
|
|
- name: copy necessary dlls
|
|
run: cp /mingw64/bin/{libcjson,libOpenCL,vulkan-1}.dll .
|
|
|
|
- name: run fastfetch
|
|
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all --unbuffered
|
|
|
|
- name: run flashfetch
|
|
run: ./flashfetch
|
|
|
|
- name: run tests
|
|
run: ctest
|
|
|
|
- name: upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: fastfetch-windows-old
|
|
path: |
|
|
./*.dll
|
|
./fastfetch.exe
|
|
./flashfetch.exe
|
|
|
|
release:
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'LinusDierheimer/fastfetch'
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- linux
|
|
- macos
|
|
- freebsd
|
|
- windows
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: download artifacts
|
|
uses: actions/download-artifact@v3
|
|
|
|
- name: get latest release version
|
|
id: get_version_release
|
|
uses: pozetroninc/github-action-get-latest-release@master
|
|
with:
|
|
repository: ${{ github.repository }}
|
|
|
|
- name: create release
|
|
if: needs.linux.outputs.ffversion != steps.get_version_release.outputs.release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: ${{ needs.linux.outputs.ffversion }}
|
|
commit: ${{ github.sha }}
|
|
artifactErrorsFailBuild: true
|
|
artifacts: fastfetch-linux/*,fastfetch-macos/*,fastfetch-freebsd/*,fastfetch-windows/*
|