# SPDX-FileCopyrightText: 2024 Chris Rizzitello # SPDX-License-Identifier: MIT name: "Install dependencies for deskflow" description: "Install the dependencies needed to build deskflow" inputs: like: description: "Used only on linux distro type: debian, fedora, suse, arch" required: false qt-version: description: "The version of Qt to install (Windows & macOS)" required: false vcpkg-triplet: description: "vcpkg triplet to use (Windows)" required: false outputs: vcpkg-cmake-config: description: "windows vcpkg output for cmaket" value: ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} runs: using: "composite" steps: - name: Install Depends if: ${{ runner.os != 'Windows' }} run: | if [ "$RUNNER_OS" == "macOS" ]; then brew install googletest openssl --quiet elif [ "$RUNNER_OS" == "Linux" ]; then if [ ${{inputs.like}} == "debian" ]; then apt update -qqq > /dev/null apt install -qqq cmake build-essential ninja-build \ xorg-dev libx11-dev libxtst-dev libssl-dev \ libglib2.0-dev libxkbfile-dev qt6-base-dev qt6-tools-dev \ libgtk-3-dev libgtest-dev libgmock-dev \ libei-dev libportal-dev help2man -y >/dev/null elif [ ${{inputs.like}} == "fedora" ]; then dnf install -y cmake make ninja-build gcc-c++ rpm-build openssl-devel \ glib2-devel libXtst-devel libxkbfile-devel qt6-qtbase-devel qt6-qttools-devel \ gtk3-devel gtest-devel gmock-devel libei-devel libportal-devel help2man elif [ ${{inputs.like}} == "suse" ]; then zypper refresh zypper install -y --force-resolution \ cmake make ninja gcc-c++ rpm-build libopenssl-devel \ glib2-devel libXtst-devel libxkbfile-devel qt6-base-devel qt6-tools-devel \ qt6-linguist-devel gtk3-devel \ googletest-devel googlemock-devel libei-devel libportal-devel help2man elif [ ${{ inputs.like }} == "arch" ]; then pacman -Syu --noconfirm base-devel cmake ninja \ gcc openssl glib2 libxtst libxkbfile gtest libei libportal \ qt6-base qt6-tools qt6-svg qt6-translations qt6-declarative gtk3 help2man doxygen graphviz rsync else echo "Unknown like" fi else echo "Unknown OS: $RUNNER_OS" fi shell: bash - name: Install Qt if: ${{runner.os != 'Linux' }} uses: jurplel/install-qt-action@v4 env: AQT_CONFIG: ${{ github.workspace }}/.github/actions/install-dependencies/aqt.ini with: version: ${{inputs.qt-version}} cache: true cache-key-prefix: ${{matrix.target.os}}-${{inputs.qt-version}} - name: Build and cache vcpkg if: ${{ runner.os == 'Windows' }} id: vcpkg uses: johnwason/vcpkg-action@v7 with: pkgs: gtest openssl extra-args: --classic --host-triplet=${{inputs.vcpkg-triplet}} triplet: ${{inputs.vcpkg-triplet}} token: ${{ github.token }} revision: master - name: Install Wix if: ${{ runner.os == 'Windows' }} run: | dotnet tool install --global wix --version 5.0.2 wix extension add --global WixToolset.UI.wixext/5.0.2 wix extension add --global WixToolset.Util.wixext/5.0.2 wix extension add --global WixToolset.Firewall.wixext/5.0.2 shell: pwsh