fix(cpan-libs) build cpan library for arm64 architecture (#5047)

Refs:CTOR-539
This commit is contained in:
Evan-Adam 2024-06-06 14:10:02 +02:00 committed by GitHub
parent 7a8ab1cfb1
commit e91780d35e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 89 additions and 81 deletions

View File

@ -222,15 +222,92 @@ jobs:
path: ./*.${{ matrix.package_extension }}
retention-days: 1
merge-package-rpm-artifacts:
needs: [package-rpm]
runs-on: ubuntu-22.04
strategy:
matrix:
distrib: [el8, el9]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Merging Artifacts
uses: ./.github/actions/merge-artifacts
with:
target_name: packages-rpm-${{ matrix.distrib }}
source_paths: packages-rpm-${{ matrix.distrib }}/*.rpm
source_name_pattern: packages-rpm-${{ matrix.distrib }}-
github_token: ${{ secrets.GITHUB_TOKEN }}
sign-rpm:
needs: [merge-package-rpm-artifacts]
runs-on: ubuntu-22.04
strategy:
matrix:
distrib: [el8, el9]
name: sign rpm ${{ matrix.distrib }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/rpm-signing:ubuntu
options: -t
credentials:
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
steps:
- run: apt-get install -y zstd
shell: bash
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packages-rpm-${{ matrix.distrib }}
path: ./
- run: echo "HOME=/root" >> $GITHUB_ENV
shell: bash
- run: rpmsign --addsign ./*.rpm
shell: bash
- uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ./*.rpm
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
deliver-rpm:
needs: [get-environment, sign-rpm]
if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }}
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9]
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Delivery
uses: ./.github/actions/rpm-delivery
with:
module_name: perl-cpan-libraries
distrib: ${{ matrix.distrib }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
stability: ${{ needs.get-environment.outputs.stability }}
package-deb:
needs: [get-environment]
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
runs-on: ubuntu-22.04
runs-on: ${{ matrix.runner_name }}
strategy:
fail-fast: false
matrix:
distrib: [bullseye, bookworm, jammy]
image: [packaging-plugins-bullseye, packaging-plugins-bookworm, packaging-plugins-jammy, packaging-plugins-bullseye-arm64]
name:
[
"Authen::SCRAM::Client",
@ -255,6 +332,8 @@ jobs:
"ZMQ::LibZMQ4"
]
include:
- runner_name: ubuntu-22.04
- arch: amd64
- build_distribs: "bullseye,bookworm,jammy"
- deb_dependencies: ""
- rpm_provides: ""
@ -270,6 +349,11 @@ jobs:
- distrib: jammy
package_extension: deb
image: packaging-plugins-jammy
- distrib: bullseye
package_extension: deb
image: packaging-plugins-bullseye-arm64
arch: arm64
runner_name: ["self-hosted", "collect-arm64"]
- name: "Paws"
use_dh_make_perl: "false"
- name: "Statistics::Regression"
@ -279,7 +363,7 @@ jobs:
use_dh_make_perl: "false"
version: "0.01"
deb_dependencies: "libzmq5"
name: package ${{ matrix.distrib }} ${{ matrix.name }}
name: package ${{ matrix.distrib }} ${{ matrix.arch }} ${{ matrix.name }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
credentials:
@ -331,7 +415,7 @@ jobs:
cpanm Module::Install
gem install fpm
fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES -v ${{ steps.package-version.outputs.package_version }} ${{ matrix.name }}
fpm -a native -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES -v ${{ steps.package-version.outputs.package_version }} ${{ matrix.name }}
shell: bash
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }}
@ -355,27 +439,10 @@ jobs:
- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash}}
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.arch }}-${{ steps.package-name.outputs.name_with_dash}}
path: ./*.${{ matrix.package_extension }}
retention-days: 1
merge-package-rpm-artifacts:
needs: [package-rpm]
runs-on: ubuntu-22.04
strategy:
matrix:
distrib: [el8, el9]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Merging Artifacts
uses: ./.github/actions/merge-artifacts
with:
target_name: packages-rpm-${{ matrix.distrib }}
source_paths: packages-rpm-${{ matrix.distrib }}/*.rpm
source_name_pattern: packages-rpm-${{ matrix.distrib }}-
github_token: ${{ secrets.GITHUB_TOKEN }}
merge-package-deb-artifacts:
needs: [package-deb]
@ -395,43 +462,6 @@ jobs:
source_name_pattern: packages-deb-${{ matrix.distrib }}-
github_token: ${{ secrets.GITHUB_TOKEN }}
sign-rpm:
needs: [merge-package-rpm-artifacts]
runs-on: ubuntu-22.04
strategy:
matrix:
distrib: [el8, el9]
name: sign rpm ${{ matrix.distrib }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/rpm-signing:ubuntu
options: -t
credentials:
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
steps:
- run: apt-get install -y zstd
shell: bash
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packages-rpm-${{ matrix.distrib }}
path: ./
- run: echo "HOME=/root" >> $GITHUB_ENV
shell: bash
- run: rpmsign --addsign ./*.rpm
shell: bash
- uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ./*.rpm
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
download-and-cache-deb:
needs: [merge-package-deb-artifacts]
runs-on: ubuntu-22.04
@ -449,28 +479,6 @@ jobs:
path: ./*.deb
key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
deliver-rpm:
needs: [get-environment, sign-rpm]
if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }}
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9]
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Delivery
uses: ./.github/actions/rpm-delivery
with:
module_name: perl-cpan-libraries
distrib: ${{ matrix.distrib }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
stability: ${{ needs.get-environment.outputs.stability }}
deliver-deb:
needs: [get-environment, download-and-cache-deb]
if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }}