-
Notifications
You must be signed in to change notification settings - Fork 2
115 lines (100 loc) · 3.75 KB
/
windows_mac_build.yaml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: WindowsMacBuild
on: [push]
env:
PROTOC_URL: https://github.com/protocolbuffers/protobuf/releases/download/
PROTOC_VERSION: 24.1
pythonLocation: .
jobs:
build:
strategy:
matrix:
os: [windows-latest, macos-latest]
include:
- os: windows-latest
pip_path: ~\AppData\Local\pip\Cache
protoc_zip_ending: -win64.zip
- os: macos-latest
pip_path: ~/Library/Caches/pip
protoc_zip_ending: -osx-x86_64.zip
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
- name: Cache MacOS nuitka build dependencies
uses: actions/cache@v4
env:
cache-name: cache-nuitka
id: cache-nuitka
with:
path: |
/Users/runner/Library/Caches/Nuitka/downloads/ccache/
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
${{ runner.os }}-pip-
- uses: actions/cache@v4
with:
path: ${{ matrix.pip_path }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build proto bindings Windows
if: matrix.os == 'windows-latest'
run: |
curl -L ${{ env.PROTOC_URL }}v${{ env.PROTOC_VERSION }}/protoc-${{ env.PROTOC_VERSION }}${{ matrix.protoc_zip_ending }} -o protoc-${{ env.PROTOC_VERSION }}${{ matrix.protoc_zip_ending }}
tar -xf protoc-${{ env.PROTOC_VERSION }}${{ matrix.protoc_zip_ending }}
.\bin\protoc.exe --proto_path=protos/ --python_out=protos/ protos/state.proto
.\bin\protoc.exe --proto_path=protos/ --python_out=protos/ protos/cache.proto
- name: Build proto bindings Mac OS
if: matrix.os == 'macos-latest'
run: |
wget ${{ env.PROTOC_URL }}v${{ env.PROTOC_VERSION }}/protoc-${{ env.PROTOC_VERSION }}${{ matrix.protoc_zip_ending }}
unzip protoc-${{ env.PROTOC_VERSION }}${{ matrix.protoc_zip_ending }}
sudo cp bin/protoc /usr/local/bin/protoc
bin/protoc --proto_path=protos/ --python_out=protos/ protos/state.proto
bin/protoc --proto_path=protos/ --python_out=protos/ protos/cache.proto
brew install ccache
- name: Create Python virtual environment
if: matrix.os == 'windows-latest'
run: |
python -m venv venv
- name: Build Windows
if: matrix.os == 'windows-latest'
run: |
.\venv\Scripts\activate
(echo yes) | pyside6-deploy -c .\build\pysidedeploy_win.spec
- name: Build Mac OS
if: matrix.os == 'macos-latest'
run: |
pip install imageio
python ${{env.pythonLocation}}/lib/python3.10/site-packages/PySide6/scripts/deploy.py -c build/pysidedeploy_mac.spec --force --verbose --keep-deployment-files
- uses: actions/upload-artifact@v4
if: matrix.os == 'windows-latest'
with:
name: renderrob_win
path: |
icons/
ui/
utils_bpy/
utils_common/
renderrob.exe
custom_commands.py
- uses: actions/upload-artifact@v4
if: matrix.os == 'macos-latest'
with:
name: renderrob_mac
path: |
icons/
ui/
utils_bpy/
utils_common/
deployment/
custom_commands.py