@@ -10,7 +10,7 @@ concurrency:
10
10
cancel-in-progress : true
11
11
jobs :
12
12
build :
13
- runs-on : ubuntu-latest # Maybe here is a blocker
13
+ runs-on : ubuntu-latest
14
14
container :
15
15
image : debian:bookworm
16
16
options : --platform=linux/arm64
@@ -20,33 +20,47 @@ jobs:
20
20
env :
21
21
BRANCH : ${{ github.ref_name }}
22
22
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
25
32
run : |
26
33
apt-get update
27
34
apt-get -y dist-upgrade
28
35
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
29
36
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
30
37
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
32
40
echo "Error: Branch name must be perl-<version>"
33
41
exit 1
34
42
fi
43
+
35
44
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
+
38
47
git config --global user.email "[email protected] "
39
48
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
44
57
run : |
45
58
bash ./rebuild.sh
46
- - name : push
59
+
60
+ - name : Push changes
47
61
run : |
48
62
rm -rf lib bin man
49
- mv /home/git/binary-com/perl /{bin,lib} .
63
+ cp -r $GITHUB_WORKSPACE /{bin,lib} .
50
64
git add lib bin
51
65
git commit -m "[ci skip] compile $VERSION"
52
66
git push origin HEAD:$BRANCH
0 commit comments