Skip to content

Commit

Permalink
use fpm for debian libs
Browse files Browse the repository at this point in the history
  • Loading branch information
sdepassio committed Feb 10, 2025
1 parent 5b107d9 commit 5d2f756
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/perl-new-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ jobs:
export SYBASE="/usr"
temp_file=$(mktemp)
echo "default.local" | sudo tee /etc/mailname
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --rpm-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES$PACKAGE_VERSION ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")')
# Check package name
if [ -z "$created_package" ]; then
Expand Down Expand Up @@ -269,6 +270,11 @@ jobs:
- name: Crypt::Argon2
build_names: "bullseye-amd64,jammy"
preinstall_cpanlibs: "Dist::Build"
use_dh_make_perl: "false"
- name: Libssh::Session
use_dh_make_perl: "false"
- name: Net::Curl
use_dh_make_perl: "false"
name: package ${{ matrix.distrib }} ${{ matrix.arch }} ${{ matrix.name }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
Expand Down Expand Up @@ -349,6 +355,7 @@ jobs:
fi
temp_file=$(mktemp)
echo "default.local" | sudo tee /etc/mailname
created_package=$(fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES -v ${{ steps.package-infos.outputs.package_version }} ${{ matrix.name }} | tee "$temp_file" | grep "Created package" | grep -oP '(?<=:path=>").*?(?=")') || { echo "Error: fpm command failed"; exit 1; }
# Check package name
if [ -z "$created_package" ]; then
Expand All @@ -369,7 +376,7 @@ jobs:
created_package=$(DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --dist ${{ matrix.distrib }} --build --version ${{ steps.package-infos.outputs.package_version }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --cpan ${{ matrix.name }} | tee "$temp_file" | grep "building package" | grep -oP "(?<=in '..\/).*.deb(?=')") || { echo "Error: dh-make-perl command failed"; exit 1; }
# Check package name
if [ -z "$created_package" ]; then
echo "Error: fpm command failed"
echo "Error: dh-make-perl command failed"
exit 1
fi
# Check deb
Expand Down Expand Up @@ -506,7 +513,7 @@ jobs:
shell: bash

- name: Restore packages from cache
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: ./*.${{ matrix.package_extension }}
key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
Expand Down

0 comments on commit 5d2f756

Please sign in to comment.