|
4 | 4 | inputs: |
5 | 5 | godot-version: |
6 | 6 | type: string |
| 7 | + build-test-templates: |
| 8 | + type: boolean |
| 9 | + default: true |
7 | 10 |
|
8 | 11 | concurrency: |
9 | 12 | group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos_build |
10 | 13 | cancel-in-progress: true |
11 | 14 |
|
12 | 15 | jobs: |
| 16 | + setup-matrix: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + outputs: |
| 19 | + matrix: ${{ steps.set-matrix.outputs.matrix }} |
| 20 | + steps: |
| 21 | + - id: set-matrix |
| 22 | + run: | |
| 23 | + MATRIX='{"include":[ |
| 24 | + {"name":"Build editor release x86_64 (target=editor)","cache-name":"editor_release_macos_x86_64","target":"editor","scons-flags":"arch=x86_64"}, |
| 25 | + {"name":"Build editor debug x86_64 (target=editor, debug_symbols=true )","cache-name":"editor_debug_macos_x86_64","target":"editor","scons-flags":"arch=x86_64 debug_symbols=true"}, |
| 26 | + {"name":"Build editor dev x86_64 (target=editor, dev_build=yes, debug_symbols=true )","cache-name":"editor_dev_macos_x86_64","target":"editor","scons-flags":"arch=x86_64 dev_build=yes debug_symbols=true"}, |
| 27 | + {"name":"Build release template x86_64","cache-name":"export_template_release_macos_x86_64","target":"template_release","scons-flags":"arch=x86_64"}, |
| 28 | + {"name":"Build debug template x86_64","cache-name":"export_template_debug_macos_x86_64","target":"template_debug","scons-flags":"arch=x86_64"}, |
| 29 | + {"name":"Build editor release arm64 (target=editor)","cache-name":"editor_release_macos_arm64","target":"editor","scons-flags":"arch=arm64"}, |
| 30 | + {"name":"Build editor debug arm64 (target=editor, debug_symbols=true )","cache-name":"editor_debug_macos_arm64","target":"editor","scons-flags":"arch=arm64 debug_symbols=true"}, |
| 31 | + {"name":"Build editor dev arm64 (target=editor, dev_build=yes, debug_symbols=true )","cache-name":"editor_dev_macos_arm64","target":"editor","scons-flags":"arch=arm64 dev_build=yes debug_symbols=true"}, |
| 32 | + {"name":"Build release template arm64","cache-name":"export_template_release_macos_arm64","target":"template_release","scons-flags":"arch=arm64"}, |
| 33 | + {"name":"Build debug template arm64","cache-name":"export_template_debug_macos_arm64","target":"template_debug","scons-flags":"arch=arm64"} |
| 34 | + ]}' |
| 35 | + if [ "${{ inputs.build-test-templates }}" == "true" ]; then |
| 36 | + MATRIX=$(echo "$MATRIX" | jq -c '.include += [ |
| 37 | + {"name":"Build release template x86_64 (test)","cache-name":"export_template_test_release_macos_x86_64","target":"template_release","scons-flags":"arch=x86_64 disable_path_overrides=no"}, |
| 38 | + {"name":"Build debug template x86_64 (test)","cache-name":"export_template_test_debug_macos_x86_64","target":"template_debug","scons-flags":"arch=x86_64 disable_path_overrides=no"}, |
| 39 | + {"name":"Build release template arm64 (test)","cache-name":"export_template_test_release_macos_arm64","target":"template_release","scons-flags":"arch=arm64 disable_path_overrides=no"}, |
| 40 | + {"name":"Build debug template arm64 (test)","cache-name":"export_template_test_debug_macos_arm64","target":"template_debug","scons-flags":"arch=arm64 disable_path_overrides=no"} |
| 41 | + ]') |
| 42 | + fi |
| 43 | + echo "matrix=$(echo $MATRIX | jq -c '.')" >> $GITHUB_OUTPUT |
| 44 | +
|
13 | 45 | build-macos: |
| 46 | + needs: setup-matrix |
14 | 47 | runs-on: macos-latest |
15 | 48 | name: ${{ matrix.name }} |
16 | 49 | strategy: |
17 | 50 | fail-fast: false |
18 | | - matrix: |
19 | | - include: |
20 | | - - name: Build editor release x86_64 (target=editor) |
21 | | - cache-name: editor_release_macos_x86_64 |
22 | | - target: editor |
23 | | - scons-flags: arch=x86_64 |
24 | | - |
25 | | - - name: Build editor debug x86_64 (target=editor, debug_symbols=true ) |
26 | | - cache-name: editor_debug_macos_x86_64 |
27 | | - target: editor |
28 | | - scons-flags: arch=x86_64 debug_symbols=true |
29 | | - |
30 | | - - name: Build editor dev x86_64 (target=editor, dev_build=yes, debug_symbols=true ) |
31 | | - cache-name: editor_dev_macos_x86_64 |
32 | | - target: editor |
33 | | - scons-flags: arch=x86_64 dev_build=yes debug_symbols=true |
34 | | - |
35 | | - - name: Build release template x86_64 |
36 | | - cache-name: export_template_release_macos_x86_64 |
37 | | - target: template_release |
38 | | - scons-flags: arch=x86_64 |
39 | | - |
40 | | - - name: Build debug template x86_64 |
41 | | - cache-name: export_template_debug_macos_x86_64 |
42 | | - target: template_debug |
43 | | - scons-flags: arch=x86_64 |
44 | | - |
45 | | - - name: Build editor release arm64 (target=editor) |
46 | | - cache-name: editor_release_macos_arm64 |
47 | | - target: editor |
48 | | - scons-flags: arch=arm64 |
49 | | - |
50 | | - - name: Build editor debug arm64 (target=editor, debug_symbols=true ) |
51 | | - cache-name: editor_debug_macos_arm64 |
52 | | - target: editor |
53 | | - scons-flags: arch=arm64 debug_symbols=true |
54 | | - |
55 | | - - name: Build editor dev arm64 (target=editor, dev_build=yes, debug_symbols=true ) |
56 | | - cache-name: editor_dev_macos_arm64 |
57 | | - target: editor |
58 | | - scons-flags: arch=arm64 dev_build=yes debug_symbols=true |
59 | | - |
60 | | - - name: Build release template arm64 |
61 | | - cache-name: export_template_release_macos_arm64 |
62 | | - target: template_release |
63 | | - scons-flags: arch=arm64 |
64 | | - |
65 | | - - name: Build debug template arm64 |
66 | | - cache-name: export_template_debug_macos_arm64 |
67 | | - target: template_debug |
68 | | - scons-flags: arch=arm64 |
| 51 | + matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} |
69 | 52 |
|
70 | 53 | steps: |
71 | 54 | - name: Clone Godot Engine |
|
0 commit comments