forked from flathub/com.qq.QQ
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (60 loc) · 2.02 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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: Install missing depends
run: dnf -y install jq bsdtar nss at-spi2-atk cups-libs
- 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 QQ-${{ steps.qq-version.outputs.version }} deb
uses: actions/cache@v4
with:
path: qq-${{ steps.qq-version.outputs.version }}.deb
key: ${{ matrix.arch }}-${{ steps.qq-version.outputs.version }}
- name: Generate preloads
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