-
Notifications
You must be signed in to change notification settings - Fork 66
64 lines (50 loc) · 2.39 KB
/
linux.yml
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
name: Linux
on: [ push, pull_request ]
env:
BUILD_TYPE: Release
QT_VERSION: "6.8.0"
QT_ARCH: "linux_gcc_64"
jobs:
build:
# Qt 6 requires Ubuntu 20.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
cache: true
version: ${{env.QT_VERSION}}
arch: ${{env.QT_ARCH}}
- 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-x86_64.AppImage" -o ${{runner.workspace}}/linuxdeploy-x86_64.AppImage
curl -L "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage" -o ${{runner.workspace}}/linuxdeploy-plugin-appimage-x86_64.AppImage
curl -L "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" -o ${{runner.workspace}}/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x ${{runner.workspace}}/linuxdeploy-*.AppImage
- name: Copy OpenSSL
run: |
mkdir -p ${{runner.workspace}}/dist/usr/lib
cp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ${{runner.workspace}}/dist/usr/lib/
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 ${{runner.workspace}}/dist/usr/lib/
- name: Package
run: |
export OUTPUT="spotify-qt-$(git rev-parse --short HEAD)-x86_64.AppImage"
${{runner.workspace}}/linuxdeploy-x86_64.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@v4
with:
name: spotify-qt
path: ${{runner.workspace}}/spotify-qt/spotify-qt-*.AppImage