Skip to content

Commit fa66392

Browse files
authored
Merge branch 'main' into mmap
2 parents 8b64eff + af6efe0 commit fa66392

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,20 @@ defaults:
2222

2323
jobs:
2424
build:
25-
runs-on: ubuntu-latest
26-
2725
strategy:
2826
fail-fast: false
2927
matrix:
3028
include:
3129
- appimage_arch: i686
30+
runner: ubuntu-24.04
3231
- appimage_arch: x86_64
32+
runner: ubuntu-24.04
3333
- appimage_arch: armhf
34+
runner: ubuntu-24.04-arm
3435
- appimage_arch: aarch64
36+
runner: ubuntu-24.04-arm
37+
38+
runs-on: ${{ matrix.runner }}
3539

3640
steps:
3741
- name: Checkout
@@ -42,9 +46,6 @@ jobs:
4246
echo -n "https://github.com/${GITHUB_REPOSITORY}/commit/" > src/runtime/version
4347
git rev-parse --short HEAD | xargs >> src/runtime/version
4448
45-
- name: Set up QEMU integration for Docker
46-
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
47-
4849
- name: Build
4950
env:
5051
ARCH: ${{ matrix.appimage_arch }}
@@ -71,17 +72,20 @@ jobs:
7172
path: out/*
7273

7374
build-in-chroot:
74-
runs-on: ubuntu-latest
75-
# if: false
76-
7775
strategy:
7876
fail-fast: false
7977
matrix:
8078
include:
81-
- alpine_arch: x86_64
8279
- alpine_arch: x86
80+
runner: ubuntu-24.04
81+
- alpine_arch: x86_64
82+
runner: ubuntu-24.04
8383
- alpine_arch: armhf
84+
runner: ubuntu-24.04-arm
8485
- alpine_arch: aarch64
86+
runner: ubuntu-24.04-arm
87+
88+
runs-on: ${{ matrix.runner }}
8589

8690
steps:
8791
- name: Checkout
@@ -96,8 +100,6 @@ jobs:
96100
env:
97101
ALPINE_ARCH: ${{ matrix.alpine_arch }}
98102
run: |
99-
sudo apt-get update
100-
sudo apt-get -y install qemu-user-static
101103
scripts/chroot/chroot_build.sh
102104
103105
upload:

scripts/chroot/chroot_build.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,18 @@ sudo cp -p /etc/resolv.conf miniroot/etc/
7070
# build.sh combines existing scripts shared by all available build environments
7171
sudo cp -R "$repo_root_dir"/scripts miniroot/scripts
7272

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
7578
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
7880
sudo cp "$(which qemu-aarch64-static)" miniroot/usr/bin
7981
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
8283
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
8485
else
8586
echo "Edit chroot_build.sh to support this architecture as well, it should be easy"
8687
exit 1

0 commit comments

Comments
 (0)