Skip to content

No need to install missing depends if no need to extract preloads #34

No need to install missing depends if no need to extract preloads

No need to install missing depends if no need to extract preloads #34

Workflow file for this run

name: Build flatpak manifest
on:
pull_request:
branches:
- master
push:
branches:
- master
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
container:
# https://github.com/flatpak/flatpak-github-actions?tab=readme-ov-file#docker-image
image: bilelmoussaoui/flatpak-github-actions:freedesktop-23.08
options: --privileged
permissions:
contents: read
strategy:
matrix:
arch:
- x86_64
- aarch64
steps:
- uses: actions/checkout@v4
- name: Install deps
if: ${{ matrix.arch == 'aarch64' }}
run: dnf -y install docker
- name: Setup QEMU
if: ${{ matrix.arch == 'aarch64' }}
id: qemu
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Get QQ version in manifest
id: qq-version
shell: bash
run: |
_arch=$(flatpak --default-arch)
_manifest=$(flatpak-builder --show-manifest com.qq.QQ.yaml)
_extra_datas=$(echo "$_manifest" | jq -r ".modules[].sources | map(select(.type == \"extra-data\")) | select(length > 0)")
_qq=$(echo "$_extra_datas" | jq -r "map(select(.\"only-arches\" | contains([\"$_arch\"])))")
_url=$(echo "$_qq" | jq -r ".[0].url")
_version=$(echo "${_url##*/}" | cut -d _ -f 2,3)
echo "version=$_version" >> $GITHUB_OUTPUT
- name: Cache preloads-${{ steps.qq-version.outputs.version }}.tar.gz
uses: actions/cache@v4
id: cache
with:
path: preloads-${{ steps.qq-version.outputs.version }}.tar.gz
key: ${{ matrix.arch }}-${{ steps.qq-version.outputs.version }}
- name: Install missing depends to run QQ
if: steps.cache.outputs.cache-hit != 'true'
run: dnf -y install jq bsdtar nss at-spi2-atk cups-libs gtk3 mesa-libgbm
- name: Generate preloads
if: steps.cache.outputs.cache-hit != 'true'
run: bash extract-preloads.sh
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: com.qq.QQ.flatpak
manifest-path: com.qq.QQ.yaml
arch: ${{ matrix.arch }}
branch: liteloader