@@ -11,14 +11,6 @@ concurrency:
11
11
jobs :
12
12
build :
13
13
runs-on : ubuntu-latest
14
- container :
15
- image : debian:bookworm
16
- options : --platform=linux/arm64
17
- defaults :
18
- run :
19
- shell : bash -le {0}
20
- env :
21
- BRANCH : ${{ github.ref_name }}
22
14
steps :
23
15
- name : Set up QEMU
24
16
uses : docker/setup-qemu-action@v3
@@ -28,39 +20,44 @@ jobs:
28
20
- name : Checkout
29
21
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
30
22
31
- - name : Prepare environment
32
- run : |
33
- apt-get update
34
- apt-get -y dist-upgrade
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
36
- echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
37
- locale-gen
38
-
39
- if [[ ! "$BRANCH" =~ perl-[0-9]+\.[0-9]+\.[0-9]+ ]]; then
40
- echo "Error: Branch name must be perl-<version>"
41
- exit 1
42
- fi
43
-
44
- VERSION=$(echo $BRANCH | sed -e 's/.*perl-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')
45
- echo "VERSION=$VERSION" | tee -a $GITHUB_ENV
46
-
47
- git config --global user.email "[email protected] "
48
- git config --global user.name "ci bot"
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
57
- run : |
58
- bash ./rebuild.sh
59
-
60
- - name : Push changes
61
- run : |
62
- rm -rf lib bin man
63
- cp -r $GITHUB_WORKSPACE/{bin,lib} .
64
- git add lib bin
65
- git commit -m "[ci skip] compile $VERSION"
66
- git push origin HEAD:$BRANCH
23
+ - name : Run in ARM64 container
24
+ uses : addnab/docker-run-action@v3
25
+ with :
26
+ image : debian:bookworm
27
+ options : --platform=linux/arm64 -v ${{ github.workspace }}:/workspace
28
+ run : |
29
+ cd /workspace
30
+ apt-get update
31
+ apt-get -y dist-upgrade
32
+ 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
33
+ echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
34
+ locale-gen
35
+
36
+ # Verify we're running on ARM64
37
+ echo "Architecture: $(uname -m)"
38
+
39
+ if [[ ! "${{ github.ref_name }}" =~ perl-[0-9]+\.[0-9]+\.[0-9]+ ]]; then
40
+ echo "Error: Branch name must be perl-<version>"
41
+ exit 1
42
+ fi
43
+
44
+ VERSION=$(echo ${{ github.ref_name }} | sed -e 's/.*perl-\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/')
45
+ echo "VERSION=$VERSION"
46
+
47
+ git config --global user.email "[email protected] "
48
+ git config --global user.name "ci bot"
49
+ git config --global --add safe.directory /workspace
50
+
51
+ # Update rebuild.sh for arm64
52
+ sed -i 's/x86_64-linux/aarch64-linux/g' rebuild.sh
53
+ sed -i "s|-Dprefix=/home/git/binary-com/perl|-Dprefix=/workspace|g" rebuild.sh
54
+
55
+ # Compile
56
+ bash ./rebuild.sh
57
+
58
+ # Push changes
59
+ rm -rf lib bin man
60
+ cp -r /workspace/{bin,lib} .
61
+ git add lib bin
62
+ git commit -m "[ci skip] compile $VERSION"
63
+ git push origin HEAD:${{ github.ref_name }}
0 commit comments