mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-28 02:31:25 +01:00
0804fa306a
Bumps the github-actions group with 5 updates: | Package | From | To | | --- | --- | --- | | [cross-platform-actions/action](https://github.com/cross-platform-actions/action) | `1.5.0` | `1.6.0` | | [github/codeql-action/init](https://github.com/github/codeql-action) | `4.37.9` | `4.38.0` | | [github/codeql-action/analyze](https://github.com/github/codeql-action) | `4.37.9` | `4.38.0` | | [vmactions/solaris-vm](https://github.com/vmactions/solaris-vm) | `1.3.9` | `1.4.0` | | [signpath/github-action-submit-signing-request](https://github.com/signpath/github-action-submit-signing-request) | `2.3` | `3.0` | Updates `cross-platform-actions/action` from 1.5.0 to 1.6.0 - [Release notes](https://github.com/cross-platform-actions/action/releases) - [Changelog](https://github.com/cross-platform-actions/action/blob/master/changelog.md) - [Commits](https://github.com/cross-platform-actions/action/compare/faa0c6197e94aacf1c5956460152c8380d3560a5...e0b9770014ba65d5e0815f15b74031c3a635f641) Updates `github/codeql-action/init` from 4.37.9 to 4.38.0 - [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/cdf488f595d80d6e07e03d4674febd5ab45fa938...b96794f015dfd88f77b49b1c93e0fa7110f94c63) Updates `github/codeql-action/analyze` from 4.37.9 to 4.38.0 - [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/cdf488f595d80d6e07e03d4674febd5ab45fa938...b96794f015dfd88f77b49b1c93e0fa7110f94c63) Updates `vmactions/solaris-vm` from 1.3.9 to 1.4.0 - [Release notes](https://github.com/vmactions/solaris-vm/releases) - [Commits](https://github.com/vmactions/solaris-vm/compare/96d8d976f9e67d82ec6c7e8ce9c1060731f9e21c...a11f407d3720a3717673d4194f19ee63b284977e) Updates `signpath/github-action-submit-signing-request` from 2.3 to 3.0 - [Release notes](https://github.com/signpath/github-action-submit-signing-request/releases) - [Commits](https://github.com/signpath/github-action-submit-signing-request/compare/c92b958760219087e01f8d67a1669ed57afe2627...f6d04783b4569d051e0c80105fe66e82819d0092) --- updated-dependencies: - dependency-name: cross-platform-actions/action dependency-version: 1.6.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: github/codeql-action/init dependency-version: 4.38.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: github/codeql-action/analyze dependency-version: 4.38.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: vmactions/solaris-vm dependency-version: 1.4.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: signpath/github-action-submit-signing-request dependency-version: '3.0' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
147 lines
5.6 KiB
YAML
147 lines
5.6 KiB
YAML
name: Reusable Windows Hosts
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
arch:
|
|
required: true
|
|
type: string
|
|
runs-on:
|
|
required: true
|
|
type: string
|
|
msystem:
|
|
required: true
|
|
type: string
|
|
msystem-lower:
|
|
required: true
|
|
type: string
|
|
msys-arch:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
SIGNPATH_API_TOKEN:
|
|
description: SignPath REST API token used to submit the signing request
|
|
# Optional so that runs without the secret (pull requests, forks)
|
|
# still work; the signing step is skipped there anyway.
|
|
required: false
|
|
|
|
permissions:
|
|
contents: read
|
|
# The SignPath action reads job details and downloads the unsigned
|
|
# artifact with the workflow token.
|
|
actions: read
|
|
|
|
env:
|
|
CMAKE_BUILD_TYPE: ${{ vars.CMAKE_BUILD_TYPE || 'RelWithDebInfo' }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ inputs.runs-on }}
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- name: checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: setup-msys2
|
|
uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
|
|
with:
|
|
msystem: ${{ inputs.msystem }}
|
|
update: true
|
|
install: git mingw-w64-clang-${{ inputs.msys-arch }}-7zip mingw-w64-clang-${{ inputs.msys-arch }}-cmake mingw-w64-clang-${{ inputs.msys-arch }}-clang mingw-w64-clang-${{ inputs.msys-arch }}-jq mingw-w64-clang-${{ inputs.msys-arch }}-vulkan-loader mingw-w64-clang-${{ inputs.msys-arch }}-vulkan-headers mingw-w64-clang-${{ inputs.msys-arch }}-opencl-icd mingw-w64-clang-${{ inputs.msys-arch }}-opencl-headers mingw-w64-clang-${{ inputs.msys-arch }}-cppwinrt mingw-w64-clang-${{ inputs.msys-arch }}-imagemagick mingw-w64-clang-${{ inputs.msys-arch }}-chafa mingw-w64-clang-${{ inputs.msys-arch }}-lua mingw-w64-clang-${{ inputs.msys-arch }}-quickjs-ng mingw-w64-clang-${{ inputs.msys-arch }}-directx-headers
|
|
|
|
- name: print msys version
|
|
run: uname -a
|
|
|
|
- name: configure project
|
|
run: env PKG_CONFIG_PATH=/${{ inputs.msystem-lower }}/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
|
|
|
|
- name: build project
|
|
run: cmake --build . --verbose -j4
|
|
|
|
- name: copy necessary dlls
|
|
run: cp /${{ inputs.msystem-lower }}/bin/{lua55,libqjs-0}.dll .
|
|
|
|
- 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 "windows" --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
|
|
|
|
- if: github.event_name == 'push' && github.repository == 'fastfetch-cli/fastfetch'
|
|
id: upload-unsigned-artifact
|
|
name: upload artifacts for signing
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: fastfetch-windows-${{ inputs.arch }}
|
|
path: |
|
|
*.dll
|
|
fastfetch.exe
|
|
flashfetch.exe
|
|
|
|
- if: github.event_name == 'push' && github.repository == 'fastfetch-cli/fastfetch'
|
|
name: submit signing request
|
|
uses: signpath/github-action-submit-signing-request@f6d04783b4569d051e0c80105fe66e82819d0092 # v3.0
|
|
with:
|
|
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
|
|
organization-id: '${{ vars.SIGNPATH_ORG_ID }}'
|
|
project-slug: 'fastfetch'
|
|
signing-policy-slug: ${{ github.ref == 'refs/heads/master' && 'release-signing' || 'test-signing' }}
|
|
github-artifact-id: '${{ steps.upload-unsigned-artifact.outputs.artifact-id }}'
|
|
wait-for-completion: true
|
|
output-artifact-directory: '.'
|
|
|
|
- name: create zip archive
|
|
run: 7z a -tzip -mx9 -bd -y fastfetch-windows-${{ inputs.arch }}.zip LICENSE *.dll fastfetch.exe flashfetch.exe presets
|
|
|
|
- name: create 7z archive
|
|
run: 7z a -t7z -mx9 -bd -y fastfetch-windows-${{ inputs.arch }}.7z LICENSE *.dll fastfetch.exe flashfetch.exe presets
|
|
|
|
- name: upload true artifacts
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: fastfetch-windows-${{ inputs.arch }}
|
|
path: ./fastfetch-windows-${{ inputs.arch }}.*
|
|
overwrite: true
|
|
|
|
- name: upload benchmark data
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: benchmark-windows-${{ inputs.arch }}
|
|
path: benchmark.json
|