Skip to content

Test/perl 5.26.2 #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
50 changes: 50 additions & 0 deletions .github/workflows/build_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build workflow
run-name: Build workflow
on:
push:
branches-ignore:
- 'master'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest # Maybe here is a blocker
container:
image: debian:bullseye
defaults:
run:
shell: bash -le {0}
env:
BRANCH: ${{ github.ref_name }}
steps:
- name: prepare

run: |
apt-get update
apt-get -y dist-upgrade
apt-get -y install locales build-essential gettext libpq5 libpq-dev make gcc git openssh-client curl wget sudo lsb-release socat redis-server cmake
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
locale-gen
if [[ ! $BRANCH =~ perl-[0-9]+\.[0-9]+\.[0-9]+ ]]; then
echo "Error: Branch name must be perl-<version>"
exit 1
fi
VERSION=$(echo $BRANCH | sed -e 's/.*perl-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')

echo "VERSION=$VERSION" | tee -a $GITHUB_ENV
git config --global user.email "[email protected]"
git config --global user.name "ci bot"
git config --global --add safe.directory $PWD # ignore ownership problem
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4
- name: compile
run: |
bash ./rebuild.sh
- name: push
run: |
rm -rf lib bin man
mv /home/git/binary-com/perl/{bin,lib} .
git add lib bin
git commit -m "[ci skip] compile $VERSION"
git push origin HEAD:$BRANCH
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# perl
Custom compiled perl for Binary.com

# compiling steps
Custom compiled perl for deriv.com

Download source code from http://www.cpan.org/src/5.0/perl-5.26.2.tar.gz
## compiling steps

We defined `-Dusesitecustomize` and removed `-Dusethreads`. Most of other parameters are copied from `perl -V | grep config_args`
Run following command:
```
./Configure -Dusesitecustomize -Dinc_version_list=none -Dprefix=/home/git/binary-com/perl -Dvendorprefix=/home/git/regentmarkets/cpan/local -Dvendorlib=/home/git/regentmarkets/cpan/local/lib/perl5 -Dvendorarch=/home/git/regentmarkets/cpan/local/lib/perl5/x86_64-linux -Duselargefiles -Dccflags="-DDEBIAN -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" -Dldflags=" -Wl,-z,relro" -Dlddlflags="-shared -Wl,-z,relro" -Dcccdlflags="-fPIC" -Duse64bitint -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Uuseithreads -Uusemultiplicity -Ui_libutil -DDEBUGGING=-g -Doptimize=-O2 -Duseshrplib -des
make
make install
```bash
VERSION=5.26.2 ./rebuild.sh
```

## compiling it with CI

1. enable CI test in your forked repo :
at https://github.com/username/perl/settings/actions set `Allow all actions and reusable workflows`
and `Read and write permissions`. Don't forget to click `save` at both section.
2. Or create a new branch directly on binary-com/perl repo
3. create a branch whose name include a perl version `perl-x.yy.zz`, e.g. `upgrade/perl.5.38.2`

Then CI will download and compile perl and push it to your branch
Loading