Fix multiple issues, and fix appimage workflow. #634
This file contains hidden or 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: linux | |
| on: | |
| push: | |
| branches: [ master ] | |
| tags: | |
| - "v*" | |
| pull_request: | |
| jobs: | |
| test-linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| qtversion: ['5.15.2', '6.8.1'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up build variables | |
| env: | |
| QT_VERSION: ${{ matrix.qtversion }} | |
| run: bash ./.github/scripts/setup_build_variables.sh | |
| - name: Set up linux build variables | |
| run: bash ./.github/scripts/linux/setup_linux_build_variables.sh | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: ${{ matrix.qtversion }} | |
| host: 'linux' | |
| install-deps: 'true' | |
| - name: Install dependencies | |
| run: sudo apt-get install extra-cmake-modules libxcb-xfixes0-dev xvfb | |
| - name: Install Qt6 dependencies | |
| # https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform | |
| run: sudo apt-get install libxcb-cursor-dev | |
| - name: Set up GoogleTest | |
| run: bash ./.github/scripts/setup_googleTest.sh | |
| - name: Set up kColorPicker | |
| env: | |
| BUILD_TYPE: Debug | |
| run: bash ./.github/scripts/setup_kColorPicker.sh | |
| - name: Set up kImageAnnotator | |
| env: | |
| BUILD_TYPE: Debug | |
| run: bash ./.github/scripts/setup_kImageAnnotator.sh | |
| - name: Build | |
| env: | |
| BUILD_TESTS: ON | |
| BUILD_TYPE: Debug | |
| run: bash ./.github/scripts/build_ksnip.sh | |
| - name: Test | |
| working-directory: ${{github.workspace}}/build/tests | |
| run: xvfb-run --auto-servernum --server-num=1 --server-args="-screen 0 1024x768x24" ctest --extra-verbose | |
| package-appImage: | |
| if: ${{ github.event_name == 'push' }} | |
| runs-on: ubuntu-22.04 | |
| needs: test-linux | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up build variables | |
| run: bash ./.github/scripts/setup_build_variables.sh | |
| - name: Set up windows build variables | |
| run: bash ./.github/scripts/linux/setup_linux_build_variables.sh | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '5.15.2' | |
| host: 'linux' | |
| install-deps: 'true' | |
| - name: Install dependencies | |
| run: sudo apt-get install extra-cmake-modules libxcb-xfixes0-dev libssl-dev | |
| - name: Install Qt6 dependencies | |
| # https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform | |
| run: sudo apt-get install libxcb-cursor-dev | |
| - name: Set up kColorPicker | |
| run: bash ./.github/scripts/setup_kColorPicker.sh | |
| - name: Set up kImageAnnotator | |
| run: bash ./.github/scripts/setup_kImageAnnotator.sh | |
| - name: Download deploy tool | |
| run: | | |
| wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" | |
| chmod a+x linuxdeployqt-continuous-x86_64.AppImage | |
| - name: Package AppImage | |
| working-directory: ${{github.workspace}} | |
| run: bash ./.github/scripts/linux/build_appImage.sh | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ksnip.AppImage | |
| path: ksnip*.AppImage* | |
| - name: Delete existing release with same name | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bash ./.github/scripts/delete_release.sh | |
| - name: Upload Release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ksnip-${{ env.VERSION }}-x86_64.AppImage | |
| asset_name: ksnip-${{ env.VERSION }}-x86_64.AppImage | |
| tag: ${{ env.RELEASE_TAG }} | |
| overwrite: true | |
| release_name: ${{ env.RELEASE_NAME }} | |
| body: ${{ env.UPLOADTOOL_BODY }} | |
| prerelease: ${{ env.IS_PRERELASE }} | |
| package-rpm: | |
| if: ${{ github.event_name == 'push' }} | |
| runs-on: ubuntu-latest | |
| needs: test-linux | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up build variables | |
| run: bash ./.github/scripts/setup_build_variables.sh | |
| - name: Set up windows build variables | |
| run: bash ./.github/scripts/linux/setup_linux_build_variables.sh | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '5.15.2' | |
| host: 'linux' | |
| install-deps: 'true' | |
| - name: Install dependencies | |
| run: sudo apt-get install extra-cmake-modules libxcb-xfixes0-dev libssl-dev rpm | |
| - name: Install Qt6 dependencies | |
| # https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform | |
| run: sudo apt-get install libxcb-cursor-dev | |
| - name: Set up kColorPicker | |
| run: bash ./.github/scripts/setup_kColorPicker.sh | |
| - name: Set up kImageAnnotator | |
| run: bash ./.github/scripts/setup_kImageAnnotator.sh | |
| - name: Set up spec file | |
| run: bash ./.github/scripts/linux/rpm/setup_spec_file.sh | |
| - name: Set up directory structure | |
| run: bash ./.github/scripts/linux/rpm/setup_rpm_directory_structure.sh | |
| - name: Package rpm | |
| run: bash ./.github/scripts/linux/rpm/build_rpm.sh | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ksnip.rpm | |
| path: ksnip-*.rpm | |
| - name: Delete existing release with same name | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bash ./.github/scripts/delete_release.sh | |
| - name: Upload Release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ksnip-${{ env.VERSION }}.rpm | |
| asset_name: ksnip-${{ env.VERSION }}.rpm | |
| tag: ${{ env.RELEASE_TAG }} | |
| overwrite: true | |
| release_name: ${{ env.RELEASE_NAME }} | |
| body: ${{ env.UPLOADTOOL_BODY }} | |
| prerelease: ${{ env.IS_PRERELASE }} | |
| package-deb: | |
| if: ${{ github.event_name == 'push' }} | |
| runs-on: ubuntu-latest | |
| needs: test-linux | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up build variables | |
| run: bash ./.github/scripts/setup_build_variables.sh | |
| - name: Set up windows build variables | |
| run: bash ./.github/scripts/linux/setup_linux_build_variables.sh | |
| - name: Install Qt | |
| uses: jurplel/install-qt-action@v4 | |
| with: | |
| version: '5.15.2' | |
| host: 'linux' | |
| install-deps: 'true' | |
| - name: Install dependencies | |
| run: sudo apt-get install cmake extra-cmake-modules libxcb-xfixes0-dev libssl-dev devscripts debhelper | |
| - name: Install Qt6 dependencies | |
| # https://stackoverflow.com/questions/77725761/from-6-5-0-xcb-cursor0-or-libxcb-cursor0-is-needed-to-load-the-qt-xcb-platform | |
| run: sudo apt-get install libxcb-cursor-dev | |
| - name: Set up kColorPicker | |
| run: bash ./.github/scripts/setup_kColorPicker.sh | |
| - name: Set up kImageAnnotator | |
| run: bash ./.github/scripts/setup_kImageAnnotator.sh | |
| - name: Set up directory structure | |
| run: bash ./.github/scripts/linux/deb/setup_deb_directory_structure.sh | |
| - name: Set up changelog | |
| run: bash ./.github/scripts/linux/deb/setup_changelog_file.sh | |
| - name: Package deb | |
| run: bash ./.github/scripts/linux/deb/build_deb.sh | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ksnip.deb | |
| path: ksnip-*.deb | |
| - name: Delete existing release with same name | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bash ./.github/scripts/delete_release.sh | |
| - name: Upload Release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ksnip-${{ env.VERSION }}.deb | |
| asset_name: ksnip-${{ env.VERSION }}.deb | |
| tag: ${{ env.RELEASE_TAG }} | |
| overwrite: true | |
| release_name: ${{ env.RELEASE_NAME }} | |
| body: ${{ env.UPLOADTOOL_BODY }} | |
| prerelease: ${{ env.IS_PRERELASE }} | |