open-hyperion/.gitlab-ci.yml
2025-02-13 11:47:50 -06:00

401 lines
No EOL
15 KiB
YAML

#-----------------------------------------------------------------------#
# OpenRGB E1.31 Receiver Plugin GitLab CI Configuration #
#-----------------------------------------------------------------------#
variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_DEPTH: 0
.shared_windows_runners:
tags:
- shared-windows
- windows
stages:
- build
- deploy
before_script:
- echo "started by ${GITLAB_USER_NAME}"
#reusable templates
.ccache_init: &ccache_init
before_script:
- export QT_SELECT=qt5
- export APPIMAGE_EXTRACT_AND_RUN=1
#-----------------------------------------------------------------------#
# Linux i386 Build Target #
#-----------------------------------------------------------------------#
"Linux i386":
<<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
tags:
- linux
- i386
stage: build
script:
- export QT_SELECT=qt5
- export $(dpkg-architecture)
- ./scripts/build-plugin.sh
artifacts:
name: "${CI_PROJECT_NAME}_Linux_i386_${CI_COMMIT_SHORT_SHA}"
paths:
- ./libOpenRGBE131ReceiverPlugin.so
expire_in: 30 days
#-----------------------------------------------------------------------#
# Linux amd64 Build Target #
#-----------------------------------------------------------------------#
"Linux amd64":
<<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
tags:
- linux
- amd64
stage: build
script:
- export QT_SELECT=qt5
- export $(dpkg-architecture)
- ./scripts/build-plugin.sh
artifacts:
name: "${CI_PROJECT_NAME}_Linux_amd64_${CI_COMMIT_SHORT_SHA}"
paths:
- ./libOpenRGBE131ReceiverPlugin.so
expire_in: 30 days
#-----------------------------------------------------------------------#
# Linux armhf Build Target #
#-----------------------------------------------------------------------#
"Linux armhf":
<<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
tags:
- linux
- armhf
stage: build
script:
- export QT_SELECT=qt5
- export $(dpkg-architecture)
- ./scripts/build-plugin.sh
artifacts:
name: "${CI_PROJECT_NAME}_Linux_armhf_${CI_COMMIT_SHORT_SHA}"
paths:
- ./libOpenRGBE131ReceiverPlugin.so
expire_in: 30 days
#-----------------------------------------------------------------------#
# Linux arm64 Build Target #
#-----------------------------------------------------------------------#
"Linux arm64":
<<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
tags:
- linux
- arm64
stage: build
script:
- export QT_SELECT=qt5
- export $(dpkg-architecture)
- ./scripts/build-plugin.sh
artifacts:
name: "${CI_PROJECT_NAME}_Linux_arm64_${CI_COMMIT_SHORT_SHA}"
paths:
- ./libOpenRGBE131ReceiverPlugin.so
expire_in: 30 days
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Bookworm i386 Build Target #
#-----------------------------------------------------------------------#
"Linux i386 .deb (Debian Bookworm)":
<<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
tags:
- linux
- i386
stage: build
script:
- ./scripts/build-package-files.sh debian/changelog
- dpkg-architecture -l
- dpkg-buildpackage -us -B
- rm -v ../openrgb-plugin-e131-receiver-dbgsym*.deb
- mv -v ../openrgb-plugin-e131-receiver*.deb ./
artifacts:
name: "${CI_PROJECT_NAME}_Linux_i386_deb_${CI_COMMIT_SHORT_SHA}"
paths:
- openrgb-plugin-e131-receiver*.deb
exclude:
- openrgb-plugin-e131-receiver-dbgsym*.deb
expire_in: 30 days
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Bookworm amd64 Build Target #
#-----------------------------------------------------------------------#
"Linux amd64 .deb (Debian Bookworm)":
<<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-amd64
tags:
- linux
- amd64
stage: build
script:
- ./scripts/build-package-files.sh debian/changelog
- dpkg-architecture -l
- dpkg-buildpackage -us -B
- rm -v ../openrgb-plugin-e131-receiver-dbgsym*.deb
- mv -v ../openrgb-plugin-e131-receiver*.deb ./
artifacts:
name: "${CI_PROJECT_NAME}_Linux_amd64_deb_${CI_COMMIT_SHORT_SHA}"
paths:
- openrgb-plugin-e131-receiver*.deb
exclude:
- openrgb-plugin-e131-receiver-dbgsym*.deb
expire_in: 30 days
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Bookworm armhf Build Target #
#-----------------------------------------------------------------------#
"Linux armhf .deb (Debian Bookworm)":
<<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-armhf
tags:
- linux
- armhf
stage: build
script:
- ./scripts/build-package-files.sh debian/changelog
- dpkg-architecture -l
- dpkg-buildpackage -us -B
- rm -v ../openrgb-plugin-e131-receiver-dbgsym*.deb
- mv -v ../openrgb-plugin-e131-receiver*.deb ./
artifacts:
name: "${CI_PROJECT_NAME}_Linux_armhf_deb_${CI_COMMIT_SHORT_SHA}"
paths:
- openrgb-plugin-e131-receiver*.deb
exclude:
- openrgb-plugin-e131-receiver-dbgsym*.deb
expire_in: 30 days
#-----------------------------------------------------------------------#
# Linux (.deb) Debian Bookworm arm64 Build Target #
#-----------------------------------------------------------------------#
"Linux arm64 .deb (Debian Bookworm)":
<<: *ccache_init
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-arm64
tags:
- linux
- arm64
stage: build
script:
- ./scripts/build-package-files.sh debian/changelog
- dpkg-architecture -l
- dpkg-buildpackage -us -B
- rm -v ../openrgb-plugin-e131-receiver-dbgsym*.deb
- mv -v ../openrgb-plugin-e131-receiver*.deb ./
artifacts:
name: "${CI_PROJECT_NAME}_Linux_arm64_deb_${CI_COMMIT_SHORT_SHA}"
paths:
- openrgb-plugin-e131-receiver*.deb
exclude:
- openrgb-plugin-e131-receiver-dbgsym*.deb
expire_in: 30 days
#-----------------------------------------------------------------------#
# Windows (32-bit) Build Target #
#-----------------------------------------------------------------------#
"Windows 32":
extends:
- .shared_windows_runners
stage: build
script:
- $esc = "$([char]27)"
- $count = 0
- function _unix_tmsec_ { [int64](([datetime]::UtcNow)-(get-date "1/1/1970")).TotalSeconds }
- function _fold_start_ { param( [string]$TEXT_TAG ) $t=_unix_tmsec_; $global:count += 1; Write-Host -NoNewLine "`r`n`r`nsection_start:${t}:sect_${count}`r${esc}[0K${esc}[33m${TEXT_TAG}${esc}[39m`r`n"; }
- function _fold_final_ { $t=_unix_tmsec_; Write-Host -NoNewLine "`r`n`r`nsection_end:${t}:sect_${count}`r${esc}[0K`r`n" ; }
- _fold_start_ 'configuring the msvc environment variables'
- Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Auxiliary/Build"
- '& cmd.exe /C "vcvarsall.bat x86 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
- Pop-Location
- _fold_final_
- _fold_start_ 'downloading precompiled versions of qtbase, qttools (for windeployqt) and jom (for a more parallel nmake)'
- mkdir _qt
- mkdir _qt_download
- Push-Location _qt_download
- curl.exe -LJ -o qt-base.7z 'https://gitlab.com/OpenRGBDevelopers/openrgb-linux-ci-deb-builder/-/package_files/56183447/download'
- curl.exe -LJ -o qt-tools.7z 'https://gitlab.com/OpenRGBDevelopers/openrgb-linux-ci-deb-builder/-/package_files/56183451/download'
- _fold_final_
- _fold_start_ 'extracting the downloaded qt binaries'
- 7z x qt-base.7z '-o../_qt' -y
- 7z x qt-tools.7z '-o../_qt' -y
- _fold_final_
- _fold_start_ 'turn the qt install from enterprise to foss; remove the licensing checks'
- ${qconfig-pri-folder} = '..\_qt\5.15.0\msvc2019\mkspecs\qconfig.pri'
- (Get-Content ${qconfig-pri-folder}).replace('QT_EDITION = Enterprise', 'QT_EDITION = OpenSource') | Set-Content ${qconfig-pri-folder}
- (Get-Content ${qconfig-pri-folder}).replace('QT_LICHECK = licheck.exe', '') | Set-Content ${qconfig-pri-folder}
- Pop-Location
- _fold_final_
- _fold_start_ 'run qmake and generate the msvc nmake makefile'
- mkdir _build; cd _build
- ..\_qt\5.15.0\msvc2019\bin\qmake ..\OpenRGBE131ReceiverPlugin.pro
- _fold_final_
- _fold_start_ 'start the actual build with jom instead of nmake; for speed'
- nmake
- _fold_final_
- _fold_start_ 'Preparing artifact'
- mv release/OpenRGBE131ReceiverPlugin.dll ../
- _fold_final_
artifacts:
name: "${CI_PROJECT_NAME}_Windows_32_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGBE131ReceiverPlugin.dll
expire_in: 30 days
#-----------------------------------------------------------------------#
# Windows (64-bit) Build Target #
#-----------------------------------------------------------------------#
"Windows 64":
extends:
- .shared_windows_runners
stage: build
script:
- $esc = "$([char]27)"
- $count = 0
- function _unix_tmsec_ { [int64](([datetime]::UtcNow)-(get-date "1/1/1970")).TotalSeconds }
- function _fold_start_ { param( [string]$TEXT_TAG ) $t=_unix_tmsec_; $global:count += 1; Write-Host -NoNewLine "`r`n`r`nsection_start:${t}:sect_${count}`r${esc}[0K${esc}[33m${TEXT_TAG}${esc}[39m`r`n"; }
- function _fold_final_ { $t=_unix_tmsec_; Write-Host -NoNewLine "`r`n`r`nsection_end:${t}:sect_${count}`r${esc}[0K`r`n" ; }
- _fold_start_ 'configuring the msvc environment variables'
- Push-Location "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Auxiliary/Build"
- '& cmd.exe /C "vcvarsall.bat x64 & set" | Foreach-Object { if ($_ -match "(.*?)=(.*)") { Set-Item -force -path "Env:\$($matches[1])" -value "$($matches[2])" } }'
- Pop-Location
- _fold_final_
- _fold_start_ 'downloading precompiled versions of qtbase, qttools (for windeployqt) and jom (for a more parallel nmake)'
- mkdir _qt
- mkdir _qt_download
- Push-Location _qt_download
- curl.exe -LJ -o qt-base.7z 'https://gitlab.com/OpenRGBDevelopers/openrgb-linux-ci-deb-builder/-/package_files/56183457/download'
- curl.exe -LJ -o qt-tools.7z 'https://gitlab.com/OpenRGBDevelopers/openrgb-linux-ci-deb-builder/-/package_files/56183464/download'
- _fold_final_
- _fold_start_ 'extracting the downloaded qt binaries'
- 7z x qt-base.7z '-o../_qt' -y
- 7z x qt-tools.7z '-o../_qt' -y
- _fold_final_
- _fold_start_ 'turn the qt install from enterprise to foss; remove the licensing checks'
- ${qconfig-pri-folder} = '..\_qt\5.15.0\msvc2019_64\mkspecs\qconfig.pri'
- (Get-Content ${qconfig-pri-folder}).replace('QT_EDITION = Enterprise', 'QT_EDITION = OpenSource') | Set-Content ${qconfig-pri-folder}
- (Get-Content ${qconfig-pri-folder}).replace('QT_LICHECK = licheck.exe', '') | Set-Content ${qconfig-pri-folder}
- Pop-Location
- _fold_final_
- _fold_start_ 'run qmake and generate the msvc nmake makefile'
- mkdir _build; cd _build
- ..\_qt\5.15.0\msvc2019_64\bin\qmake ..\OpenRGBE131ReceiverPlugin.pro
- _fold_final_
- _fold_start_ 'start the actual build with jom instead of nmake; for speed'
- nmake
- _fold_final_
- _fold_start_ 'Preparing artifact'
- mv release/OpenRGBE131ReceiverPlugin.dll ../
- _fold_final_
artifacts:
name: "${CI_PROJECT_NAME}_Windows_64_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGBE131ReceiverPlugin.dll
expire_in: 30 days
#-----------------------------------------------------------------------#
# MacOS Build Target #
#-----------------------------------------------------------------------#
"MacOS ARM64":
tags:
- macos
stage: build
script:
- eval $(/opt/homebrew/bin/brew shellenv)
- qmake OpenRGBE131ReceiverPlugin.pro
- make -j16
- install_name_tool libOpenRGBE131ReceiverPlugin.dylib -change /opt/homebrew/opt/qt@5/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets
- install_name_tool libOpenRGBE131ReceiverPlugin.dylib -change /opt/homebrew/opt/qt@5/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui
- install_name_tool libOpenRGBE131ReceiverPlugin.dylib -change /opt/homebrew/opt/qt@5/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore
- codesign --force --verify -s OpenRGB libOpenRGBE131ReceiverPlugin.dylib
artifacts:
paths:
- libOpenRGBE131ReceiverPlugin.dylib
expire_in: 30 days
rules:
- if: '$CI_PROJECT_PATH == "OpenRGBDevelopers/OpenRGBE131ReceiverPlugin"'
when: on_success
- if: '$BUILD_MACOS =~ /.+/'
when: on_success
"MacOS Intel":
tags:
- macos
stage: build
script:
- eval $(/usr/local/bin/brew shellenv)
- arch -x86_64 /usr/local/bin/qmake OpenRGBE131ReceiverPlugin.pro
- arch -x86_64 make -j16
- arch -x86_64 install_name_tool libOpenRGBE131ReceiverPlugin.dylib -change /usr/local/bin/opt/qt@5/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets
- arch -x86_64 install_name_tool libOpenRGBE131ReceiverPlugin.dylib -change /usr/local/bin/opt/qt@5/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui
- arch -x86_64 install_name_tool libOpenRGBE131ReceiverPlugin.dylib -change /usr/local/bin/opt/qt@5/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore
- arch -x86_64 codesign --force --verify -s OpenRGB libOpenRGBE131ReceiverPlugin.dylib
artifacts:
paths:
- libOpenRGBE131ReceiverPlugin.dylib
expire_in: 30 days
rules:
- if: '$CI_PROJECT_PATH == "OpenRGBDevelopers/OpenRGBE131ReceiverPlugin"'
when: on_success
- if: '$BUILD_MACOS =~ /.+/'
when: on_success
#-----------------------------------------------------------------------#
# Windows (64-bit) MSI Target #
#-----------------------------------------------------------------------#
"Windows 64 MSI":
image: registry.gitlab.com/openrgbdevelopers/openrgb-linux-ci-deb-builder:bookworm-i386
stage: deploy
tags:
- linux
- i386
script:
- ls -la
- ./scripts/build-msi.sh
dependencies:
- "Windows 64"
needs:
- "Windows 64"
artifacts:
name: "${CI_PROJECT_NAME}_Windows_64_msi_${CI_COMMIT_SHORT_SHA}"
paths:
- OpenRGB_E131_Receiver_Plugin_Windows_64.msi
expire_in: 30 days