chore: prepare v1.1.0 release #197
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: CI | |
| "on": | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| container: | |
| image: fedora:43 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| dnf install -y \ | |
| cmake \ | |
| extra-cmake-modules \ | |
| gcc-c++ \ | |
| ninja-build \ | |
| qt6-qtbase-devel \ | |
| qt6-qtdeclarative-devel \ | |
| qt6-qttools-devel \ | |
| qt6-qtwayland-devel \ | |
| kf6-qqc2-desktop-style \ | |
| polkit-devel \ | |
| clang-tools-extra \ | |
| desktop-file-utils \ | |
| appstream | |
| - name: Configure (CMake) | |
| run: | | |
| cmake -B build \ | |
| -GNinja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DBUILD_TESTS=ON \ | |
| -DREQUIRE_TRANSLATIONS=ON | |
| - name: Build | |
| run: cmake --build build --parallel | |
| - name: Run tests | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Validate desktop metadata | |
| run: | | |
| desktop-file-validate data/icons/io.github.projectroasd.rocontrol.desktop | |
| appstreamcli validate --no-net data/icons/io.github.projectroasd.rocontrol.metainfo.xml | |
| - name: Check formatting (clang-format) | |
| run: | | |
| find src \( -name "*.cpp" -o -name "*.h" \) -print0 | \ | |
| xargs -0 clang-format --dry-run --Werror | |
| package-rpm: | |
| name: RPM Build Check (Fedora 43) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: fedora:43 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install RPM tooling and dependencies | |
| run: | | |
| dnf install -y \ | |
| git \ | |
| rpm-build \ | |
| rpmlint \ | |
| cmake \ | |
| extra-cmake-modules \ | |
| gcc-c++ \ | |
| ninja-build \ | |
| qt6-qtbase-devel \ | |
| qt6-qtdeclarative-devel \ | |
| qt6-qttools-devel \ | |
| qt6-qtwayland-devel \ | |
| kf6-qqc2-desktop-style \ | |
| polkit-devel \ | |
| desktop-file-utils \ | |
| appstream | |
| - name: Prepare source tarball | |
| id: prep | |
| run: | | |
| VERSION="$(sed -n 's/^[[:space:]]*VERSION[[:space:]]\([0-9.][0-9.]*\)$/\1/p' CMakeLists.txt | head -n1)" | |
| if [[ -z "${VERSION}" ]]; then | |
| echo "Failed to read project version from CMakeLists.txt" >&2 | |
| exit 1 | |
| fi | |
| echo "version=${VERSION}" >> "${GITHUB_OUTPUT}" | |
| ARCHIVE_BASENAME="ro-control-${VERSION}" | |
| mkdir -p ~/rpmbuild/SOURCES ~/rpmbuild/SPECS | |
| STAGE_DIR="$(mktemp -d)" | |
| cp -a . "${STAGE_DIR}/${ARCHIVE_BASENAME}" | |
| rm -rf "${STAGE_DIR}/${ARCHIVE_BASENAME}/.git" \ | |
| "${STAGE_DIR}/${ARCHIVE_BASENAME}/build" \ | |
| "${STAGE_DIR}/${ARCHIVE_BASENAME}/build-"* | |
| tar -C "${STAGE_DIR}" -czf "${HOME}/rpmbuild/SOURCES/${ARCHIVE_BASENAME}.tar.gz" "${ARCHIVE_BASENAME}" | |
| rm -rf "${STAGE_DIR}" | |
| cp packaging/rpm/ro-control.spec "${HOME}/rpmbuild/SPECS/ro-control.spec" | |
| - name: Build RPM | |
| run: | | |
| FEDORA_VERSION=43 | |
| rpmbuild -ba "${HOME}/rpmbuild/SPECS/ro-control.spec" \ | |
| --define "_topdir ${HOME}/rpmbuild" \ | |
| --define "upstream_version ${{ steps.prep.outputs.version }}" \ | |
| --define "dist .fc${FEDORA_VERSION}" | |
| - name: Validate desktop metadata | |
| run: | | |
| desktop-file-validate data/icons/io.github.projectroasd.rocontrol.desktop | |
| appstreamcli validate --no-net data/icons/io.github.projectroasd.rocontrol.metainfo.xml | |
| - name: Verify Fedora 43 RPM compatibility | |
| run: | | |
| MAIN_RPM="$(find ~/rpmbuild/RPMS -maxdepth 2 -type f -name 'ro-control-*.x86_64.rpm' | head -n1)" | |
| COMMON_RPM="$(find ~/rpmbuild/RPMS -maxdepth 2 -type f -name 'ro-control-common-*.noarch.rpm' | head -n1)" | |
| if [[ -z "${MAIN_RPM}" ]]; then | |
| echo "Failed to locate ro-control x86_64 RPM." >&2 | |
| exit 1 | |
| fi | |
| if [[ -z "${COMMON_RPM}" ]]; then | |
| echo "Failed to locate ro-control-common noarch RPM." >&2 | |
| exit 1 | |
| fi | |
| rpm -qpR "${MAIN_RPM}" | tee /tmp/ro-control.requires | |
| if grep -E 'Qt_6\.10|PRIVATE_API' /tmp/ro-control.requires; then | |
| echo "Forbidden Qt private or Fedora 44-era Qt ABI dependency detected." >&2 | |
| exit 1 | |
| fi | |
| rpm -qpl "${MAIN_RPM}" | grep -Fx '/usr/bin/ro-control' | |
| if rpm -qpl "${COMMON_RPM}" | grep -Fx '/usr/bin/ro-control'; then | |
| echo "/usr/bin/ro-control must not be shipped by ro-control-common." >&2 | |
| exit 1 | |
| fi | |
| cp "${MAIN_RPM}" /tmp/ro-control-x86_64.rpm | |
| cp "${COMMON_RPM}" /tmp/ro-control-common-noarch.rpm | |
| - name: Install and smoke-test RPMs | |
| run: | | |
| MAIN_RPM=/tmp/ro-control-x86_64.rpm | |
| COMMON_RPM=/tmp/ro-control-common-noarch.rpm | |
| dnf clean all | |
| dnf -y --refresh --setopt=install_weak_deps=False install "${MAIN_RPM}" "${COMMON_RPM}" | |
| rpm -q ro-control | |
| command -v ro-control | |
| rpm -q --whatprovides /usr/bin/ro-control | grep -Fx 'ro-control' | |
| ldd -r /usr/bin/ro-control | |
| - name: Lint built RPMs | |
| run: | | |
| rpmlint ~/rpmbuild/RPMS/*/*.rpm || true |