CI #235
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
# SPDX-License-Identifier: Apache-2.0 | |
# Copyright 2021-2022 Blender Foundation | |
# Note CI is disabled by default in forked repositories. To enable, go to | |
# repository Settings > Secrets and add secret CI_ENABLE with value 1. | |
# | |
# These actions require downloading large precompiled libraries, which will | |
# take up significant cache space. | |
name: CI | |
on: | |
push: | |
branches: | |
- "main" | |
paths-ignore: | |
- '**.md' | |
- 'web/**' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- 'web/**' | |
schedule: | |
- cron: "45 3 */6 * *" | |
workflow_dispatch: | |
jobs: | |
Setup: | |
runs-on: ubuntu-latest | |
outputs: | |
CI_ENABLE: ${{ steps.check_secret.outputs.CI_ENABLE }} | |
steps: | |
- name: Check Secret | |
id: check_secret | |
env: | |
CI_ENABLE: ${{ secrets.CI_ENABLE }} | |
run: echo "CI_ENABLE=${{ env.CI_ENABLE != '' }}" >> $GITHUB_OUTPUT | |
Build: | |
needs: [Setup] | |
if: needs.Setup.outputs.CI_ENABLE == 'true' | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [Linux, macOS, Windows] | |
include: | |
- platform: Linux | |
os: ubuntu-latest | |
make: make | |
- platform: macOS | |
os: macos-latest | |
make: make | |
- platform: Windows | |
os: windows-latest | |
make: cmd /c make.bat | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: cycles | |
- name: Restore Libraries | |
uses: actions/cache/restore@v4 | |
with: | |
path: cycles/.git/modules/lib | |
key: libs-${{ matrix.os }} | |
- name: Update | |
working-directory: cycles | |
run: ${{ matrix.make }} update | |
- name: Cache Libraries | |
uses: actions/cache/save@v4 | |
if: always() | |
with: | |
path: cycles/.git/modules/lib | |
key: libs-${{ matrix.os }}-${{ github.ref }} | |
- name: Build | |
working-directory: cycles | |
run: ${{ matrix.make }} | |
- name: Test | |
working-directory: cycles | |
run: ${{ matrix.make }} test |