Skip to content
name: LinuxTestAndBuild
on: [push]
env:
PROTOC_URL: https://github.com/protocolbuffers/protobuf/releases/download/
PROTOC_VERSION: 24.1
pythonLocation: .
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
id: setup-python
with:
python-version: "3.10"
cache: "pip"
- name: Cache apt dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgl1-mesa-dev
- name: Install qt dependencies
env:
QT_QPA_PLATFORM: offscreen
uses: tlambert03/setup-qt-libs@v1
- name: Run virtual screen
run: |
sudo apt install xvfb
export DISPLAY=:0
export QT_QPA_PLATFORM=offscreen
- name: Install Nuitka and Python dependencies
run: |
sudo apt install -y \
ccache \
clang \
patchelf
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build proto bindings
run: |
wget ${{ env.PROTOC_URL }}v${{ env.PROTOC_VERSION }}/protoc-${{ env.PROTOC_VERSION }}-linux-x86_64.zip
unzip protoc-${{ env.PROTOC_VERSION }}-linux-x86_64.zip
sudo cp bin/protoc /usr/local/bin/protoc
protoc --proto_path=protos/ --python_out=protos/ protos/state.proto
protoc --proto_path=protos/ --python_out=protos/ protos/cache.proto
- name: Analysing the code with pylint
run: |
python -m pylint $(git ls-files '*.py') --extension-pkg-whitelist=PySide6 --indent-string=' ' --disable="R, no-member, import-error, no-name-in-module" --generated-members="proto*,bpy*"
- name: Run unittests
run: |
test_files=$(find . -name '*_test.py')
for file in $test_files; do
echo "Running tests in $file"
xvfb-run -a python -m unittest "$file"
done
- name: Create Python virtual environment
run: |
python -m venv venv
- name: Build
run: |
python ${{env.pythonLocation}}/lib/python3.10/site-packages/PySide6/scripts/deploy.py -c build/pysidedeploy_linux.spec --force
cp icons/icon.png icon.png
- uses: actions/upload-artifact@v4
with:
name: renderrob
path: |
icons/
ui/
utils_bpy/
utils_common/
renderrob.bin
renderrob
icon.png
custom_commands.py