Skip to content

Commit 9141fbf

Browse files
committed
try creating universal binary
1 parent aafed9b commit 9141fbf

2 files changed

Lines changed: 62 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ jobs:
7777
name: "mgconsole Windows build"
7878
path: build/src/mgconsole.exe
7979

80-
build_apple:
81-
name: Build and test mgconsole on Apple
82-
runs-on: macos-latest
80+
build_apple_arm64:
81+
name: Build and test mgconsole on Apple ARM64
82+
runs-on: macos-15
8383
steps:
8484
- name: Set-up repository
8585
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -100,9 +100,66 @@ jobs:
100100
- name: Save mgconsole MacOS build
101101
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
102102
with:
103-
name: "mgconsole MacOS build"
103+
name: "mgconsole MacOS build ARM64"
104104
path: build/src/mgconsole
105105

106+
build_apple_x86_64:
107+
name: Build and test mgconsole on Apple X86_64
108+
runs-on: macos-15-intel
109+
steps:
110+
- name: Set-up repository
111+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
112+
# NOTE: CI can't execute end2end tests because there is no way to run
113+
# Memgraph on CI MacOS machines.
114+
115+
- name: Install openssl
116+
run: |
117+
brew update
118+
brew install openssl
119+
120+
- name: Build mgconsole
121+
run: |
122+
cmake -B build -G Ninja -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DCMAKE_BUILD_TYPE=Release .
123+
cmake --build build
124+
sudo cmake --install build
125+
126+
- name: Save mgconsole MacOS build
127+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
128+
with:
129+
name: "mgconsole MacOS build X86_64"
130+
path: build/src/mgconsole
131+
132+
133+
build_apple_universal:
134+
name: Build Apple universal binary (ARM64 and X86_64)
135+
runs-on: macos-15
136+
steps:
137+
- name: Set-up repository
138+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
139+
140+
- name: Download artifacts Apple ARM64
141+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
142+
with:
143+
name: "mgconsole MacOS build ARM64"
144+
path: temp-macos-arm64
145+
146+
- name: Download artifacts Apple X86_64
147+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
148+
with:
149+
name: "mgconsole MacOS build X86_64"
150+
path: temp-macos-x86_64
151+
152+
- name: Organize binaries
153+
run: |
154+
mkdir -p macos
155+
lipo -create temp-macos-arm64/mgconsole temp-macos-x86_64/mgconsole -output macos/mgconsole
156+
157+
- name: Save mgconsole MacOS universal build
158+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
159+
with:
160+
name: "mgconsole MacOS universal build"
161+
path: macos/mgconsole
162+
106163
build_and_test_static:
107164
if: ${{ inputs.build-static }}
108165
name: Build and test mgconsole static build

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
- name: Download artifacts MacOS
112112
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
113113
with:
114-
name: "mgconsole MacOS build"
114+
name: "mgconsole MacOS universal build"
115115
path: temp-macos
116116

117117
- name: Download artifacts Windows

0 commit comments

Comments
 (0)