|
1 | 1 | name: build
|
2 | 2 |
|
| 3 | + |
3 | 4 | on:
|
4 |
| - push: |
5 |
| - branches: [ master ] |
6 |
| - tags: |
7 |
| - - v* |
8 | 5 | pull_request:
|
9 | 6 | branches: [ master ]
|
10 | 7 |
|
11 | 8 | env:
|
12 | 9 | BUILD_TYPE: Release
|
13 | 10 |
|
14 | 11 | jobs:
|
15 |
| - # |
16 |
| - # Windows |
17 |
| - # |
18 |
| - # __ |
19 |
| - # |\__/ \ |
20 |
| - # | | |
21 |
| - # | __ | |
22 |
| - # \__/ \| |
23 |
| - # |
24 |
| - # |
25 | 12 | maya-win:
|
26 | 13 | runs-on: windows-latest
|
27 | 14 |
|
28 | 15 | strategy:
|
29 |
| - # Without this, all containers stop if any fail |
30 |
| - # That's bad, we want to know whether it's only one |
31 |
| - # or if it happens to multiples or all. |
32 | 16 | fail-fast: false
|
33 | 17 |
|
34 | 18 | matrix:
|
35 | 19 | include:
|
36 |
| - - maya: "2022" |
37 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_5_Update_DEVKIT_Windows.zip" |
38 |
| - - maya: "2023" |
39 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_3_Update_DEVKIT_Windows.zip" |
40 | 20 | - maya: "2024"
|
41 | 21 | devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_2_Update_DEVKIT_Windows.zip"
|
42 |
| - - maya: "2025" |
43 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2025/Autodesk_Maya_2025_1_Update_DEVKIT_Windows.zip" |
44 | 22 |
|
45 | 23 | steps:
|
46 | 24 | - name: Checkout code
|
47 | 25 | uses: actions/checkout@v4
|
48 | 26 | with:
|
49 | 27 | submodules: true
|
50 | 28 |
|
51 |
| - - name: Install devkit |
| 29 | + - name: Install devkit Windows |
52 | 30 | run: |
|
53 |
| - Write-Host "Downloading Devkit: ${{matrix.devkit}}..." |
54 | 31 | Invoke-WebRequest -Uri ${{matrix.devkit}} -OutFile "$pwd/devkit.zip"
|
55 |
| - Write-Host "Extracting devkit.zip.." |
56 | 32 | Expand-Archive -LiteralPath devkit.zip -DestinationPath $pwd
|
57 | 33 |
|
58 |
| - - name: Configure CMake |
59 |
| - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION="${{matrix.maya}}" -DMAYA_DEVKIT_BASE="$pwd/devkitBase" |
| 34 | + - name: Install ninja Windows |
| 35 | + run: choco install ninja |
60 | 36 |
|
61 |
| - - name: Build |
62 |
| - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} |
| 37 | + - name: Install meson Windows |
| 38 | + uses: actions/setup-python@v5 |
| 39 | + with: |
| 40 | + python-version: '3.10' |
| 41 | + run: pip install meson |
| 42 | + |
| 43 | + - name: Meson Setup Windows |
| 44 | + run: > |
| 45 | + meson setup |
| 46 | + -Dmaya:maya_version="${{matrix.maya}}" |
| 47 | + -Dmaya:maya_devkit_base="$pwd/devkitBase" |
| 48 | + --buildtype debugoptimized |
| 49 | + --vsenv |
| 50 | + --backend ninja |
| 51 | + ${{github.workspace}}/build |
| 52 | + . |
| 53 | +
|
| 54 | + - name: Compile |
| 55 | + run: | |
| 56 | + meson compile -C ${{github.workspace}}/build |
| 57 | + meson install -C ${{github.workspace}}/build |
63 | 58 |
|
64 |
| - - name: Repath Artifacts |
| 59 | + - name: Repath Artifacts Windows |
65 | 60 | run: |
|
66 | 61 | mkdir artifacts/plug-ins
|
67 |
| - Copy-Item "./build/${{env.BUILD_TYPE}}/TwistSpline.mll" -Destination "artifacts/plug-ins" |
| 62 | + Copy-Item ${{github.workspace}}/build/TwistSpline.mll -Destination "artifacts/plug-ins" |
68 | 63 |
|
69 |
| - - name: Upload Artifacts |
| 64 | + - name: Upload Artifacts Windows |
70 | 65 | uses: actions/upload-artifact@v4
|
71 | 66 | with:
|
72 | 67 | name: windows-${{matrix.maya}}
|
73 | 68 | path: |
|
74 | 69 | artifacts/plug-ins/TwistSpline.mll
|
75 |
| -
|
76 |
| - # Splitting mac-os into two different steps, as 2024 was made compatible with new arm architecture. |
77 |
| - maya-macos-x86_64: |
78 |
| - runs-on: macos-latest |
79 |
| - |
80 |
| - strategy: |
81 |
| - fail-fast: false |
82 |
| - |
83 |
| - matrix: |
84 |
| - include: |
85 |
| - - maya: "2022" |
86 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_5_Update_DEVKIT_Mac.dmg" |
87 |
| - - maya: "2023" |
88 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_3_Update_DEVKIT_Mac.dmg" |
89 |
| - |
90 |
| - steps: |
91 |
| - - name: Checkout code |
92 |
| - uses: actions/checkout@v4 |
93 |
| - with: |
94 |
| - submodules: true |
95 |
| - |
96 |
| - - name: Install devkit |
97 |
| - run: | |
98 |
| - curl -o devkit.dmg ${{matrix.devkit}} |
99 |
| - hdiutil attach devkit.dmg |
100 |
| -
|
101 |
| - - uses: maxim-lobanov/setup-xcode@v1 |
102 |
| - with: |
103 |
| - xcode-version: '14.3.1' |
104 |
| - |
105 |
| - - name: Configure CMake |
106 |
| - run: | |
107 |
| - cmake -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="/Volumes/devkitBase" |
108 |
| -
|
109 |
| - - name: Build |
110 |
| - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} |
111 |
| - |
112 |
| - - name: Repath Artifacts |
113 |
| - run: | |
114 |
| - mkdir -p artifacts/plug-ins |
115 |
| - cp ./build/${{env.BUILD_TYPE}}/TwistSpline.bundle artifacts/plug-ins |
116 |
| -
|
117 |
| - - name: Upload Artifacts |
118 |
| - uses: actions/upload-artifact@v4 |
119 |
| - with: |
120 |
| - name: mac-${{matrix.maya}} |
121 |
| - path: | |
122 |
| - artifacts/plug-ins/TwistSpline.bundle |
123 |
| -
|
124 |
| - # This will be compiled for both x86_64 and arm64 architectures, as arm support has been added starting from Maya 2024. |
125 |
| - maya-macos-arm64: |
126 |
| - runs-on: macos-latest |
127 |
| - |
128 |
| - strategy: |
129 |
| - fail-fast: false |
130 |
| - |
131 |
| - matrix: |
132 |
| - include: |
133 |
| - - maya: "2024" |
134 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_2_Update_DEVKIT_Mac.dmg" |
135 |
| - - maya: "2025" |
136 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2025/Autodesk_Maya_2025_1_Update_DEVKIT_Mac.dmg" |
137 |
| - |
138 |
| - steps: |
139 |
| - - name: Checkout code |
140 |
| - uses: actions/checkout@v4 |
141 |
| - with: |
142 |
| - submodules: true |
143 |
| - |
144 |
| - - name: Install devkit |
145 |
| - run: | |
146 |
| - curl -o devkit.dmg ${{matrix.devkit}} |
147 |
| - hdiutil attach devkit.dmg |
148 |
| -
|
149 |
| - - uses: maxim-lobanov/setup-xcode@v1 |
150 |
| - with: |
151 |
| - xcode-version: '14.3.1' |
152 |
| - |
153 |
| - - name: Configure CMake |
154 |
| - run: | |
155 |
| - cmake -G Xcode -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION=${{matrix.maya}} -DMAYA_DEVKIT_BASE="/Volumes/devkitBase" |
156 |
| -
|
157 |
| - - name: Build |
158 |
| - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} |
159 |
| - |
160 |
| - - name: Repath Artifacts |
161 |
| - run: | |
162 |
| - mkdir -p artifacts/plug-ins |
163 |
| - cp ./build/${{env.BUILD_TYPE}}/TwistSpline.bundle artifacts/plug-ins |
164 |
| -
|
165 |
| - - name: Upload Artifacts |
166 |
| - uses: actions/upload-artifact@v4 |
167 |
| - with: |
168 |
| - name: mac-${{matrix.maya}} |
169 |
| - path: | |
170 |
| - artifacts/plug-ins/TwistSpline.bundle |
171 |
| -
|
172 |
| - maya-linux: |
173 |
| - runs-on: ubuntu-latest |
174 |
| - |
175 |
| - strategy: |
176 |
| - fail-fast: false |
177 |
| - |
178 |
| - matrix: |
179 |
| - include: |
180 |
| - - maya: "2022" |
181 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2022/Autodesk_Maya_2022_5_Update_DEVKIT_Linux.tgz" |
182 |
| - - maya: "2023" |
183 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2023/Autodesk_Maya_2023_3_Update_DEVKIT_Linux.tgz" |
184 |
| - - maya: "2024" |
185 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2024/Autodesk_Maya_2024_2_Update_DEVKIT_Linux.tgz" |
186 |
| - - maya: "2025" |
187 |
| - devkit: "https://autodesk-adn-transfer.s3-us-west-2.amazonaws.com/ADN+Extranet/M%26E/Maya/devkit+2025/Autodesk_Maya_2025_1_Update_DEVKIT_Linux.tgz" |
188 |
| - |
189 |
| - steps: |
190 |
| - - name: Checkout code |
191 |
| - uses: actions/checkout@v4 |
192 |
| - with: |
193 |
| - submodules: true |
194 |
| - |
195 |
| - - name: Install OpenGL libraries |
196 |
| - run: | |
197 |
| - sudo apt install libglu1-mesa-dev |
198 |
| -
|
199 |
| - - name: Install devkit |
200 |
| - run: | |
201 |
| - curl -o devkit.tgz ${{matrix.devkit}} |
202 |
| - tar xvzf devkit.tgz |
203 |
| -
|
204 |
| - - name: Configure CMake |
205 |
| - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DMAYA_VERSION="${{matrix.maya}}" -DMAYA_DEVKIT_BASE="$PWD/devkitBase" |
206 |
| - |
207 |
| - - name: Build |
208 |
| - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} |
209 |
| - |
210 |
| - - name: Repath Artifacts |
211 |
| - run: | |
212 |
| - mkdir -p artifacts/plug-ins |
213 |
| - cp "./build/TwistSpline.so" "artifacts/plug-ins" |
214 |
| -
|
215 |
| - - name: Upload Artifacts |
216 |
| - uses: actions/upload-artifact@v4 |
217 |
| - with: |
218 |
| - name: linux-${{matrix.maya}} |
219 |
| - path: | |
220 |
| - artifacts/plug-ins/TwistSpline.so |
221 |
| -
|
222 |
| -
|
223 |
| -# |
224 |
| -# Shipping |
225 |
| -# |
226 |
| -# _________ |
227 |
| -# |\ _ _ _ _\ |
228 |
| -# | \________\ |
229 |
| -# | | | |
230 |
| -# | | | |
231 |
| -# \|________| |
232 |
| -# |
233 |
| -# |
234 |
| - upload_release: |
235 |
| - name: Upload release |
236 |
| - needs: [maya-win, maya-linux, maya-macos-x86_64, maya-macos-arm64] |
237 |
| - runs-on: ubuntu-latest |
238 |
| - |
239 |
| - steps: |
240 |
| - - name: Checkout code |
241 |
| - uses: actions/checkout@v4 |
242 |
| - |
243 |
| - - name: Download artifacts |
244 |
| - uses: actions/download-artifact@v4 |
245 |
| - |
246 |
| - # Omitting name: means "download all artifacts" |
247 |
| - # Destination directory structure: |
248 |
| - # ~/modules |
249 |
| - # /TwistSpline |
250 |
| - # /<os_name>-<maya_major_version> |
251 |
| - # /icons |
252 |
| - # /plug-ins |
253 |
| - # TwistSpline.mll |
254 |
| - # /scripts |
255 |
| - # *.py |
256 |
| - # *.mel |
257 |
| - # /TwistSpline.mod |
258 |
| - |
259 |
| - with: |
260 |
| - path: modules/TwistSpline |
261 |
| - |
262 |
| - - name: Set env |
263 |
| - run: | |
264 |
| - LATEST_TAG=$(git describe --tags --abbrev=0 || echo "NOTAG") |
265 |
| - echo "LatestTag: ${LATEST_TAG}" |
266 |
| - echo "RELEASE_VERSION=${LATEST_TAG}" >> $GITHUB_ENV |
267 |
| -
|
268 |
| - - name: Create distribution |
269 |
| - run: | |
270 |
| - cp ./TwistSpline.mod modules/ |
271 |
| - mkdir -p modules/TwistSpline/scripts |
272 |
| - cp -r ./scripts modules/TwistSpline |
273 |
| - mkdir -p modules/TwistSpline/icons |
274 |
| - cp ./icons/*.png modules/TwistSpline/icons |
275 |
| - cp ./icons/*.xpm modules/TwistSpline/icons |
276 |
| - zip -r TwistSpline-${{env.RELEASE_VERSION}}.zip modules/ |
277 |
| -
|
278 |
| - - name: Upload Artifacts |
279 |
| - uses: actions/upload-artifact@v4 |
280 |
| - with: |
281 |
| - name: TwistSpline-module |
282 |
| - path: TwistSpline-${{env.RELEASE_VERSION}}.zip |
283 |
| - |
284 |
| - - name: Upload distribution |
285 |
| - if: ${{ startsWith(github.ref, 'refs/tags/v') }} |
286 |
| - uses: softprops/action-gh-release@v1 |
287 |
| - with: |
288 |
| - token: "${{ secrets.GITHUB_TOKEN }}" |
289 |
| - prerelease: false |
290 |
| - files: | |
291 |
| - *.zip |
0 commit comments