mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 10:52:08 +02:00
123 lines
3.5 KiB
YAML
123 lines
3.5 KiB
YAML
name: manage pushes
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
linux:
|
|
name: Linux
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
security-events: write
|
|
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 . -j$(nproc) --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
|
|
|
|
- name: run flashfetch
|
|
run: ./flashfetch
|
|
|
|
- name: run tests
|
|
run: ctest
|
|
|
|
- name: get fastfetch version
|
|
id: ffversion
|
|
run: echo "::set-output name=ffversion::$(./fastfetch --version-raw)"
|
|
|
|
- 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
|
|
steps:
|
|
- name: checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install required packages
|
|
run: brew install vulkan-loader libplist
|
|
|
|
- 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 . -j$(sysctl -n hw.logicalcpu) --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
|
|
|
|
- name: run flashfetch
|
|
run: ./flashfetch
|
|
|
|
- name: run tests
|
|
run: ctest
|
|
|
|
- name: upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: fastfetch-macos
|
|
path: ./fastfetch-*.*
|
|
|
|
release:
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'LinusDierheimer/fastfetch'
|
|
name: Release
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- linux
|
|
- macos
|
|
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/*
|