File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -72,17 +72,20 @@ jobs:
72
72
path : out/*
73
73
74
74
build-in-chroot :
75
- runs-on : ubuntu-latest
76
- # if: false
77
-
78
75
strategy :
79
76
fail-fast : false
80
77
matrix :
81
78
include :
82
- - alpine_arch : x86_64
83
79
- alpine_arch : x86
80
+ runner : ubuntu-24.04
81
+ - alpine_arch : x86_64
82
+ runner : ubuntu-24.04
84
83
- alpine_arch : armhf
84
+ runner : ubuntu-24.04-arm
85
85
- alpine_arch : aarch64
86
+ runner : ubuntu-24.04-arm
87
+
88
+ runs-on : ${{ matrix.runner }}
86
89
87
90
steps :
88
91
- name : Checkout
97
100
env :
98
101
ALPINE_ARCH : ${{ matrix.alpine_arch }}
99
102
run : |
100
- sudo apt-get update
101
- sudo apt-get -y install qemu-user-static
102
103
scripts/chroot/chroot_build.sh
103
104
104
105
upload :
Original file line number Diff line number Diff line change @@ -70,17 +70,18 @@ sudo cp -p /etc/resolv.conf miniroot/etc/
70
70
# build.sh combines existing scripts shared by all available build environments
71
71
sudo cp -R " $repo_root_dir " /scripts miniroot/scripts
72
72
73
- if [ " $ALPINE_ARCH " = " x86" ] || [ " $ALPINE_ARCH " = " x86_64" ]; then
74
- echo " Architecture is x86 or x86_64, hence not using qemu-arm-static"
73
+ if [ \
74
+ " $( uname -m) " = " ${ALPINE_ARCH} " \
75
+ -o " ${ALPINE_ARCH} " = " x86" -a " $( uname -m) " = " x86_64" \
76
+ -o " ${ALPINE_ARCH} " = " armhf" -a " $( uname -m) " = " aarch64" \
77
+ ]; then
75
78
sudo chroot miniroot /bin/sh -ex /scripts/chroot/build.sh
76
- elif [ " $ALPINE_ARCH " = " aarch64" ] ; then
77
- echo " Architecture is aarch64, hence using qemu-aarch64-static"
79
+ elif [ " ${ALPINE_ARCH} " = " aarch64" ] ; then
78
80
sudo cp " $( which qemu-aarch64-static) " miniroot/usr/bin
79
81
sudo chroot miniroot qemu-aarch64-static /bin/sh -ex /scripts/chroot/build.sh
80
- elif [ " $ALPINE_ARCH " = " armhf" ] ; then
81
- echo " Architecture is armhf, hence using qemu-arm-static"
82
+ elif [ " ${ALPINE_ARCH} " = " armhf" ] ; then
82
83
sudo cp " $( which qemu-arm-static) " miniroot/usr/bin
83
- sudo cp " $repo_root_dir " /scripts/chroot/build.sh miniroot/build.sh && sudo chroot miniroot qemu-arm-static /bin/sh -ex /scripts/chroot/build.sh
84
+ sudo chroot miniroot qemu-arm-static /bin/sh -ex /scripts/chroot/build.sh
84
85
else
85
86
echo " Edit chroot_build.sh to support this architecture as well, it should be easy"
86
87
exit 1
You can’t perform that action at this time.
0 commit comments