Skip to content

Commit

Permalink
Merge pull request #113 from eMoflon/feature/macos-arm-version
Browse files Browse the repository at this point in the history
Adds first version of ARM-based macOS variants
  • Loading branch information
maxkratz authored Jul 17, 2024
2 parents 7a2bb70 + 25525f7 commit 56791c6
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 16 deletions.
123 changes: 122 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,120 @@ jobs:
name: eclipse-emoflon-macos-dev-hipe
path: eclipse-emoflon-macos-dev-hipe.zip

# Build Eclipse eMoflon macOS ARM user
build-macos-arm-user:
needs: [create-splash-image, collect-github-api-artifacts]
runs-on: [macos-14]
steps:
- name: Start message
run: echo "Started CI build (Eclipse eMoflon macOS user)."
- name: Install dependencies
run: |
brew install p7zip coreutils grep wget curl
- name: Check out repository code
uses: actions/checkout@v4
- name: Download splash image
uses: actions/download-artifact@v4
with:
name: splash.bmp
- name: Download emoflon-headless updatesite
uses: actions/download-artifact@v4
with:
name: emoflon-headless-updatesite.zip
- name: Move emoflon-headless updatesite
run: |
mkdir -p ./tmp/emoflon-headless
mv emoflon-headless-updatesite.zip ./tmp/emoflon-headless/updatesite.zip
- name: Download Eclipse import plugin JAR
uses: actions/download-artifact@v4
with:
name: com.seeq.eclipse.importprojects.jar
- name: Run build script
run: chmod +x build.sh && ./build.sh -m user -o macosarm
- name: Fix permissions
run: sudo xattr -cr ./eclipse/Eclipse.app
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: eclipse-emoflon-macos-arm-user
path: eclipse-emoflon-macos-arm-user.zip

# Build Eclipse eMoflon macOS ARM dev
build-macos-arm-dev:
needs: [create-splash-image, collect-github-api-artifacts]
runs-on: [macos-14]
steps:
- name: Start message
run: echo "Started CI build (Eclipse eMoflon macOS dev)."
- name: Install dependencies
run: |
brew install p7zip coreutils grep wget curl
- name: Check out repository code
uses: actions/checkout@v4
- name: Download splash image
uses: actions/download-artifact@v4
with:
name: splash.bmp
- name: Download emoflon-headless updatesite
uses: actions/download-artifact@v4
with:
name: emoflon-headless-updatesite.zip
- name: Move emoflon-headless updatesite
run: |
mkdir -p ./tmp/emoflon-headless
mv emoflon-headless-updatesite.zip ./tmp/emoflon-headless/updatesite.zip
- name: Download Eclipse import plugin JAR
uses: actions/download-artifact@v4
with:
name: com.seeq.eclipse.importprojects.jar
- name: Run build script
run: chmod +x build.sh && ./build.sh -m dev -o macosarm
- name: Fix permissions
run: sudo xattr -cr ./eclipse/Eclipse.app
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: eclipse-emoflon-macos-arm-dev
path: eclipse-emoflon-macos-arm-dev.zip

# Build Eclipse eMoflon macOS ARM dev HiPE
build-macos-arm-dev-hipe:
needs: [create-splash-image, collect-github-api-artifacts]
runs-on: [macos-14]
steps:
- name: Start message
run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)."
- name: Install dependencies
run: |
brew install p7zip coreutils grep wget curl
- name: Check out repository code
uses: actions/checkout@v4
- name: Download splash image
uses: actions/download-artifact@v4
with:
name: splash.bmp
- name: Download emoflon-headless updatesite
uses: actions/download-artifact@v4
with:
name: emoflon-headless-updatesite.zip
- name: Move emoflon-headless updatesite
run: |
mkdir -p ./tmp/emoflon-headless
mv emoflon-headless-updatesite.zip ./tmp/emoflon-headless/updatesite.zip
- name: Download Eclipse import plugin JAR
uses: actions/download-artifact@v4
with:
name: com.seeq.eclipse.importprojects.jar
- name: Run build script
run: chmod +x build.sh && ./build.sh -m hipedev -o macosarm
- name: Fix permissions
run: sudo xattr -cr ./eclipse/Eclipse.app
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: eclipse-emoflon-macos-arm-dev-hipe
path: eclipse-emoflon-macos-arm-dev-hipe.zip

# Build Eclipse eMoflon Windows user
build-windows-user:
needs: [create-splash-image, collect-github-api-artifacts]
Expand Down Expand Up @@ -502,7 +616,7 @@ jobs:

# Create a release if running on tag
create-release:
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]
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]
runs-on: [ubuntu-20.04]
# Only run on pushed tags (and explicitely ignore scheduled runs)
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.event_name != 'schedule'
Expand All @@ -521,6 +635,12 @@ jobs:
files: |
eclipse-emoflon-macos-user/eclipse-emoflon-macos-user.zip
eclipse-emoflon-macos-dev/eclipse-emoflon-macos-dev.zip
- name: Release eclipse-emoflon-macos-arm
uses: softprops/action-gh-release@v2
with:
files: |
eclipse-emoflon-macos-arm-user/eclipse-emoflon-macos-arm-user.zip
eclipse-emoflon-macos-arm-dev/eclipse-emoflon-macos-arm-dev.zip
- name: Release eclipse-emoflon-linux-ci
uses: softprops/action-gh-release@v2
with:
Expand All @@ -544,3 +664,4 @@ jobs:
with:
files: |
eclipse-emoflon-macos-dev-hipe/eclipse-emoflon-macos-dev-hipe.zip
eclipse-emoflon-macos-arm-dev-hipe/eclipse-emoflon-macos-arm-dev-hipe.zip
29 changes: 16 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@

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

| Name | OS | eMoflon installed | Dark theme installed | Splash image | Pattern matcher | Additional packages |
|--------------------------|---------|--------------------|----------------------|--------------------|-----------------|---------------------|
| Eclipse eMoflon user | Linux | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
| Eclipse eMoflon dev | Linux | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
| Eclipse eMoflon user CI | Linux | :heavy_check_mark: | | | HiPE | |
| Eclipse eMoflon dev CI | Linux | | | | HiPE, *) | |
| Eclipse eMoflon dev HiPE | Linux | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
| Eclipse eMoflon user | Windows | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
| Eclipse eMoflon dev | Windows | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
| Eclipse eMoflon dev HiPE | Windows | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
| Eclipse eMoflon user | macOS | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
| Eclipse eMoflon dev | macOS | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
| Eclipse eMoflon dev HiPE | macOS | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
| Name | OS | eMoflon installed | Dark theme installed | Splash image | Pattern matcher | Additional packages |
|--------------------------|-------------|--------------------|----------------------|--------------------|-----------------|---------------------|
| Eclipse eMoflon user | Linux | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
| Eclipse eMoflon dev | Linux | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
| Eclipse eMoflon user CI | Linux | :heavy_check_mark: | | | HiPE | |
| Eclipse eMoflon dev CI | Linux | | | | HiPE, *) | |
| Eclipse eMoflon dev HiPE | Linux | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
| Eclipse eMoflon user | Windows | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
| Eclipse eMoflon dev | Windows | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
| Eclipse eMoflon dev HiPE | Windows | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
| Eclipse eMoflon user | macOS | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
| Eclipse eMoflon dev | macOS | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
| Eclipse eMoflon dev HiPE | macOS | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |
| Eclipse eMoflon user | macOS (ARM) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | HiPE | :heavy_check_mark: |
| Eclipse eMoflon dev | macOS (ARM) | | :heavy_check_mark: | :heavy_check_mark: | HiPE, *) | :heavy_check_mark: |
| Eclipse eMoflon dev HiPE | macOS (ARM) | | :heavy_check_mark: | :heavy_check_mark: | *) | :heavy_check_mark: |

*) Democles will be installed manually via the [emoflon-dev-workspace](https://github.com/eMoflon/emoflon-ibex#how-to-develop).
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).
Expand Down
17 changes: 15 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ VERSION=$VERSION # version comes from the CI env
ARCHIVE_FILE_LINUX="eclipse-modeling-$VERSION-R-linux-gtk-x86_64.tar.gz"
ARCHIVE_FILE_WINDOWS="eclipse-modeling-$VERSION-R-win32-x86_64.zip"
ARCHIVE_FILE_MACOS="eclipse-modeling-$VERSION-R-macosx-cocoa-x86_64.dmg"
ARCHIVE_FILE_MACOSARM="eclipse-modeling-$VERSION-R-macosx-cocoa-aarch64.dmg"
OUTPUT_FILE_PREFIX_LINUX="eclipse-emoflon-linux"
OUTPUT_FILE_PREFIX_WINDOWS="eclipse-emoflon-windows"
OUTOUT_FILE_PREFIX_MACOS="eclipse-emoflon-macos"
OUTOUT_FILE_PREFIX_MACOSARM="eclipse-emoflon-macos-arm"
MIRROR="https://ftp.fau.de"
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"
EMOFLON_HEADLESS_SRC="https://api.github.com/repos/eMoflon/emoflon-headless/releases/latest"
Expand Down Expand Up @@ -68,6 +70,13 @@ elif [[ "$OS" = "macos" ]]; then
ORDER=("${ORDER_LINUX[@]}")
ECLIPSE_BIN_PATH="./eclipse/Eclipse.app/Contents/MacOS/eclipse"
ECLIPSE_BASE_PATH="./eclipse/Eclipse.app/Contents/Eclipse"
elif [[ "$OS" = "macosarm" ]]; then
ARCHIVE_FILE=$ARCHIVE_FILE_MACOSARM
OUTPUT_FILE_PREFIX=$OUTOUT_FILE_PREFIX_MACOSARM
# Lets try with linux install order
ORDER=("${ORDER_LINUX[@]}")
ECLIPSE_BIN_PATH="./eclipse/Eclipse.app/Contents/MacOS/eclipse"
ECLIPSE_BASE_PATH="./eclipse/Eclipse.app/Contents/Eclipse"
else
echo "=> OS $OS not known."
exit 1
Expand All @@ -89,7 +98,7 @@ parse_package_list () {

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

Expand Down Expand Up @@ -139,7 +148,7 @@ setup_emoflon_headless_local_updatesite () {
elif [[ "$OS" = "windows" ]]; then
log "Using a runner on Windows."
UPDATESITES+=",file://$(echo $PWD | sed -e 's/\/mnt\///g' | sed -e 's/^\///' -e 's/\//\\/g' -e 's/^./\0:/')\tmp\emoflon-headless\\"
elif [[ "$OS" = "macos" ]]; then
elif [[ "$OS" = "macos" ]] || [[ "$OS" = "macosarm" ]]; then
log "Using a runner on macOS."
UPDATESITES+=",file://$PWD/tmp/emoflon-headless/"
fi
Expand Down Expand Up @@ -229,6 +238,10 @@ elif [[ "$OS" = "macos" ]]; then
7z x $ARCHIVE_FILE_MACOS
# Rename folder because "Eclipse" is inconsistent
mv Eclipse eclipse
elif [[ "$OS" = "macosarm" ]]; then
7z x $ARCHIVE_FILE_MACOSARM
# Rename folder because "Eclipse" is inconsistent
mv Eclipse eclipse
fi

# Install global Eclipse settings from config file
Expand Down

0 comments on commit 56791c6

Please sign in to comment.