Skip to content

Commit 2395866

Browse files
committed
test for macos arm64 build
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
1 parent 121858a commit 2395866

File tree

2 files changed

+95
-11
lines changed

2 files changed

+95
-11
lines changed

.github/workflows/build.yml

+94-11
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ jobs:
9595
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9696

9797

98-
# -------------------
99-
# --- macOS steps ---
100-
# -------------------
98+
# -------------------------
99+
# --- macOS intel steps ---
100+
# -------------------------
101101
#
102-
macos-x86_64:
102+
macos-intel:
103103
runs-on: macos-13
104104
steps:
105105

@@ -128,9 +128,9 @@ jobs:
128128
mkdir build
129129
brew install qt@5 fftw binutils create-dmg || true
130130
131-
- name: macOS Build
131+
- name: macOS intel Build
132132
# GitHub hosts macOS runners in GitHub's own macOS Cloud:
133-
# 3-core CPU, 14 GB of RAM memory, 14 GB of SSD disk space
133+
# 4-core CPU, 14 GB of RAM memory, 14 GB of SSD disk space
134134
working-directory: ${{github.workspace}}/build
135135
run: |
136136
cp ../CHANGELOG changelog
@@ -152,23 +152,106 @@ jobs:
152152
true
153153
fi
154154
if test -d openhantek/OpenHantek.app; then
155-
cd openhantek ; sudo tar -czf ../packages/openhantek_*_osx_*.tar.gz OpenHantek.app
155+
cd openhantek ; sudo tar -czf ../packages/openhantek_*_osx_intel_*.tar.gz OpenHantek.app
156156
if test -f OpenHantek.dmg; then
157-
sudo mv OpenHantek.dmg ../packages/$(basename ../packages/openhantek_*_osx_*.tar.gz .tar.gz).dmg
157+
sudo mv OpenHantek.dmg ../packages/$(basename ../packages/openhantek_*_osx_intel_*.tar.gz .tar.gz).dmg
158158
fi
159159
cd ..
160160
ls -l packages
161161
else
162162
true
163163
fi
164164
165-
- name: Upload macOS Artifacts
165+
- name: Upload macOS intel Artifacts
166166
uses: actions/upload-artifact@v4
167167
with:
168-
name: openhantek_${{ steps.config_git.outputs.git_describe }}_osx_x86_64
168+
name: openhantek_${{ steps.config_git.outputs.git_describe }}_osx_intel
169169
path: ${{github.workspace}}/build/packages/*
170170

171-
- name: Upload macOS Release Assets
171+
- name: Upload macOS intel Release Assets
172+
if: startsWith(github.ref, 'refs/tags/')
173+
uses: softprops/action-gh-release@v1
174+
with:
175+
prerelease: true
176+
files: ./build/packages/*
177+
env:
178+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
179+
180+
181+
# -------------------------
182+
# --- macOS arm64 steps ---
183+
# -------------------------
184+
#
185+
macos-arm64:
186+
runs-on: macos-14
187+
steps:
188+
189+
# --- Clone the latest commit ---
190+
- name: Checkout
191+
uses: actions/checkout@v3
192+
with:
193+
fetch-tags: true
194+
submodules: recursive
195+
fetch-depth: 0
196+
197+
# --- Config git and get the version from "git describe" ---
198+
- name: Config Git
199+
id: config_git
200+
shell: bash
201+
run: |
202+
git config user.email "Ho-Ro@users.noreply.github.com"
203+
git config user.name "Ho-Ro"
204+
git fetch --prune --tags || true
205+
git submodule update --init --recursive
206+
echo "git_describe=$(git describe)"
207+
echo "git_describe=$(git describe)" >> $GITHUB_OUTPUT
208+
209+
- name: Install macOS Build Requirements
210+
run: |
211+
mkdir build
212+
brew install qt@5 fftw binutils create-dmg || true
213+
214+
- name: macOS arm64 Build
215+
# GitHub hosts macOS runners in GitHub's own macOS Cloud:
216+
# 3-core M1 CPU, 7 GB of RAM memory, 14 GB of SSD disk space
217+
working-directory: ${{github.workspace}}/build
218+
run: |
219+
cp ../CHANGELOG changelog
220+
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PREFIX_PATH=$(brew --prefix qt@5)
221+
make -j12
222+
sudo make -j12 package
223+
if test -d openhantek/OpenHantek.app; then
224+
export PATH=$(brew --prefix qt@5)/bin:${PATH}
225+
cd openhantek
226+
macdeployqt OpenHantek.app -always-overwrite -verbose=1
227+
python ../../utils/macdeployqtfix/macdeployqtfix.py \
228+
--quiet OpenHantek.app/Contents/MacOS/OpenHantek $(brew --prefix qt@5)
229+
create-dmg --volname OpenHantek --volicon ../../openhantek/res/images/OpenHantek.icns \
230+
--window-pos 200 120 --window-size 800 400 --icon-size 100 --icon "OpenHantek.app" 200 190 \
231+
--skip-jenkins --hide-extension "OpenHantek.app" --app-drop-link 600 185 \
232+
--eula ../../LICENSE OpenHantek.dmg OpenHantek.app
233+
cd ..
234+
else
235+
true
236+
fi
237+
if test -d openhantek/OpenHantek.app; then
238+
cd openhantek ; sudo tar -czf ../packages/openhantek_*_osx_arm64_*.tar.gz OpenHantek.app
239+
if test -f OpenHantek.dmg; then
240+
sudo mv OpenHantek.dmg ../packages/$(basename ../packages/openhantek_*_osx_arm64_*.tar.gz .tar.gz).dmg
241+
fi
242+
cd ..
243+
ls -l packages
244+
else
245+
true
246+
fi
247+
248+
- name: Upload macOS arm64 Artifacts
249+
uses: actions/upload-artifact@v4
250+
with:
251+
name: openhantek_${{ steps.config_git.outputs.git_describe }}_osx_arm64
252+
path: ${{github.workspace}}/build/packages/*
253+
254+
- name: Upload macOS arm64 Release Assets
172255
if: startsWith(github.ref, 'refs/tags/')
173256
uses: softprops/action-gh-release@v1
174257
with:

CHANGELOG

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
2025-03-03 (121858a): i18n update
12
2025-03-03 (72b41d6): i18n update
23
2025-03-03 (7e384e4): Merge branch 'spacejoey86-greater_math_modes'
34
2025-03-03 (7fd84d8): Merge branch 'greater_math_modes' of https://github.com/spacejoey86/OpenHantek6022 into spacejoey86-greater_math_modes

0 commit comments

Comments
 (0)