-
Notifications
You must be signed in to change notification settings - Fork 17
63 lines (56 loc) · 2.05 KB
/
Copy pathtests.yml
File metadata and controls
63 lines (56 loc) · 2.05 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
name: Tests
on:
pull_request:
branches: [main]
push:
branches: [develop]
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
blender-version: ["4.2", "4.3", "4.4", "4.5", "5.0", "5.1"]
exclude:
# blender-downloader (pip, latest 1.0.5) can't resolve macOS builds
# for 5.0/5.1: Blender dropped macOS x64 dmgs from 5.0 onward and
# ships arm64-only, which this version of the tool doesn't parse.
# Linux is unaffected. Re-include once upstream is fixed:
# https://github.com/mondeja/blender-downloader/issues
- os: macos-14
blender-version: "5.0"
- os: macos-14
blender-version: "5.1"
steps:
- uses: actions/checkout@v7
with:
path: ${{ github.event.repository.name }}
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Cache Blender ${{ matrix.blender-version }}
id: cache-blender
uses: actions/cache@v6
with:
path: blender-download
key: blender-${{ matrix.blender-version }}-${{ matrix.os }}
- name: Download Blender ${{ matrix.blender-version }}
if: steps.cache-blender.outputs.cache-hit != 'true'
run: |
mkdir -p blender-download
pip install blender-downloader
blender-downloader ${{ matrix.blender-version }} --extract --quiet --output-directory blender-download
- name: Locate Blender executable
id: blender
run: |
EXE=$(find blender-download -type f -iname blender | head -n 1)
if [ -z "$EXE" ]; then
echo "Could not find a Blender executable under blender-download/" >&2
exit 1
fi
chmod +x "$EXE"
echo "executable=$EXE" >> "$GITHUB_OUTPUT"
- name: Run test suite
run: python3 ${{ github.event.repository.name }}/tests/run_tests.py --blender "${{ steps.blender.outputs.executable }}"