Skip to content

Commit 56791c6

Browse files
authored
Merge pull request #113 from eMoflon/feature/macos-arm-version
Adds first version of ARM-based macOS variants
2 parents 7a2bb70 + 25525f7 commit 56791c6

File tree

3 files changed

+153
-16
lines changed

3 files changed

+153
-16
lines changed

.github/workflows/ci.yml

+122-1
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,120 @@ jobs:
368368
name: eclipse-emoflon-macos-dev-hipe
369369
path: eclipse-emoflon-macos-dev-hipe.zip
370370

371+
# Build Eclipse eMoflon macOS ARM user
372+
build-macos-arm-user:
373+
needs: [create-splash-image, collect-github-api-artifacts]
374+
runs-on: [macos-14]
375+
steps:
376+
- name: Start message
377+
run: echo "Started CI build (Eclipse eMoflon macOS user)."
378+
- name: Install dependencies
379+
run: |
380+
brew install p7zip coreutils grep wget curl
381+
- name: Check out repository code
382+
uses: actions/checkout@v4
383+
- name: Download splash image
384+
uses: actions/download-artifact@v4
385+
with:
386+
name: splash.bmp
387+
- name: Download emoflon-headless updatesite
388+
uses: actions/download-artifact@v4
389+
with:
390+
name: emoflon-headless-updatesite.zip
391+
- name: Move emoflon-headless updatesite
392+
run: |
393+
mkdir -p ./tmp/emoflon-headless
394+
mv emoflon-headless-updatesite.zip ./tmp/emoflon-headless/updatesite.zip
395+
- name: Download Eclipse import plugin JAR
396+
uses: actions/download-artifact@v4
397+
with:
398+
name: com.seeq.eclipse.importprojects.jar
399+
- name: Run build script
400+
run: chmod +x build.sh && ./build.sh -m user -o macosarm
401+
- name: Fix permissions
402+
run: sudo xattr -cr ./eclipse/Eclipse.app
403+
- name: Upload artifact
404+
uses: actions/upload-artifact@v4
405+
with:
406+
name: eclipse-emoflon-macos-arm-user
407+
path: eclipse-emoflon-macos-arm-user.zip
408+
409+
# Build Eclipse eMoflon macOS ARM dev
410+
build-macos-arm-dev:
411+
needs: [create-splash-image, collect-github-api-artifacts]
412+
runs-on: [macos-14]
413+
steps:
414+
- name: Start message
415+
run: echo "Started CI build (Eclipse eMoflon macOS dev)."
416+
- name: Install dependencies
417+
run: |
418+
brew install p7zip coreutils grep wget curl
419+
- name: Check out repository code
420+
uses: actions/checkout@v4
421+
- name: Download splash image
422+
uses: actions/download-artifact@v4
423+
with:
424+
name: splash.bmp
425+
- name: Download emoflon-headless updatesite
426+
uses: actions/download-artifact@v4
427+
with:
428+
name: emoflon-headless-updatesite.zip
429+
- name: Move emoflon-headless updatesite
430+
run: |
431+
mkdir -p ./tmp/emoflon-headless
432+
mv emoflon-headless-updatesite.zip ./tmp/emoflon-headless/updatesite.zip
433+
- name: Download Eclipse import plugin JAR
434+
uses: actions/download-artifact@v4
435+
with:
436+
name: com.seeq.eclipse.importprojects.jar
437+
- name: Run build script
438+
run: chmod +x build.sh && ./build.sh -m dev -o macosarm
439+
- name: Fix permissions
440+
run: sudo xattr -cr ./eclipse/Eclipse.app
441+
- name: Upload artifact
442+
uses: actions/upload-artifact@v4
443+
with:
444+
name: eclipse-emoflon-macos-arm-dev
445+
path: eclipse-emoflon-macos-arm-dev.zip
446+
447+
# Build Eclipse eMoflon macOS ARM dev HiPE
448+
build-macos-arm-dev-hipe:
449+
needs: [create-splash-image, collect-github-api-artifacts]
450+
runs-on: [macos-14]
451+
steps:
452+
- name: Start message
453+
run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)."
454+
- name: Install dependencies
455+
run: |
456+
brew install p7zip coreutils grep wget curl
457+
- name: Check out repository code
458+
uses: actions/checkout@v4
459+
- name: Download splash image
460+
uses: actions/download-artifact@v4
461+
with:
462+
name: splash.bmp
463+
- name: Download emoflon-headless updatesite
464+
uses: actions/download-artifact@v4
465+
with:
466+
name: emoflon-headless-updatesite.zip
467+
- name: Move emoflon-headless updatesite
468+
run: |
469+
mkdir -p ./tmp/emoflon-headless
470+
mv emoflon-headless-updatesite.zip ./tmp/emoflon-headless/updatesite.zip
471+
- name: Download Eclipse import plugin JAR
472+
uses: actions/download-artifact@v4
473+
with:
474+
name: com.seeq.eclipse.importprojects.jar
475+
- name: Run build script
476+
run: chmod +x build.sh && ./build.sh -m hipedev -o macosarm
477+
- name: Fix permissions
478+
run: sudo xattr -cr ./eclipse/Eclipse.app
479+
- name: Upload artifact
480+
uses: actions/upload-artifact@v4
481+
with:
482+
name: eclipse-emoflon-macos-arm-dev-hipe
483+
path: eclipse-emoflon-macos-arm-dev-hipe.zip
484+
371485
# Build Eclipse eMoflon Windows user
372486
build-windows-user:
373487
needs: [create-splash-image, collect-github-api-artifacts]
@@ -502,7 +616,7 @@ jobs:
502616

503617
# Create a release if running on tag
504618
create-release:
505-
needs: [build-linux-user, build-linux-dev, build-linux-user-ci, build-linux-dev-ci, build-linux-dev-hipe, build-macos-user, build-macos-dev, build-macos-dev-hipe, build-windows-user, build-windows-dev, build-windows-dev-hipe]
619+
needs: [build-linux-user, build-linux-dev, build-linux-user-ci, build-linux-dev-ci, build-linux-dev-hipe, build-macos-user, build-macos-dev, build-macos-dev-hipe, build-macos-arm-user, build-macos-arm-dev, build-macos-arm-dev-hipe, build-windows-user, build-windows-dev, build-windows-dev-hipe]
506620
runs-on: [ubuntu-20.04]
507621
# Only run on pushed tags (and explicitely ignore scheduled runs)
508622
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.event_name != 'schedule'
@@ -521,6 +635,12 @@ jobs:
521635
files: |
522636
eclipse-emoflon-macos-user/eclipse-emoflon-macos-user.zip
523637
eclipse-emoflon-macos-dev/eclipse-emoflon-macos-dev.zip
638+
- name: Release eclipse-emoflon-macos-arm
639+
uses: softprops/action-gh-release@v2
640+
with:
641+
files: |
642+
eclipse-emoflon-macos-arm-user/eclipse-emoflon-macos-arm-user.zip
643+
eclipse-emoflon-macos-arm-dev/eclipse-emoflon-macos-arm-dev.zip
524644
- name: Release eclipse-emoflon-linux-ci
525645
uses: softprops/action-gh-release@v2
526646
with:
@@ -544,3 +664,4 @@ jobs:
544664
with:
545665
files: |
546666
eclipse-emoflon-macos-dev-hipe/eclipse-emoflon-macos-dev-hipe.zip
667+
eclipse-emoflon-macos-arm-dev-hipe/eclipse-emoflon-macos-arm-dev-hipe.zip

README.md

+16-13
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,22 @@
44

55
This repository is used to automatically build an Eclipse [eMoflon::IBeX](https://github.com/eMoflon/emoflon-ibex) environment.
66

7-
| Name | OS | eMoflon installed | Dark theme installed | Splash image | Pattern matcher | Additional packages |
8-
|--------------------------|---------|--------------------|----------------------|--------------------|-----------------|---------------------|
9-
| Eclipse eMoflon user | Linux | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
10-
| Eclipse eMoflon dev | Linux | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
11-
| Eclipse eMoflon user CI | Linux | :heavy_check_mark: | | | HiPE | |
12-
| Eclipse eMoflon dev CI | Linux | | | | HiPE, *) | |
13-
| Eclipse eMoflon dev HiPE | Linux | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
14-
| Eclipse eMoflon user | Windows | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
15-
| Eclipse eMoflon dev | Windows | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
16-
| Eclipse eMoflon dev HiPE | Windows | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
17-
| Eclipse eMoflon user | macOS | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
18-
| Eclipse eMoflon dev | macOS | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
19-
| Eclipse eMoflon dev HiPE | macOS | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
7+
| Name | OS | eMoflon installed | Dark theme installed | Splash image | Pattern matcher | Additional packages |
8+
|--------------------------|-------------|--------------------|----------------------|--------------------|-----------------|---------------------|
9+
| Eclipse eMoflon user | Linux | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
10+
| Eclipse eMoflon dev | Linux | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
11+
| Eclipse eMoflon user CI | Linux | :heavy_check_mark: | | | HiPE | |
12+
| Eclipse eMoflon dev CI | Linux | | | | HiPE, *) | |
13+
| Eclipse eMoflon dev HiPE | Linux | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
14+
| Eclipse eMoflon user | Windows | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
15+
| Eclipse eMoflon dev | Windows | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
16+
| Eclipse eMoflon dev HiPE | Windows | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
17+
| Eclipse eMoflon user | macOS | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
18+
| Eclipse eMoflon dev | macOS | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
19+
| Eclipse eMoflon dev HiPE | macOS | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
20+
| Eclipse eMoflon user | macOS (ARM) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
21+
| Eclipse eMoflon dev | macOS (ARM) | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
22+
| Eclipse eMoflon dev HiPE | macOS (ARM) | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
2023

2124
*) Democles will be installed manually via the [emoflon-dev-workspace](https://github.com/eMoflon/emoflon-ibex#how-to-develop).
2225
Furthermore, all pattern matcher integrations for eMoflon::IBeX (HiPE and Democles) will be installed manually via the [emoflon-ibex-dev-workspace](https://github.com/eMoflon/emoflon-ibex#how-to-develop).

build.sh

+15-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ VERSION=$VERSION # version comes from the CI env
2929
ARCHIVE_FILE_LINUX="eclipse-modeling-$VERSION-R-linux-gtk-x86_64.tar.gz"
3030
ARCHIVE_FILE_WINDOWS="eclipse-modeling-$VERSION-R-win32-x86_64.zip"
3131
ARCHIVE_FILE_MACOS="eclipse-modeling-$VERSION-R-macosx-cocoa-x86_64.dmg"
32+
ARCHIVE_FILE_MACOSARM="eclipse-modeling-$VERSION-R-macosx-cocoa-aarch64.dmg"
3233
OUTPUT_FILE_PREFIX_LINUX="eclipse-emoflon-linux"
3334
OUTPUT_FILE_PREFIX_WINDOWS="eclipse-emoflon-windows"
3435
OUTOUT_FILE_PREFIX_MACOS="eclipse-emoflon-macos"
36+
OUTOUT_FILE_PREFIX_MACOSARM="eclipse-emoflon-macos-arm"
3537
MIRROR="https://ftp.fau.de"
3638
UPDATESITES="https://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/,https://hallvard.github.io/plantuml/,https://hipe-devops.github.io/HiPE-Updatesite/hipe.updatesite/,https://www.kermeta.org/k2/update,https://emoflon.org/emoflon-ibex-updatesite/snapshot/updatesite/,https://www.genuitec.com/updates/devstyle/ci/,https://download.eclipse.org/releases/$VERSION,https://www.codetogether.com/updates/ci/,http://update.eclemma.org/,https://pmd.github.io/pmd-eclipse-plugin-p2-site/,https://checkstyle.org/eclipse-cs-update-site/,https://spotbugs.github.io/eclipse/,https://download.eclipse.org/technology/m2e/releases/latest"
3739
EMOFLON_HEADLESS_SRC="https://api.github.com/repos/eMoflon/emoflon-headless/releases/latest"
@@ -68,6 +70,13 @@ elif [[ "$OS" = "macos" ]]; then
6870
ORDER=("${ORDER_LINUX[@]}")
6971
ECLIPSE_BIN_PATH="./eclipse/Eclipse.app/Contents/MacOS/eclipse"
7072
ECLIPSE_BASE_PATH="./eclipse/Eclipse.app/Contents/Eclipse"
73+
elif [[ "$OS" = "macosarm" ]]; then
74+
ARCHIVE_FILE=$ARCHIVE_FILE_MACOSARM
75+
OUTPUT_FILE_PREFIX=$OUTOUT_FILE_PREFIX_MACOSARM
76+
# Lets try with linux install order
77+
ORDER=("${ORDER_LINUX[@]}")
78+
ECLIPSE_BIN_PATH="./eclipse/Eclipse.app/Contents/MacOS/eclipse"
79+
ECLIPSE_BASE_PATH="./eclipse/Eclipse.app/Contents/Eclipse"
7180
else
7281
echo "=> OS $OS not known."
7382
exit 1
@@ -89,7 +98,7 @@ parse_package_list () {
8998

9099
# Installs a given list of packages from a given update site.
91100
install_packages () {
92-
if [[ "$OS" = "macos" ]]; then
101+
if [[ "$OS" = "macos" ]] || [[ "$OS" = "macosarm" ]]; then
93102
chmod +x $ECLIPSE_BIN_PATH
94103
fi
95104

@@ -139,7 +148,7 @@ setup_emoflon_headless_local_updatesite () {
139148
elif [[ "$OS" = "windows" ]]; then
140149
log "Using a runner on Windows."
141150
UPDATESITES+=",file://$(echo $PWD | sed -e 's/\/mnt\///g' | sed -e 's/^\///' -e 's/\//\\/g' -e 's/^./\0:/')\tmp\emoflon-headless\\"
142-
elif [[ "$OS" = "macos" ]]; then
151+
elif [[ "$OS" = "macos" ]] || [[ "$OS" = "macosarm" ]]; then
143152
log "Using a runner on macOS."
144153
UPDATESITES+=",file://$PWD/tmp/emoflon-headless/"
145154
fi
@@ -229,6 +238,10 @@ elif [[ "$OS" = "macos" ]]; then
229238
7z x $ARCHIVE_FILE_MACOS
230239
# Rename folder because "Eclipse" is inconsistent
231240
mv Eclipse eclipse
241+
elif [[ "$OS" = "macosarm" ]]; then
242+
7z x $ARCHIVE_FILE_MACOSARM
243+
# Rename folder because "Eclipse" is inconsistent
244+
mv Eclipse eclipse
232245
fi
233246

234247
# Install global Eclipse settings from config file

0 commit comments

Comments
 (0)