-
Notifications
You must be signed in to change notification settings - Fork 19
131 lines (112 loc) · 4.58 KB
/
ubuntu.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Ubuntu
on:
push:
paths:
- "*.txt"
- "src/**"
- "!**.qml"
- "!**.md"
- "!**.cmake"
- ".github/**"
pull_request:
paths:
- "src/**"
- "!**.qml"
- "!**.md"
- "!**.cmake"
workflow_dispatch:
permissions: write-all
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
qt_ver: [6.6.1]
qt_arch: [gcc_64]
env:
targetName: sast-music
QT_MODULES: "qt5compat qthttpserver qtshadertools qtmultimedia"
steps:
- name: check out repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
cache: ${{ steps.cache-qt.outputs.cache-hit }}
arch: ${{ matrix.qt_arch }}
modules: ${{ env.QT_MODULES }}
- name: setup Ninja
uses: ashutoshvarma/[email protected]
with:
version: "1.11.1"
- name: install GL library (Ubuntu)
run: sudo apt-get install -y libxcb-cursor0 libgl1-mesa-dev libxcb1-dev libgtk-3-dev libxkbcommon-x11-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-sync-dev libxcb-render-util0-dev libxcb-shm0-dev
- name: ubuntu install libfuse2
run: sudo apt install libfuse2
- name: install Fcitx5 for Qt
run: |
sudo apt-get install -y extra-cmake-modules
git clone --depth 1 --branch 5.1.1 https://github.com/fcitx/fcitx5-qt
cmake -DBUILD_ONLY_PLUGIN=ON -DENABLE_QT4=OFF -DENABLE_QT5=OFF -DENABLE_QT6=ON -G Ninja -S ./fcitx5-qt -B ./fcitx5-qt-build -DCMAKE_PREFIX_PATH=${{ env.Qt6_DIR }} -DCMAKE_BUILD_TYPE=Release
cmake --build ./fcitx5-qt-build --parallel --config Release
cmake --install ./fcitx5-qt-build
- name: Configure CMake
run: cmake -G Ninja -S ${{ github.workspace }} -B ${{ github.workspace }}/build -DCMAKE_PREFIX_PATH=${{ env.Qt6_DIR }} -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ${{ github.workspace }}/build --config Release --parallel
- name: install Qt linux deploy
uses: miurahr/install-linuxdeploy-action@v1
with:
plugins: qt appimage
- name: package
env:
EXTRA_QT_PLUGINS: qt5compat
run: |
export QML_SOURCES_PATHS=./
echo "[Desktop Entry]" > sast-music-appimage.desktop
echo "Categories=X-Multimedia;" >> sast-music-appimage.desktop
echo "Icon=app_icon" >> sast-music-appimage.desktop
echo "Name=SAST Music" >> sast-music-appimage.desktop
echo "Type=Application" >> sast-music-appimage.desktop
echo "Exec=sast-music" >> sast-music-appimage.desktop
mv bin/release/sast_music bin/release/sast-music
linuxdeploy-x86_64.AppImage --plugin=qt --output=appimage --desktop-file=sast-music-appimage.desktop --icon-file=app_icon.svg --executable=bin/release/sast-music --appdir AppDir
mv SAST_Music-*.AppImage ${{ env.targetName }}_appimage_x86_64.AppImage
- name: Calculate SHA256
run: |
touch sast-music.sha256
sha256sum ${{ env.targetName }}_appimage_x86_64.AppImage > sast-music.sha256
echo "SHA256 value is:"
cat sast-music.sha256
- uses: actions/upload-artifact@v2
if: startsWith(github.event.ref, 'refs/tags/')
with:
name: ${{ env.targetName }}_sha256
path: sast-music.sha256
- name: upload SHA256
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: sast-music.sha256
asset_name: sast-music-appimage.sha256
tag: ${{ github.ref }}
overwrite: true
- uses: actions/upload-artifact@v2
if: startsWith(github.event.ref, 'refs/tags/')
with:
name: ${{ env.targetName }}_appimage_x86_64.AppImage
path: ${{ env.targetName }}_appimage_x86_64.AppImage
- name: upload release
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.targetName }}_appimage_x86_64.AppImage
asset_name: ${{ env.targetName }}_appimage_x86_64.AppImage
tag: ${{ github.ref }}
overwrite: true