@@ -10,7 +10,7 @@ concurrency:
1010 cancel-in-progress : true
1111jobs :
1212 build :
13- runs-on : ubuntu-latest # Maybe here is a blocker
13+ runs-on : ubuntu-latest
1414 container :
1515 image : debian:bookworm
1616 options : --platform=linux/arm64
@@ -20,33 +20,47 @@ jobs:
2020 env :
2121 BRANCH : ${{ github.ref_name }}
2222 steps :
23- - name : prepare
24-
23+ - name : Set up QEMU
24+ uses : docker/setup-qemu-action@v3
25+ with :
26+ platforms : arm64
27+
28+ - name : Checkout
29+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
30+
31+ - name : Prepare environment
2532 run : |
2633 apt-get update
2734 apt-get -y dist-upgrade
2835 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
2936 echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
3037 locale-gen
31- if [[ ! $BRANCH =~ perl-[0-9]+\.[0-9]+\.[0-9]+ ]]; then
38+
39+ if [[ ! "$BRANCH" =~ perl-[0-9]+\.[0-9]+\.[0-9]+ ]]; then
3240 echo "Error: Branch name must be perl-<version>"
3341 exit 1
3442 fi
43+
3544 VERSION=$(echo $BRANCH | sed -e 's/.*perl-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')
36- VERSION=5.26.2
37- echo "VERSION=$VERSION" | tee -a $GITHUB_ENV
45+ echo " VERSION=$VERSION" | tee -a $GITHUB_ENV
46+
3847 git config --global user.email "cibot@deriv.com"
3948 git config --global user.name "ci bot"
40- git config --global --add safe.directory $PWD # ignore ownership problem
41- - name : Checkout
42- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
43- - name : compile
49+ git config --global --add safe.directory $GITHUB_WORKSPACE
50+
51+ - name : Update rebuild.sh for arm64
52+ run : |
53+ sed -i 's/x86_64-linux/aarch64-linux/g' rebuild.sh
54+ sed -i "s|-Dprefix=/home/git/binary-com/perl|-Dprefix=$GITHUB_WORKSPACE|g" rebuild.sh
55+
56+ - name : Compile
4457 run : |
4558 bash ./rebuild.sh
46- - name : push
59+
60+ - name : Push changes
4761 run : |
4862 rm -rf lib bin man
49- mv /home/git/binary-com/perl /{bin,lib} .
63+ cp -r $GITHUB_WORKSPACE /{bin,lib} .
5064 git add lib bin
5165 git commit -m "[ci skip] compile $VERSION"
5266 git push origin HEAD:$BRANCH
0 commit comments