|
| 1 | +#-----------------------------------------------------------# |
| 2 | +# .github/workflows/linux-appimage.yml # |
| 3 | +# # |
| 4 | +# OpenRGB GitHub Actions - Linux AppImage Builds # |
| 5 | +# This file is part of the OpenRGB project # |
| 6 | +# SPDX-License-Identifier: GPL-2.0-or-later # |
| 7 | +#-----------------------------------------------------------# |
| 8 | + |
| 9 | +name: Linux AppImage |
| 10 | + |
| 11 | +on: |
| 12 | + push: |
| 13 | + branches: |
| 14 | + - master |
| 15 | + - main |
| 16 | + tags: |
| 17 | + - '*' |
| 18 | + pull_request: |
| 19 | + |
| 20 | +env: |
| 21 | + CI_PROJECT_DIR: ${{ github.workspace }} |
| 22 | + CI_COMMIT_SHORT_SHA: ${{ github.sha }} |
| 23 | + |
| 24 | +jobs: |
| 25 | + #-----------------------------------------------------------# |
| 26 | + # Linux AppImage builds # |
| 27 | + #-----------------------------------------------------------# |
| 28 | + linux-appimage: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + |
| 31 | + strategy: |
| 32 | + matrix: |
| 33 | + include: |
| 34 | + - name: i386 |
| 35 | + arch: i386 |
| 36 | + qt_version: qt6 |
| 37 | + image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:trixie-i386 |
| 38 | + target_name: i386 |
| 39 | + target_path: i386 |
| 40 | + - name: amd64 |
| 41 | + arch: amd64 |
| 42 | + qt_version: qt6 |
| 43 | + image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:trixie-amd64 |
| 44 | + target_name: amd64 |
| 45 | + target_path: x86_64 |
| 46 | + - name: armhf |
| 47 | + arch: armhf |
| 48 | + qt_version: qt6 |
| 49 | + image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:trixie-armhf |
| 50 | + target_name: armhf |
| 51 | + target_path: armhf |
| 52 | + - name: arm64 |
| 53 | + arch: arm64 |
| 54 | + qt_version: qt6 |
| 55 | + image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:trixie-arm64 |
| 56 | + target_name: arm64 |
| 57 | + target_path: arm64 |
| 58 | + |
| 59 | + container: ${{ matrix.image }} |
| 60 | + |
| 61 | + steps: |
| 62 | + - name: Checkout code |
| 63 | + uses: actions/checkout@v4 |
| 64 | + with: |
| 65 | + fetch-depth: 0 |
| 66 | + |
| 67 | + - name: Set architecture variables |
| 68 | + run: echo "TGT_ARCH=${{ matrix.arch }}" >> $GITHUB_ENV |
| 69 | + |
| 70 | + - name: Build AppImage |
| 71 | + run: | |
| 72 | + export TGT_ARCH="${{ matrix.arch }}" |
| 73 | + export TGT_QT="${{ matrix.qt_version }}" |
| 74 | + ./scripts/build-appimage.sh ${{ matrix.qt_version }} |
| 75 | +
|
| 76 | + - name: Upload artifact |
| 77 | + uses: actions/upload-artifact@v4 |
| 78 | + with: |
| 79 | + name: OpenRGB_Linux_${{ matrix.arch }}_AppImage_${{ github.sha }} |
| 80 | + path: OpenRGB-${{ matrix.arch }}.AppImage |
| 81 | + retention-days: 30 |
| 82 | + |
| 83 | + if: | |
| 84 | + (github.repository == 'CalcProgrammer1/OpenRGB' && |
| 85 | + (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || |
| 86 | + startsWith(github.ref, 'refs/tags/') || github.event_name == 'pull_request')) || |
| 87 | + (github.repository != 'CalcProgrammer1/OpenRGB' && github.event_name == 'push') |
| 88 | +
|
| 89 | + #-----------------------------------------------------------# |
| 90 | + # Qt5 AppImage builds (manual trigger only) # |
| 91 | + #-----------------------------------------------------------# |
| 92 | + linux-appimage-qt5: |
| 93 | + runs-on: ubuntu-latest |
| 94 | + container: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:trixie-amd64 |
| 95 | + |
| 96 | + steps: |
| 97 | + - name: Checkout code |
| 98 | + uses: actions/checkout@v4 |
| 99 | + with: |
| 100 | + fetch-depth: 0 |
| 101 | + |
| 102 | + - name: Build AppImage Qt5 |
| 103 | + run: | |
| 104 | + export TGT_ARCH="amd64" |
| 105 | + export TGT_QT="" |
| 106 | + ./scripts/build-appimage.sh |
| 107 | +
|
| 108 | + - name: Upload artifact |
| 109 | + uses: actions/upload-artifact@v4 |
| 110 | + with: |
| 111 | + name: OpenRGB_Linux_amd64_Qt5_AppImage_${{ github.sha }} |
| 112 | + path: OpenRGB-x86_64.AppImage |
| 113 | + retention-days: 30 |
| 114 | + optional: true |
| 115 | + |
| 116 | + if: github.event_name == 'workflow_dispatch' |
| 117 | + |
| 118 | + #-----------------------------------------------------------# |
| 119 | + # Supported devices README build # |
| 120 | + #-----------------------------------------------------------# |
| 121 | + supported-devices: |
| 122 | + runs-on: ubuntu-latest |
| 123 | + container: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:trixie-amd64 |
| 124 | + |
| 125 | + steps: |
| 126 | + - name: Checkout code |
| 127 | + uses: actions/checkout@v4 |
| 128 | + with: |
| 129 | + fetch-depth: 0 |
| 130 | + |
| 131 | + - name: Configure and build |
| 132 | + run: | |
| 133 | + qmake |
| 134 | + make -j$(nproc) |
| 135 | +
|
| 136 | + - name: Build supported devices |
| 137 | + run: | |
| 138 | + ./scripts/build-supported-devices-md.sh ${{ github.workspace }} ${{ github.sha }} |
| 139 | +
|
| 140 | + - name: Upload artifact |
| 141 | + uses: actions/upload-artifact@v4 |
| 142 | + with: |
| 143 | + name: OpenRGB_Supported_Devices_${{ github.sha }} |
| 144 | + path: 'Supported Devices.csv' |
| 145 | + retention-days: 30 |
| 146 | + |
| 147 | + if: | |
| 148 | + (github.repository == 'CalcProgrammer1/OpenRGB' && |
| 149 | + (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || |
| 150 | + startsWith(github.ref, 'refs/tags/') || github.event_name == 'pull_request')) || |
| 151 | + (github.repository != 'CalcProgrammer1/OpenRGB' && github.event_name == 'push') |
0 commit comments