mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
0ae71b69ce
Bumps the github-actions group with 2 updates: [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) and [signpath/github-action-submit-signing-request](https://github.com/signpath/github-action-submit-signing-request). Updates `docker/setup-qemu-action` from 4.1.0 to 4.2.0 - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](https://github.com/docker/setup-qemu-action/compare/06116385d9baf250c9f4dcb4858b16962ea869c3...96fe6ef7f33517b61c61be40b68a1882f3264fb8) Updates `signpath/github-action-submit-signing-request` from 1.3 to 2.2 - [Release notes](https://github.com/signpath/github-action-submit-signing-request/releases) - [Commits](https://github.com/signpath/github-action-submit-signing-request/compare/ced31329c0317e779dad2eec2a7c3bb46ea1343e...b9d91eadd323de506c0c81cf0c7fe7438f3360fd) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-version: 4.2.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: '2.2' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
119 lines
4.4 KiB
YAML
119 lines
4.4 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 }}-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 ./fastfetch -c presets/ci.jsonc --format 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@b9d91eadd323de506c0c81cf0c7fe7438f3360fd # v2.2
|
|
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
|