Skip to content

Commit 8ef35ed

Browse files
committed
Merge branch 'dev-aarch64'
2 parents 7d8db47 + 049c71e commit 8ef35ed

File tree

7 files changed

+64
-27
lines changed

7 files changed

+64
-27
lines changed

.github/workflows/_build-emacs.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branch:
88
required: true
99
type: string
10+
arch:
11+
required: true
12+
type: string
1013
patch:
1114
type: string
1215
build_gui:
@@ -27,9 +30,14 @@ on:
2730
jobs:
2831

2932
build-emacs:
30-
runs-on: ubuntu-latest
33+
runs-on: ${{ inputs.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
3134

3235
steps:
36+
- name: Confirm arch
37+
run: |
38+
echo $(uname -m)
39+
test $(uname -m) = ${{ inputs.arch }}
40+
3341
- name: Install fuse
3442
run: sudo apt-get install -y fuse libfuse2
3543

@@ -51,33 +59,33 @@ jobs:
5159
- name: Download builder image
5260
uses: actions/download-artifact@v4
5361
with:
54-
name: builder-image
62+
name: ${{ inputs.arch }}-builder-image
5563
path: /tmp
5664

5765
- name: Load builder image
5866
run: |
59-
docker load -i /tmp/builder-image.tar
67+
docker load -i /tmp/${{ inputs.arch }}-builder-image.tar
6068
docker image ls -a
6169
6270
- name: Download tester ubuntu2004 image
6371
if: ${{ inputs.do_test }}
6472
uses: actions/download-artifact@v4
6573
with:
66-
name: tester-image_ubuntu2004
74+
name: ${{ inputs.arch }}-tester-image_ubuntu2004
6775
path: /tmp
6876

6977
- name: Download tester archlinux image
7078
if: ${{ inputs.do_test }}
7179
uses: actions/download-artifact@v4
7280
with:
73-
name: tester-image_archlinux
81+
name: ${{ inputs.arch }}-tester-image_archlinux
7482
path: /tmp
7583

7684
- name: Load tester image
7785
if: ${{ inputs.do_test }}
7886
run: |
79-
docker load -i /tmp/tester-image_ubuntu2004.tar
80-
docker load -i /tmp/tester-image_archlinux.tar
87+
docker load -i /tmp/${{ inputs.arch }}-tester-image_ubuntu2004.tar
88+
docker load -i /tmp/${{ inputs.arch }}-tester-image_archlinux.tar
8189
docker image ls -a
8290
8391
- name: Build and package
@@ -98,7 +106,7 @@ jobs:
98106
- name: Upload binary as artifact
99107
uses: actions/upload-artifact@v4
100108
with:
101-
name: Emacs-${{ inputs.name }}-${{ inputs.build_gui }}.AppImage
109+
name: Emacs-${{ inputs.name }}-${{ inputs.build_gui }}-${{ inputs.arch }}.AppImage
102110
path: dist/Emacs.AppImage
103111
compression-level: 0
104112

@@ -108,7 +116,7 @@ jobs:
108116
with:
109117
repo_token: ${{ secrets.GITHUB_TOKEN }}
110118
file: dist/Emacs.AppImage
111-
asset_name: Emacs-${{ inputs.name }}-${{ inputs.build_gui }}.AppImage
119+
asset_name: Emacs-${{ inputs.name }}-${{ inputs.build_gui }}-${{ inputs.arch }}.AppImage
112120
tag: github-action-build-${{ github.run_id }}
113121
release_name: ${{ inputs.release_name }}
114122
prerelease: ${{ !inputs.release_latest }}

.github/workflows/_prepare-docker.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
on:
22
workflow_call:
3+
inputs:
4+
arch:
5+
required: true
6+
type: string
37

48
jobs:
59
prepare-builder-docker:
6-
runs-on: ubuntu-latest
10+
runs-on: ${{ inputs.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
711

812
steps:
913
- name: Checkout
@@ -19,17 +23,18 @@ jobs:
1923
cache-from: type=gha
2024
cache-to: type=gha,mode=max
2125
tags: builder-image:latest
22-
outputs: type=docker,dest=/tmp/builder-image.tar
26+
outputs: type=docker,dest=/tmp/${{ inputs.arch }}-builder-image.tar
2327

2428
- name: Upload artifact
2529
uses: actions/upload-artifact@v4
2630
with:
27-
name: builder-image
28-
path: /tmp/builder-image.tar
31+
name: ${{ inputs.arch }}-builder-image
32+
path: /tmp/${{ inputs.arch }}-builder-image.tar
2933
compression-level: 0
3034

3135
prepare-tester-docker-ubuntu2004:
32-
runs-on: ubuntu-latest
36+
if: ${{ inputs.arch == 'x86_64' }}
37+
runs-on: 'ubuntu-latest'
3338

3439
steps:
3540
- name: Checkout
@@ -45,16 +50,17 @@ jobs:
4550
# cache-from: type=gha
4651
# cache-to: type=gha,mode=max
4752
tags: tester-image_ubuntu2004:latest
48-
outputs: type=docker,dest=/tmp/tester-image_ubuntu2004.tar
53+
outputs: type=docker,dest=/tmp/${{ inputs.arch }}-tester-image_ubuntu2004.tar
4954

5055
- name: Upload artifact
5156
uses: actions/upload-artifact@v4
5257
with:
53-
name: tester-image_ubuntu2004
54-
path: /tmp/tester-image_ubuntu2004.tar
58+
name: ${{ inputs.arch }}-tester-image_ubuntu2004
59+
path: /tmp/${{ inputs.arch }}-tester-image_ubuntu2004.tar
5560
compression-level: 0
5661

5762
prepare-tester-docker-archlinux:
63+
if: ${{ inputs.arch == 'x86_64' }}
5864
runs-on: ubuntu-latest
5965

6066
steps:
@@ -71,11 +77,11 @@ jobs:
7177
# cache-from: type=gha
7278
# cache-to: type=gha,mode=max
7379
tags: tester-image_archlinux:latest
74-
outputs: type=docker,dest=/tmp/tester-image_archlinux.tar
80+
outputs: type=docker,dest=/tmp/${{ inputs.arch }}-tester-image_archlinux.tar
7581

7682
- name: Upload artifact
7783
uses: actions/upload-artifact@v4
7884
with:
79-
name: tester-image_archlinux
80-
path: /tmp/tester-image_archlinux.tar
85+
name: ${{ inputs.arch }}-tester-image_archlinux
86+
path: /tmp/${{ inputs.arch }}-tester-image_archlinux.tar
8187
compression-level: 0

.github/workflows/daily-master.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ jobs:
1616

1717
prepare-docker:
1818
uses: ./.github/workflows/_prepare-docker.yml
19+
with:
20+
arch: ${{ matrix.arch }}
21+
strategy:
22+
matrix:
23+
arch:
24+
- x86_64
25+
- aarch64
1926

2027
setup-vars:
2128
runs-on: ubuntu-latest
@@ -38,14 +45,18 @@ jobs:
3845
- x11
3946
- pgtk
4047
- nox
48+
arch:
49+
- x86_64
50+
- aarch64
4151

4252
uses: ./.github/workflows/_build-emacs.yml
4353
with:
4454
name: master
55+
arch: ${{ matrix.arch }}
4556
branch: master
4657
build_gui: ${{ matrix.build_gui }}
4758
build_native_comp: aot
48-
do_test: true
59+
do_test: ${{ matrix.arch == 'x86_64' }}
4960
do_release: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
5061
release_name: Daily master build ${{ needs.setup-vars.outputs.datetimestr }}
5162
release_latest: false

.github/workflows/daily-mps.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ jobs:
1616

1717
prepare-docker:
1818
uses: ./.github/workflows/_prepare-docker.yml
19+
with:
20+
arch: ${{ matrix.arch }}
21+
strategy:
22+
matrix:
23+
arch:
24+
- x86_64
25+
- aarch64
1926

2027
setup-vars:
2128
runs-on: ubuntu-latest
@@ -41,10 +48,14 @@ jobs:
4148
build_native_comp:
4249
- "no"
4350
- "aot"
51+
arch:
52+
- x86_64
53+
- aarch64
4454

4555
uses: ./.github/workflows/_build-emacs.yml
4656
with:
4757
name: mps-${{ matrix.build_native_comp == 'no' && 'no_native_comp' || 'native_comp' }}
58+
arch: ${{ matrix.arch }}
4859
branch: feature/igc
4960
build_gui: ${{ matrix.build_gui }}
5061
build_native_comp: ${{ matrix.build_native_comp }}

build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ docker run \
2323
docker cp $CONTAINER_ID:/work/dist ./dist
2424

2525
# download appimagetool-x86_64.AppImage if not exists
26-
if [ ! -f ./appimagetool-x86_64.AppImage ]; then
27-
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
28-
chmod +x ./appimagetool-x86_64.AppImage
26+
if [ ! -f ./appimagetool.AppImage ]; then
27+
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$(uname -m).AppImage \
28+
-O ./appimagetool.AppImage
29+
chmod +x ./appimagetool.AppImage
2930
fi
3031

31-
ARCH=x86_64 ./appimagetool-x86_64.AppImage --no-appstream ./dist/AppDir ./dist/Emacs.AppImage
32+
ARCH=$(uname -m) ./appimagetool.AppImage --no-appstream ./dist/AppDir ./dist/Emacs.AppImage

scripts/AppRun

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ VERSION=$(readlink "$APPIMAGE_ROOT/bin/emacs" | sed -e 's/emacs-//')
77
export EMACSLOADPATH="$APPIMAGE_ROOT/share/emacs/$VERSION/lisp"
88
export EMACSDATA="$APPIMAGE_ROOT/share/emacs/$VERSION/etc"
99
export EMACSDOC="$APPIMAGE_ROOT/share/emacs/$VERSION/etc"
10-
export EMACSPATH="$APPIMAGE_ROOT/libexec/emacs/$VERSION/x86_64-pc-linux-gnu"
10+
export EMACSPATH="$APPIMAGE_ROOT/libexec/emacs/$VERSION/*"
1111
export PATH="$APPIMAGE_ROOT/bin:$PATH"
1212

1313
# check --emacs-appimage-run-as argument

scripts/build_emacs_in_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if [ "$BUILD_GUI" != "no" ]; then
3737
ARGS+=" --with-gif --with-png --with-rsvg --with-webp"
3838
ARGS+=" --with-harfbuzz --with-cairo --with-libotf --without-m17n-flt"
3939
# use static lib for libjpeg, to prevent incompatible libjpeg.so version because it's depend by gtk
40-
ARGS+=" --with-jpeg emacs_cv_jpeglib=/usr/lib/x86_64-linux-gnu/libjpeg.a"
40+
ARGS+=" --with-jpeg emacs_cv_jpeglib=/usr/lib/$(uname -m)-linux-gnu/libjpeg.a"
4141
fi
4242

4343

0 commit comments

Comments
 (0)