Develop #65
This file contains hidden or 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: 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@v3 | |
| 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@v4 | |
| 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 }}" |