diff --git a/.github/workflows/fedora-build.yaml b/.github/workflows/fedora-build.yaml index d430b86..627e66a 100644 --- a/.github/workflows/fedora-build.yaml +++ b/.github/workflows/fedora-build.yaml @@ -84,5 +84,6 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: tr31-${{env.GIT_DESCRIBE}}-fedora + name: tr31-${{ env.GIT_DESCRIBE }}-fedora36 path: build/tr31-*.rpm + if-no-files-found: error diff --git a/.github/workflows/ubuntu-build.yaml b/.github/workflows/ubuntu-build.yaml index 3abcd48..96d3707 100644 --- a/.github/workflows/ubuntu-build.yaml +++ b/.github/workflows/ubuntu-build.yaml @@ -42,9 +42,16 @@ jobs: - name: Test run: cmake --build build --target test - build-ubuntu-2004-release: - name: Ubuntu 20.04 build (release) - runs-on: ubuntu-20.04 + build-ubuntu-release: + strategy: + fail-fast: false + matrix: + include: + - { name: "Ubuntu 20.04", os: ubuntu-20.04, ubuntu_release_name: "focal" } + - { name: "Ubuntu 22.04", os: ubuntu-22.04, ubuntu_release_name: "jammy" } + + name: ${{ matrix.name }} build (release) + runs-on: ${{ matrix.os }} steps: - name: Install dependencies @@ -59,12 +66,14 @@ jobs: submodules: recursive - name: Get version from git tag - run: | - git describe --always --dirty - echo "GIT_DESCRIBE=$(git describe --always --dirty)" >> $GITHUB_ENV + run: echo "GIT_DESCRIBE=$(git describe --always --dirty)" >> $GITHUB_ENV - name: Configure CMake - run: cmake -B build -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=YES -DBUILD_DOCS=YES -DCPACK_COMPONENTS_GROUPING=ALL_COMPONENTS_IN_ONE + # CPACK_DEBIAN_PACKAGE_RELEASE augments the package version for the + # intended Ubuntu release. The ppa1 component indicates that this is not + # an official Ubuntu package. The release name component indicates that + # this is for the specific Ubuntu release that has that name. + run: cmake -B build -DCMAKE_BUILD_TYPE="RelWithDebInfo" -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=YES -DBUILD_DOCS=YES -DCPACK_COMPONENTS_GROUPING=ALL_COMPONENTS_IN_ONE -DCPACK_DEBIAN_PACKAGE_RELEASE="0ubuntu1~ppa1~${{ matrix.ubuntu_release_name }}1" - name: Build run: cmake --build build @@ -78,5 +87,6 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v3 with: - name: tr31-${{env.GIT_DESCRIBE}}-ubuntu + name: tr31-${{ env.GIT_DESCRIBE }}-${{ matrix.os }} path: build/tr31_*.deb + if-no-files-found: error diff --git a/CMakeLists.txt b/CMakeLists.txt index fb1bef9..68a3f6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,6 +216,7 @@ if(rpmbuild_FOUND) set(CPACK_RPM_COMPONENT_INSTALL ON) # use default rpm package naming set(CPACK_RPM_FILE_NAME "RPM-DEFAULT") + set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) # configure license and changelog set(CPACK_RPM_PACKAGE_LICENSE "LGPLv2+") set(CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_SOURCE_DIR}/rpm_changelog.txt")