forked from happycube/ld-decode
-
Notifications
You must be signed in to change notification settings - Fork 54
85 lines (68 loc) · 2.86 KB
/
build_linux_tools.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: "Build Linux tools"
on:
workflow_dispatch:
env:
FLALDF_FILE: "FlaLDF-v0.1-2-linux-x64.tar.gz"
FLALDF_URL: "https://github.com/TokugawaHeavyIndustries/FlaLDF/releases/download/v0.1b/FlaLDF-v0.1-2-linux-x64.tar.gz"
APPIMAGE_FILE: "linuxdeploy-x86_64.AppImage"
APPIMAGE_URL: "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
APPIMAGE_PLUGIN_FILE: "linuxdeploy-plugin-appimage-x86_64.AppImage"
APPIMAGE_PLUGIN_URL: "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage"
APPIMAGE_QT_FILE: "linuxdeploy-plugin-qt-x86_64.AppImage"
APPIMAGE_QT_URL: "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage"
jobs:
build-tbc-tools:
name: Build tbc-tools (x86_64)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup environment
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: >-
git make cmake pkg-config openssl
qt5-qmake qtbase5-dev libqwt-qt5-dev libfftw3-dev
ffmpeg libavformat-dev libavcodec-dev libavutil-dev
version: 1.0
- name: Create release directory
run: mkdir release/
- name: Build
run: |
cmake -B _build \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_QT_VERSION=5 \
-DBUILD_PYTHON=false
cmake --build _build
cmake --install _build --prefix AppDir/usr
- name: Download linuxdeploy and build AppImage
run: |
curl -LJO ${{ env.APPIMAGE_URL }}
curl -LJO ${{ env.APPIMAGE_PLUGIN_URL }}
curl -LJO ${{ env.APPIMAGE_QT_URL }}
chmod +x ${{ env.APPIMAGE_FILE }} ${{ env.APPIMAGE_PLUGIN_FILE }} ${{ env.APPIMAGE_QT_FILE }}
./${{ env.APPIMAGE_FILE }} \
--plugin qt \
--desktop-file resources/appimage/tools/tbc-tools.desktop \
--icon-file assets/icons/vhs-decode.png \
--appdir AppDir/ \
--output appimage \
--custom-apprun resources/appimage/tools/AppRun
cp tbc-tools-x86_64.AppImage release/
- name: Download FlaLDF
run: |
curl -LJO ${{ env.FLALDF_URL }}
tar -xvf ${{ env.FLALDF_FILE }}
cp flaldf release/
- name: Copy scripts
run: find scripts scripts/linux -maxdepth 1 -type f -executable -exec cp {} release/ \;
- name: Create release archive
run: tar -cvjSf tbc-tools.tar.bz2 --transform s/release/tbc-tools/ release/
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: tbc-tools_linux_x86_64
path: tbc-tools.tar.bz2
if-no-files-found: error