forked from blender/cycles
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (76 loc) · 2.04 KB
/
ci.yaml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# 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@v3
with:
path: cycles
- name: Restore Libraries
uses: actions/cache/restore@v3
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@v3
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