Skip to content

Commit

Permalink
CI: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgesStavracas committed Feb 23, 2024
1 parent ba4f17e commit 791b4b4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/actions/flatpak-builder-lint/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run flatpak-builder-lint
description: Runs flatpak-builder-lint with exceptions
inputs:
artifact:
description: Type of artifact to lint (builddir, repo, manifest)
description: Type of artifact to lint (builddir, repo, manifest, appstream)
required: true
path:
description: Path to flatpak-builder manifest or Flatpak build directory
Expand All @@ -23,6 +23,7 @@ runs:
builddir);;
repo);;
manifest);;
appstream);;
*)
echo "::error::Given artifact type is incorrect"
exit 2
Expand All @@ -36,7 +37,20 @@ runs:
run: |
: Run flatpak-builder-lint
exit_code=0
ret=$(flatpak-builder-lint --exceptions ${{ inputs.artifact }} ${{ inputs.path }}) || exit_code=$?
ls -Rla ${{ inputs.path }}
case "${{ inputs.artifact }}" in
builddir)
repo)
manifest)
ret=$(flatpak-builder-lint --exceptions ${{ inputs.artifact }} ${{ inputs.path }}) || exit_code=$?
;;
appstream)
ret=$(flatpak-builder-lint --exceptions ${{ inputs.artifact }} ${{ inputs.path }}) || exit_code=$?
;;
esac
if [[ $exit_code != 0 && -z "$ret" ]]; then
echo "::error::Error while running flatpak-builder-lint"
exit 2
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,19 @@ jobs:
cache-key: ${{ steps.setup.outputs.cacheKey }}
mirror-screenshots-url: https://dl.flathub.org/media

- name: Validate AppStream
uses: ./.github/actions/flatpak-builder-lint
with:
artifact: appstream
path: flatpak_app

- name: Verify Icon and Metadata in app-info
working-directory: ${{ env.FLATPAK_BUILD_PATH }}
run: |
: Verify Icon and Metadata in app-info
test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "Missing 128x128 icon in app-info!"; exit 1; }
test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "Missing com.obsproject.Studio.xml.gz in app-info!"; exit 1; }
- name: Validate build directory
uses: ./.github/actions/flatpak-builder-lint
with:
Expand Down

0 comments on commit 791b4b4

Please sign in to comment.