From 1bf4e90b8c3617d95e1bdb179a0af2d60b768619 Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Sun, 21 Jan 2024 11:20:31 +0100 Subject: [PATCH] Workflow: Linux install initial commit --- .github/workflows/LinuxInstall.yml | 67 ++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/LinuxInstall.yml diff --git a/.github/workflows/LinuxInstall.yml b/.github/workflows/LinuxInstall.yml new file mode 100644 index 0000000..7b5a682 --- /dev/null +++ b/.github/workflows/LinuxInstall.yml @@ -0,0 +1,67 @@ +name: LinuxInstall + +on: + workflow_dispatch: + +jobs: + build_ubuntu: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + path: pdf4qt + + - name: 'VCPKG: Set up VCPKG' + run: | + git clone --depth=1 https://github.com/microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + + - name: 'VCPKG: Cache vcpkg dependencies' + uses: actions/cache@v3 + with: + path: | + ./vcpkg/downloads + ./vcpkg/packages + key: ${{ runner.os }}-vcpkg-v2-${{ hashFiles('**/vcpkg.json') }} + restore-keys: | + ${{ runner.os }}-vcpkg-v2- + + - name: 'VCPKG: Install project dependencies' + run: | + ./vcpkg install tbb openssl lcms zlib openjpeg freetype ijg-libjpeg libpng + working-directory: vcpkg + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: '6.6.0' + host: 'linux' + target: 'desktop' + dir: '${{ github.workspace }}/qt/' + install-deps: 'true' + modules: 'qtspeech qtmultimedia' + cache: 'true' + cache-key-prefix: ${{ runner.os }}-qt-660 + + - name: Build project + working-directory: pdf4qt + run: | + cmake -B build -S . -DPDF4QT_INSTALL_QT_DEPENDENCIES=0 -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release -DVCPKG_OVERLAY_PORTS=vcpkg/overlays + cmake --build build -j6 + cmake --install build + + - name: Make DEB package + working-directory: pdf4qt/build + run: | + sh make-package.sh + + - name: Upload DEB package + uses: actions/upload-artifact@v3 + with: + name: ubuntu-deb-package + path: ./pdf4qt/build/*.deb + retention-days: 30