Next try fixing scene rendering #193
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Cache MacOS nuitka build dependencies | |
uses: actions/cache@v3 | |
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@v3 | |
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=proto/ --python_out=proto/ proto/state.proto | |
.\bin\protoc.exe --proto_path=proto/ --python_out=proto/ proto/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=proto/ --python_out=proto/ proto/state.proto | |
bin/protoc --proto_path=proto/ --python_out=proto/ proto/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@v3 | |
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@v3 | |
if: matrix.os == 'macos-latest' | |
with: | |
name: renderrob_mac | |
path: | | |
icons/ | |
ui/ | |
utils_bpy/ | |
utils_common/ | |
deployment/ | |
custom_commands.py |