Skip to content

Commit b466a64

Browse files
authored
Build dmg for x86_64 arch (Intel) (#380)
* Build dmg for Intel * Intel 15 * Use latest actionlint
1 parent cff6da9 commit b466a64

File tree

2 files changed

+64
-2
lines changed

2 files changed

+64
-2
lines changed

.github/workflows/build.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,68 @@ jobs:
220220
path: "*.zip"
221221
if-no-files-found: error
222222

223+
build-mac-intel:
224+
runs-on: macos-15-intel
225+
environment: build
226+
strategy:
227+
matrix:
228+
demo: [false, true]
229+
steps:
230+
- name: Checkout repository
231+
uses: actions/checkout@v4
232+
with:
233+
fetch-depth: 0
234+
235+
- name: Get latest tag version
236+
run: echo "PACKAGE_VERSION=$(git describe --tags --abbrev=0 || echo 0.0.0)" >> "$GITHUB_ENV"
237+
238+
- name: Apply patch
239+
if: matrix.demo == true
240+
run: |
241+
git config --global user.name "github-actions[bot]"
242+
git config --global user.email "[email protected]"
243+
git diff --binary origin/main...origin/demo > demo.patch
244+
git apply demo.patch
245+
246+
- name: Install Qt
247+
uses: jurplel/install-qt-action@v4
248+
with:
249+
version: ${{ env.QT_VERSION }}
250+
modules: 'qtwebsockets qthttpserver'
251+
252+
- name: Compile
253+
run: |
254+
mkdir -p build && cd build/
255+
qmake "../src/${{ env.APP_NAME }}.pro" CONFIG+="${{ env.BUILD_TYPE }}" PACKAGE_VERSION="${{ env.PACKAGE_VERSION }}"
256+
make "-j$(sysctl -n hw.ncpu)"
257+
258+
- name: Deploy
259+
run: |
260+
mv "build/${{ env.APP_NAME }}.app" "build/${{ env.APP_LABEL }}.app"
261+
macdeployqt "build/${{ env.APP_LABEL }}.app" -dmg -verbose=2
262+
263+
- run: mv "build/${{ env.APP_LABEL }}.dmg" "${{ env.APP_LABEL }}-${{ env.PACKAGE_VERSION }}${{ matrix.demo && '-demo-macos' || '' }}-intel.dmg"
264+
265+
- name: Zip builds
266+
if: matrix.demo == false
267+
run: zip -r -P "${{ secrets.ZIP_PASSWORD }}" "${{ env.APP_NAME }}-${{ env.PACKAGE_VERSION }}.zip" "${{ env.APP_LABEL }}-${{ env.PACKAGE_VERSION }}${{ matrix.demo && '-demo-macos' || '' }}-intel.dmg"
268+
269+
- name: Upload artifacts (demo)
270+
if: matrix.demo == true
271+
uses: actions/upload-artifact@v4
272+
with:
273+
name: ${{ env.APP_NAME }}-artifacts-mac-intel-demo
274+
path: "*.dmg"
275+
if-no-files-found: error
276+
277+
- name: Upload artifacts
278+
if: matrix.demo == false
279+
uses: actions/upload-artifact@v4
280+
with:
281+
name: ${{ env.APP_NAME }}-artifacts-mac-intel
282+
path: "*.zip"
283+
if-no-files-found: error
284+
223285
build-windows:
224286
runs-on: windows-latest
225287
environment: build

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
tar xzf actionlint.tar.gz actionlint
2525
./actionlint -color
2626
env:
27-
ACTIONLINT_VERSION: 1.7.7
28-
ACTIONLINT_SHA256: 023070a287cd8cccd71515fedc843f1985bf96c436b7effaecce67290e7e0757 # pragma: allowlist secret
27+
ACTIONLINT_VERSION: 1.7.10
28+
ACTIONLINT_SHA256: f4c76b71db5755a713e6055cbb0857ed07e103e028bda117817660ebadb4386f # pragma: allowlist secret
2929

3030
clang-format-lint:
3131
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)