Fix topbar breaking on watch view error #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ "master" ] | |
paths-ignore: | |
- '**.md' | |
- '**/LICENSE' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '**/LICENSE' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
name: Ubuntu | |
qt_ver: 6 | |
qt_host: linux | |
qt_version: '6.6.0' | |
qt_modules: 'qt5compat qtserialport qtpositioning qtwebchannel qtwebengine' | |
- os: ubuntu-latest | |
name: Ubuntu-Legacy | |
qt_ver: 5 | |
qt_host: linux | |
qt_version: '5.15.2' | |
qt_modules: 'qtwebengine' | |
#- os: windows-2022 | |
#qt_ver: 6 | |
#qt_host: windows | |
#qt_version: '6.5.1' | |
#qt_modules: 'qt5compat qtserialport qtpositioning qtwebchannel qtwebengine' | |
runs-on: ${{ matrix.os }} | |
env: | |
INSTALL_DIR: "install" | |
INSTALL_APPIMAGE_DIR: "install-appimage" | |
BUILD_DIR: "build" | |
BUILD_TYPE: Debug | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Set up GCC | |
if: runner.os == 'Linux' | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: 12 | |
- name: Set up MSVC | |
if: runner.os == 'Windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install NSIS | |
if: runner.os == 'Windows' | |
run: | | |
iex "& {$(irm get.scoop.sh)} -RunAsAdmin" | |
scoop bucket add extras | |
scoop install nsis | |
- name: Set environment variables | |
shell: bash | |
run: | | |
ver_short=`git rev-parse --short HEAD` | |
echo "VERSION=$ver_short" >> $GITHUB_ENV | |
- name: Install dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo add-apt-repository universe | |
sudo apt-get -y update | |
sudo apt-get -y install libxss-dev libfuse2 libxcb-cursor0 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_version }} | |
host: ${{ matrix.qt_host }} | |
target: 'desktop' | |
modules: ${{ matrix.qt_modules }} | |
cache: true | |
cache-key-prefix: ${{ matrix.qt_host }}-${{ matrix.qt_version }}-"${{ matrix.qt_modules }}"-qt_cache | |
- name: Prepare AppImage | |
if: runner.os == 'Linux' | |
run: | | |
wget "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage" | |
wget "https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage" | |
wget "https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage" | |
- name: Configure CMake | |
run: cmake -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} | |
- name: Build | |
run: cmake --build ${{ env.BUILD_DIR }} --config ${{ env.BUILD_TYPE }} | |
- name: Package (Windows) | |
if: runner.os == 'Windows' | |
run: cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_DIR }} | |
- name: Package (Windows installer) | |
if: runner.os == 'Windows' | |
run: | | |
cd ${{ env.INSTALL_DIR }} | |
makensis -NOCD "${{ github.workspace }}/${{ env.BUILD_DIR }}/program_info/win_install.nsi" | |
- name: Package (tarball) | |
if: runner.os == 'Linux' | |
run: | | |
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_DIR }} | |
cd ${{ env.INSTALL_DIR }} | |
tar --owner root --group root -czf ../QtTube.tar.gz * | |
- name: Package (AppImage) | |
if: runner.os == 'Linux' | |
run: | | |
cmake --install ${{ env.BUILD_DIR }} --prefix ${{ env.INSTALL_APPIMAGE_DIR }}/usr | |
rm -f /home/runner/work/QtTube/Qt/${{ matrix.qt_version }}/gcc_64/plugins/sqldrivers/libqsqlmimer.so | |
export OUTPUT="QtTube-${{ runner.os }}-${{ env.VERSION }}-Qt${{ matrix.qt_ver }}-${{ env.BUILD_TYPE }}-x86_64.AppImage" | |
chmod +x linuxdeploy-*.AppImage | |
cp /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib | |
cp /usr/lib/x86_64-linux-gnu/libssl.so.1.1 ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib | |
cp /usr/lib/x86_64-linux-gnu/nss/* ${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib | |
mkdir -p ${{ env.INSTALL_APPIMAGE_DIR }}/usr/resources | |
export V8_SNAPSHOT_FILE="/home/runner/work/QtTube/Qt/${{ matrix.qt_version }}/gcc_64/resources/v8_context_snapshot.bin" | |
[[ -e $V8_SNAPSHOT_FILE ]] && cp $V8_SNAPSHOT_FILE ${{ env.INSTALL_APPIMAGE_DIR }}/usr/resources | |
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${{ env.INSTALL_APPIMAGE_DIR }}/usr/lib" | |
./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_APPIMAGE_DIR }} --output appimage --plugin qt -d program_info/qttube.desktop -i res/qttube.svg | |
- name: Upload artifact (zip) | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: QtTube-${{ runner.os }}-${{ env.VERSION }}-Qt${{ matrix.qt_ver }}-${{ env.BUILD_TYPE }} | |
path: ${{ env.INSTALL_DIR }}/** | |
- name: Upload artifact (installer) | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: QtTube-${{ runner.os }}-Setup-${{ env.VERSION }}-Qt${{ matrix.qt_ver }}-${{ env.BUILD_TYPE }} | |
path: QtTube-Setup.exe | |
- name: Upload artifact (tarball) | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: QtTube-${{ runner.os }}-${{ env.VERSION }}-Qt${{ matrix.qt_ver }}-${{ env.BUILD_TYPE }} | |
path: QtTube.tar.gz | |
- name: Upload artifact (AppImage) | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: QtTube-${{ runner.os }}-${{ env.VERSION }}-Qt${{ matrix.qt_ver }}-${{ env.BUILD_TYPE }}-x86_64.AppImage | |
path: QtTube-${{ runner.os }}-${{ env.VERSION }}-Qt${{ matrix.qt_ver }}-${{ env.BUILD_TYPE }}-x86_64.AppImage |