Skip to content

Commit

Permalink
Cleaning installation of tools/libs already in the docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
sdepassio committed Dec 26, 2024
1 parent 6ef150d commit 62f5134
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ apt-get install -y \
libapp-fatpacker-perl \
libcurl4-openssl-dev \
libczmq-dev \
libczmq-dev\
libfile-copy-recursive-perl \
libjson-perl \
libmodule-build-tiny-perl \
Expand All @@ -58,6 +57,8 @@ cpanm Crypt::OpenSSL::Guess

gem install fpm

# Patch to apply fpm fix for debian package generation while waiting for the official fix to be released.
patch -i .github/patch/fpm-deb.rb.diff $(find / -type f -name "deb.rb")

echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt-get update
Expand Down
37 changes: 11 additions & 26 deletions .github/workflows/perl-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ concurrency:

on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/perl-cpan-libraries.yml"
push:
branches:
- develop
- dev-[2-9][0-9].[0-9][0-9].x
- master
- "[2-9][0-9].[0-9][0-9].x"
paths:
- ".github/workflows/perl-cpan-libraries.yml"
# pull_request:
# paths:
# - ".github/workflows/perl-cpan-libraries.yml"
# push:
# branches:
# - develop
# - dev-[2-9][0-9].[0-9][0-9].x
# - master
# - "[2-9][0-9].[0-9][0-9].x"
# paths:
# - ".github/workflows/perl-cpan-libraries.yml"

jobs:
get-environment:
Expand Down Expand Up @@ -411,9 +411,6 @@ jobs:
name: Get package version
id: package-version
run: |
apt-get update
apt-get install -y cpanminus
if [ -z "${{ matrix.version }}" ]; then
CPAN_PACKAGE_VERSION=$(cpanm --info ${{ matrix.name }} | sed 's/\.tar\.gz$//' | sed 's/.*\-//' | sed 's/v//')
Expand Down Expand Up @@ -447,8 +444,6 @@ jobs:

- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }}
run: |
apt-get install -y ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev
if [ -z "${{ matrix.deb_dependencies }}" ]; then
PACKAGE_DEPENDENCIES=""
else
Expand All @@ -461,21 +456,11 @@ jobs:
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends"
fi
cpanm Module::Build::Tiny
cpanm Module::Install
gem install fpm
# Patch to apply fpm fix for debian package generation while waiting for the official fix to be released.
patch -i .github/patch/fpm-deb.rb.diff $(find / -type f -name "deb.rb")
fpm -a native -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-version.outputs.package_version }} ${{ matrix.name }}
shell: bash

- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }}
run: |
apt-get install -y libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl libmodule-build-tiny-perl
# module-build-tiny is required for Mojo::IOLoop::Signal build.
DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --dist ${{ matrix.distrib }} --build --version ${{ steps.package-version.outputs.package_version }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --cpan ${{ matrix.name }}
shell: bash

Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/test-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,6 @@ jobs:
name: Get package version
id: package-version
run: |
apt-get update
apt-get install -y cpanminus
if [ -z "${{ matrix.version }}" ]; then
CPAN_PACKAGE_VERSION=$(cpanm --info ${{ matrix.name }} | sed 's/\.tar\.gz$//' | sed 's/.*\-//' | sed 's/v//')
Expand Down Expand Up @@ -425,8 +422,6 @@ jobs:

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
run: |
apt-get install -y ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev
if [ -z "${{ matrix.deb_dependencies }}" ]; then
PACKAGE_DEPENDENCIES=""
else
Expand All @@ -439,10 +434,6 @@ jobs:
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends"
fi
cpanm Module::Build::Tiny
cpanm Module::Install
gem install fpm
# Patch to apply fpm fix for debian package generation while waiting for the official fix to be released.
patch -i .github/patch/fpm-deb.rb.diff $(find / -type f -name "deb.rb")
Expand Down

0 comments on commit 62f5134

Please sign in to comment.