forked from kraxarn/spotify-qt
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (66 loc) · 2.92 KB
/
Copy pathlinux.yml
File metadata and controls
81 lines (66 loc) · 2.92 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Linux
on: [ push, pull_request ]
env:
BUILD_TYPE: Release
QT_VERSION: "6.10.3"
QT_ARCH: "linux_gcc_64"
jobs:
build:
name: "${{matrix.arch}}"
runs-on: ${{matrix.os}}
strategy:
matrix:
include:
- arch: "x86_64"
# Qt 6 requires Ubuntu 22.04 on x86_64
# https://doc.qt.io/qt-6/linux.html
os: ubuntu-22.04
qt-arch: "linux_gcc_64"
qt-host: "linux"
- arch: "aarch64"
# Qt 6 requires Ubuntu 24.04 on arm64
# https://doc.qt.io/qt-6/linux.html
os: ubuntu-24.04-arm
qt-arch: "linux_gcc_arm64"
qt-host: "linux_arm64"
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
cache: true
version: ${{env.QT_VERSION}}
arch: ${{matrix.qt-arch}}
host: ${{matrix.qt-host}}
modules: "qtwaylandcompositor"
- name: Install Dependencies
run: sudo apt install libxkbcommon-x11-dev libxcb-cursor-dev -y
- name: Configure CMake
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=/usr -DUSE_TESTS=ON -DUSE_LTO=ON
- name: Build
run: cmake --build . --config $BUILD_TYPE
- name: Test
run: ${{runner.workspace}}/spotify-qt/lib/test/spotify-qt-lib-test
- name: Install
run: make DESTDIR="${{runner.workspace}}/dist" install
- name: Download linuxdeploy
run: |
curl -L "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${{matrix.arch}}.AppImage" -o ${{runner.workspace}}/linuxdeploy-${{matrix.arch}}.AppImage
curl -L "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-${{matrix.arch}}.AppImage" -o ${{runner.workspace}}/linuxdeploy-plugin-appimage-${{matrix.arch}}.AppImage
curl -L "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-${{matrix.arch}}.AppImage" -o ${{runner.workspace}}/linuxdeploy-plugin-qt-${{matrix.arch}}.AppImage
chmod +x ${{runner.workspace}}/linuxdeploy-*.AppImage
- name: Package
env:
EXTRA_QT_PLUGINS: "waylandcompositor"
EXTRA_PLATFORM_PLUGINS: "libqwayland.so"
run: |
export OUTPUT="spotify-qt-$(git rev-parse --short HEAD)-${{matrix.arch}}.AppImage"
${{runner.workspace}}/linuxdeploy-${{matrix.arch}}.AppImage --appdir ${{runner.workspace}}/dist --output appimage --plugin qt -d ${{runner.workspace}}/dist/usr/share/applications/spotify-qt.desktop
- name: Upload Artifact
uses: actions/upload-artifact@v7
with:
name: spotify-qt-linux-${{matrix.arch}}
archive: false
path: ${{runner.workspace}}/spotify-qt/spotify-qt-*.AppImage