forked from ARDATI-Rami/VirtualLeaf2021
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (69 loc) · 2.14 KB
/
mac.yml
File metadata and controls
84 lines (69 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: VirtualLeaf compile, clean, and package for macOS (arm)
run-name: ${{ github.actor }} is testing on macOS (arm) 🚀
on:
push:
branches:
- main
pull_request:
release:
types: [created]
jobs:
build:
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Qt
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2' # Specify the required Qt version
host: 'mac'
target: 'desktop'
- name: Configure Project with qmake
run: |
cd src
qmake CONFIG+=c++14 VirtualLeaf.pro -early QMAKE_DEFAULT_LIBDIRS=$(xcrun -show-sdk-path)/usr/lib
- name: Build Project
run: |
cd src
make
- name: include data and models
run: |
cd ${{ github.workspace }}/bin
mv ../data VirtualLeaf.app/Contents/data
mv models VirtualLeaf.app/Contents/models
- name: Deploy Qt Frameworks
run: |
cd ${{ github.workspace }}/bin
macdeployqt VirtualLeaf.app
otool -L VirtualLeaf.app/Contents/MacOS/VirtualLeaf
- name: Zip with ditto (preserve macOS metadata)
run: |
cd ${{ github.workspace }}/bin
ditto -c -k --sequesterRsrc --keepParent VirtualLeaf.app ../VirtualLeaf-macos-arm.zip
- name: Upload zipped artifact
uses: actions/upload-artifact@v4
with:
name: VirtualLeaf-macos-arm
path: ${{ github.workspace }}/VirtualLeaf-macos-arm.zip
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Install
run: sudo apt-get install zip gzip
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/download-artifact@v4
with:
name: VirtualLeaf-macos-arm
path: ./
- name: Display structure of downloaded files
run: ls -R ${{ github.workspace }}
- name: '📦 Package MacOS arm'
if: github.event_name == 'release' && github.event.action == 'created'
run: |
gh release upload ${{github.event.release.tag_name}} VirtualLeaf-macos-arm.zip
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash