mirror of
https://github.com/edisionnano/QDiskInfo.git
synced 2026-03-07 11:59:57 +03:00
79 lines
2.5 KiB
YAML
79 lines
2.5 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-unix:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
clib: [glibc, musl]
|
|
include:
|
|
- clib: glibc
|
|
os: ubuntu-24.04
|
|
- clib: musl
|
|
os: ubuntu-latest
|
|
container: alpine:latest
|
|
runs-on: ${{ matrix.os }}
|
|
container:
|
|
image: ${{ matrix.container }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install dependencies for glibc
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y qt6-base-dev qt6-tools-dev qt6-svg-dev libgl1-mesa-dev libxkbcommon-dev libvulkan-dev qmake6 smartmontools qt6ct
|
|
if: ${{ matrix.clib == 'glibc' }}
|
|
- name: Install dependencies for musl
|
|
run: |
|
|
apk add git cmake make gcc g++ curl gcompat qt6-qtbase-dev qt6-qttools-dev qt6-qtbase-x11 qt6-qtsvg breeze smartmontools
|
|
git config --global --add safe.directory '*'
|
|
if: ${{ matrix.clib == 'musl' }}
|
|
|
|
- name: Build
|
|
run: |
|
|
cmake -Bbuild -DCMAKE_BUILD_TYPE:STRING=MinSizeRel -DQT_VERSION_MAJOR=6 -DENABLE_TRANSLATIONS=ON
|
|
cmake --build build
|
|
|
|
- name: Package AppImage
|
|
run: |
|
|
export APPIMAGE_EXTRACT_AND_RUN=1 ARCH=x86_64 VERSION=${{ matrix.clib }}
|
|
curl -sSfL "https://github.com/probonopd/go-appimage/releases/download/832/appimagetool-823-x86_64.AppImage" -o appimagetool-static.AppImage
|
|
chmod a+x *.AppImage
|
|
chmod a+x .github/scripts/smartctl
|
|
|
|
mkdir -p AppDir/usr/bin/../share/applications
|
|
cp build/QDiskInfo AppDir/usr/bin/
|
|
cp dist/QDiskInfo.desktop AppDir/usr/share/applications
|
|
cp dist/QDiskInfo.svg AppDir/QDiskInfo.svg
|
|
|
|
./appimagetool-static.AppImage -s deploy AppDir/usr/share/applications/*.desktop
|
|
cp .github/scripts/smartctl AppDir/usr/bin/ # done afterwards because patchelf errors out static bins
|
|
|
|
mkdir -p ./AppDir/usr/lib/x86_64-linux-gnu/qt6/plugins/platformthemes
|
|
cp -r /usr/lib/x86_64-linux-gnu/qt6/plugins/platformthemes \
|
|
./AppDir/usr/lib/x86_64-linux-gnu/qt6/plugins
|
|
|
|
./appimagetool-static.AppImage AppDir
|
|
|
|
- name: Upload AppImage
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: QDiskInfo-${{ matrix.clib }}-AppImage
|
|
path: ./QDiskInfo*.AppImage
|
|
|
|
- name: Upload Binaries
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: QDiskInfo-Qt6-${{ matrix.clib }}-bin
|
|
path: ./build/QDiskInfo
|
|
|