|
1 |
| -name: Build GDExtension |
2 |
| -on: |
3 |
| - workflow_call: |
4 |
| - push: |
5 |
| - pull_request: |
6 |
| - merge_group: |
7 |
| - |
8 |
| -jobs: |
9 |
| - build: |
10 |
| - strategy: |
11 |
| - fail-fast: false |
12 |
| - matrix: |
13 |
| - # A build is made for every possible combination of parameters |
14 |
| - # You can add or remove entries from the arrays of each parameter to customize which builds you want to run |
15 |
| - # See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow |
16 |
| - target: [ |
17 |
| - { platform: linux, arch: x86_64, os: ubuntu-22.04 }, |
18 |
| - # { platform: linux, arch: aarch64, os: ubuntu-22.04 }, |
19 |
| - { platform: windows, arch: x86_64, os: windows-latest }, |
20 |
| - { platform: macos, arch: universal, os: macos-latest }, |
21 |
| - # { platform: android, arch: arm64, os: ubuntu-22.04 }, |
22 |
| - # { platform: android, arch: arm32, os: ubuntu-22.04 }, |
23 |
| - # { platform: android, arch: x86_64, os: ubuntu-22.04 }, |
24 |
| - # { platform: android, arch: x86_32, os: ubuntu-22.04 }, |
25 |
| - # { platform: ios, arch: arm64, os: macos-latest }, |
26 |
| - # { platform: web, arch: wasm32, os: ubuntu-22.04 }, |
27 |
| - ] |
28 |
| - target-type: [template_release, template_debug] |
29 |
| - float-precision: [single, double] |
30 |
| - # include: # Also build a release version for these specific targets. Remove if you add template_release above. |
31 |
| - # - target: { platform: linux, arch: x86_64, os: ubuntu-22.04 } |
32 |
| - # target-type: template_release |
33 |
| - # float-precision: single |
34 |
| - |
35 |
| - # - target: { platform: linux, arch: x86_64, os: ubuntu-22.04 } |
36 |
| - # target-type: template_release |
37 |
| - # float-precision: double |
38 |
| - |
39 |
| - runs-on: ${{ matrix.target.os }} |
40 |
| - steps: |
41 |
| - # Clone this repository |
42 |
| - - name: Checkout |
43 |
| - uses: actions/checkout@v4 |
44 |
| - with: |
45 |
| - submodules: true |
46 |
| - |
47 |
| - # Lint |
48 |
| - #- name: Setup clang-format |
49 |
| - # shell: bash |
50 |
| - # run: | |
51 |
| - # python -m pip install clang-format |
52 |
| - #- name: Run clang-format |
53 |
| - # shell: bash |
54 |
| - # run: | |
55 |
| - # clang-format src/** --dry-run --Werror |
56 |
| - |
57 |
| - # Get the Kuzu Binaries |
58 |
| - - name: Download Kuzu Binaries |
59 |
| - shell: bash |
60 |
| - run: | |
61 |
| - case "${{ matrix.target.platform }}-${{ matrix.target.arch }}" in |
62 |
| - linux-x86_64) |
63 |
| - KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-linux-x86_64.tar.gz" |
64 |
| - ;; |
65 |
| - linux-aarch64) |
66 |
| - KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-linux-aarch64.tar.gz" |
67 |
| - ;; |
68 |
| - windows-x86_64) |
69 |
| - KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-windows-x86_64.zip" |
70 |
| - ;; |
71 |
| - macos-universal) |
72 |
| - KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-osx-universal.tar.gz" |
73 |
| - ;; |
74 |
| - android-armv8a) |
75 |
| - KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-android-armv8a.tar.gz" |
76 |
| - ;; |
77 |
| - *) |
78 |
| - echo "Unsupported platform: ${{ matrix.target.platform }}-${{ matrix.target.arch }}" |
79 |
| - exit 1 |
80 |
| - ;; |
81 |
| - esac |
82 |
| -
|
83 |
| - curl -L -o kuzu_binary.tar.gz "$KUZU_URL" |
84 |
| -
|
85 |
| - - name: Extract Kuzu Binaries (Linux) |
86 |
| - if: ${{ matrix.target.platform == 'linux' }} |
87 |
| - shell: bash |
88 |
| - run: | |
89 |
| - tar -xvzf kuzu_binary.tar.gz -C ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/ |
90 |
| - # Rename only for Linux platforms |
91 |
| - mv ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/libkuzu.so \ |
92 |
| - ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/libkuzu_${{ matrix.target.arch }}.so |
93 |
| -
|
94 |
| - - name: Extract Kuzu Binaries (macOS) |
95 |
| - if: ${{ matrix.target.platform == 'macos' }} |
96 |
| - shell: bash |
97 |
| - run: | |
98 |
| - tar -xvzf kuzu_binary.tar.gz -C ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/ |
99 |
| - # No renaming needed for macOS |
100 |
| -
|
101 |
| - - name: Extract Kuzu Binaries (Windows) |
102 |
| - if: ${{ matrix.target.platform == 'windows' }} |
103 |
| - shell: pwsh |
104 |
| - run: | |
105 |
| - Expand-Archive -Path kuzu_binary.tar.gz -DestinationPath "${{ github.workspace }}\bin\windows\kuzu\" |
106 |
| -
|
107 |
| - - name: Verify Kuzu Binaries |
108 |
| - run: | |
109 |
| - ls -l ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/ |
110 |
| -
|
111 |
| - # Setup dependencies |
112 |
| - - name: Setup godot-cpp |
113 |
| - uses: ./godot-cpp/.github/actions/setup-godot-cpp |
114 |
| - with: |
115 |
| - platform: ${{ matrix.target.platform }} |
116 |
| - em-version: 3.1.62 |
117 |
| - |
118 |
| - # Build GDExtension (with caches) |
119 |
| - |
120 |
| - - name: Restore .scons_cache |
121 |
| - uses: ./godot-cpp/.github/actions/godot-cache-restore |
122 |
| - with: |
123 |
| - scons-cache: ${{ github.workspace }}/.scons-cache/ |
124 |
| - cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }} |
125 |
| - |
126 |
| - - name: Build GDExtension Release Build |
127 |
| - shell: sh |
128 |
| - env: |
129 |
| - SCONS_CACHE: ${{ github.workspace }}/.scons-cache/ |
130 |
| - run: | |
131 |
| - scons target=${{ matrix.target-type }} \ |
132 |
| - debug_symbols=${{ matrix.target-type == 'template_debug' && 'yes' || 'no' }} \ |
133 |
| - platform=${{ matrix.target.platform }} \ |
134 |
| - arch=${{ matrix.target.arch }} \ |
135 |
| - precision=${{ matrix.float-precision }} |
136 |
| -
|
137 |
| - - name: Save .scons_cache |
138 |
| - uses: ./godot-cpp/.github/actions/godot-cache-save |
139 |
| - with: |
140 |
| - scons-cache: ${{ github.workspace }}/.scons-cache/ |
141 |
| - cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }} |
142 |
| - |
143 |
| - # Clean up compilation files |
144 |
| - - name: Windows - Delete compilation files |
145 |
| - if: ${{ matrix.target.platform == 'windows' }} |
146 |
| - shell: pwsh |
147 |
| - run: | |
148 |
| - Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force |
149 |
| -
|
150 |
| - # Upload the build |
151 |
| - - name: Upload Artifact |
152 |
| - uses: actions/upload-artifact@v4 |
153 |
| - with: |
154 |
| - name: kuzugd-${{ matrix.target.platform }}-${{ matrix.target.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }} |
155 |
| - path: | |
156 |
| - ${{ github.workspace }}/bin/** |
157 |
| -
|
158 |
| - # Merges all the build artifacts together into a single kuzugd artifact. |
159 |
| - # If you comment out this step, all the builds will be uploaded individually. |
160 |
| - merge: |
161 |
| - runs-on: ubuntu-22.04 |
162 |
| - needs: build |
163 |
| - steps: |
164 |
| - - name: Merge Artifacts |
165 |
| - uses: actions/upload-artifact/merge@v4 |
166 |
| - with: |
167 |
| - name: kuzugd |
168 |
| - pattern: kuzugd-* |
169 |
| - delete-merged: true |
| 1 | +# name: Build GDExtension |
| 2 | +# on: |
| 3 | +# workflow_call: |
| 4 | +# push: |
| 5 | +# pull_request: |
| 6 | +# merge_group: |
| 7 | + |
| 8 | +# jobs: |
| 9 | +# build: |
| 10 | +# strategy: |
| 11 | +# fail-fast: false |
| 12 | +# matrix: |
| 13 | +# # A build is made for every possible combination of parameters |
| 14 | +# # You can add or remove entries from the arrays of each parameter to customize which builds you want to run |
| 15 | +# # See https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/running-variations-of-jobs-in-a-workflow |
| 16 | +# target: [ |
| 17 | +# { platform: linux, arch: x86_64, os: ubuntu-22.04 }, |
| 18 | +# # { platform: linux, arch: aarch64, os: ubuntu-22.04 }, |
| 19 | +# { platform: windows, arch: x86_64, os: windows-latest }, |
| 20 | +# { platform: macos, arch: universal, os: macos-latest }, |
| 21 | +# # { platform: android, arch: arm64, os: ubuntu-22.04 }, |
| 22 | +# # { platform: android, arch: arm32, os: ubuntu-22.04 }, |
| 23 | +# # { platform: android, arch: x86_64, os: ubuntu-22.04 }, |
| 24 | +# # { platform: android, arch: x86_32, os: ubuntu-22.04 }, |
| 25 | +# # { platform: ios, arch: arm64, os: macos-latest }, |
| 26 | +# # { platform: web, arch: wasm32, os: ubuntu-22.04 }, |
| 27 | +# ] |
| 28 | +# target-type: [template_release, template_debug] |
| 29 | +# float-precision: [single, double] |
| 30 | +# # include: # Also build a release version for these specific targets. Remove if you add template_release above. |
| 31 | +# # - target: { platform: linux, arch: x86_64, os: ubuntu-22.04 } |
| 32 | +# # target-type: template_release |
| 33 | +# # float-precision: single |
| 34 | + |
| 35 | +# # - target: { platform: linux, arch: x86_64, os: ubuntu-22.04 } |
| 36 | +# # target-type: template_release |
| 37 | +# # float-precision: double |
| 38 | + |
| 39 | +# runs-on: ${{ matrix.target.os }} |
| 40 | +# steps: |
| 41 | +# # Clone this repository |
| 42 | +# - name: Checkout |
| 43 | +# uses: actions/checkout@v4 |
| 44 | +# with: |
| 45 | +# submodules: true |
| 46 | + |
| 47 | +# # Lint |
| 48 | +# #- name: Setup clang-format |
| 49 | +# # shell: bash |
| 50 | +# # run: | |
| 51 | +# # python -m pip install clang-format |
| 52 | +# #- name: Run clang-format |
| 53 | +# # shell: bash |
| 54 | +# # run: | |
| 55 | +# # clang-format src/** --dry-run --Werror |
| 56 | + |
| 57 | +# # Get the Kuzu Binaries |
| 58 | +# - name: Download Kuzu Binaries |
| 59 | +# shell: bash |
| 60 | +# run: | |
| 61 | +# case "${{ matrix.target.platform }}-${{ matrix.target.arch }}" in |
| 62 | +# linux-x86_64) |
| 63 | +# KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-linux-x86_64.tar.gz" |
| 64 | +# ;; |
| 65 | +# linux-aarch64) |
| 66 | +# KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-linux-aarch64.tar.gz" |
| 67 | +# ;; |
| 68 | +# windows-x86_64) |
| 69 | +# KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-windows-x86_64.zip" |
| 70 | +# ;; |
| 71 | +# macos-universal) |
| 72 | +# KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-osx-universal.tar.gz" |
| 73 | +# ;; |
| 74 | +# android-armv8a) |
| 75 | +# KUZU_URL="https://github.com/kuzudb/kuzu/releases/download/v0.10.0/libkuzu-android-armv8a.tar.gz" |
| 76 | +# ;; |
| 77 | +# *) |
| 78 | +# echo "Unsupported platform: ${{ matrix.target.platform }}-${{ matrix.target.arch }}" |
| 79 | +# exit 1 |
| 80 | +# ;; |
| 81 | +# esac |
| 82 | + |
| 83 | +# curl -L -o kuzu_binary.tar.gz "$KUZU_URL" |
| 84 | + |
| 85 | +# - name: Extract Kuzu Binaries (Linux) |
| 86 | +# if: ${{ matrix.target.platform == 'linux' }} |
| 87 | +# shell: bash |
| 88 | +# run: | |
| 89 | +# tar -xvzf kuzu_binary.tar.gz -C ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/ |
| 90 | +# # Rename only for Linux platforms |
| 91 | +# mv ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/libkuzu.so \ |
| 92 | +# ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/libkuzu_${{ matrix.target.arch }}.so |
| 93 | + |
| 94 | +# - name: Extract Kuzu Binaries (macOS) |
| 95 | +# if: ${{ matrix.target.platform == 'macos' }} |
| 96 | +# shell: bash |
| 97 | +# run: | |
| 98 | +# tar -xvzf kuzu_binary.tar.gz -C ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/ |
| 99 | +# # No renaming needed for macOS |
| 100 | + |
| 101 | +# - name: Extract Kuzu Binaries (Windows) |
| 102 | +# if: ${{ matrix.target.platform == 'windows' }} |
| 103 | +# shell: pwsh |
| 104 | +# run: | |
| 105 | +# Expand-Archive -Path kuzu_binary.tar.gz -DestinationPath "${{ github.workspace }}\bin\windows\kuzu\" |
| 106 | + |
| 107 | +# - name: Verify Kuzu Binaries |
| 108 | +# run: | |
| 109 | +# ls -l ${{ github.workspace }}/bin/${{ matrix.target.platform }}/kuzu/ |
| 110 | + |
| 111 | +# # Setup dependencies |
| 112 | +# - name: Setup godot-cpp |
| 113 | +# uses: ./godot-cpp/.github/actions/setup-godot-cpp |
| 114 | +# with: |
| 115 | +# platform: ${{ matrix.target.platform }} |
| 116 | +# em-version: 3.1.62 |
| 117 | + |
| 118 | +# # Build GDExtension (with caches) |
| 119 | + |
| 120 | +# - name: Restore .scons_cache |
| 121 | +# uses: ./godot-cpp/.github/actions/godot-cache-restore |
| 122 | +# with: |
| 123 | +# scons-cache: ${{ github.workspace }}/.scons-cache/ |
| 124 | +# cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }} |
| 125 | + |
| 126 | +# - name: Build GDExtension Release Build |
| 127 | +# shell: sh |
| 128 | +# env: |
| 129 | +# SCONS_CACHE: ${{ github.workspace }}/.scons-cache/ |
| 130 | +# run: | |
| 131 | +# scons target=${{ matrix.target-type }} \ |
| 132 | +# debug_symbols=${{ matrix.target-type == 'template_debug' && 'yes' || 'no' }} \ |
| 133 | +# platform=${{ matrix.target.platform }} \ |
| 134 | +# arch=${{ matrix.target.arch }} \ |
| 135 | +# precision=${{ matrix.float-precision }} |
| 136 | + |
| 137 | +# - name: Save .scons_cache |
| 138 | +# uses: ./godot-cpp/.github/actions/godot-cache-save |
| 139 | +# with: |
| 140 | +# scons-cache: ${{ github.workspace }}/.scons-cache/ |
| 141 | +# cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }} |
| 142 | + |
| 143 | +# # Clean up compilation files |
| 144 | +# - name: Windows - Delete compilation files |
| 145 | +# if: ${{ matrix.target.platform == 'windows' }} |
| 146 | +# shell: pwsh |
| 147 | +# run: | |
| 148 | +# Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force |
| 149 | + |
| 150 | +# # Upload the build |
| 151 | +# - name: Upload Artifact |
| 152 | +# uses: actions/upload-artifact@v4 |
| 153 | +# with: |
| 154 | +# name: kuzugd-${{ matrix.target.platform }}-${{ matrix.target.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }} |
| 155 | +# path: | |
| 156 | +# ${{ github.workspace }}/bin/** |
| 157 | + |
| 158 | +# # Merges all the build artifacts together into a single kuzugd artifact. |
| 159 | +# # If you comment out this step, all the builds will be uploaded individually. |
| 160 | +# merge: |
| 161 | +# runs-on: ubuntu-22.04 |
| 162 | +# needs: build |
| 163 | +# steps: |
| 164 | +# - name: Merge Artifacts |
| 165 | +# uses: actions/upload-artifact/merge@v4 |
| 166 | +# with: |
| 167 | +# name: kuzugd |
| 168 | +# pattern: kuzugd-* |
| 169 | +# delete-merged: true |
0 commit comments